app/models/tree_data.rb
# Accepts either a Project or an Organisation and generates the
# data for the tree view visualisation.
Accepts either a Project or an Organisation and generates the
data for the tree view visualisation.
Accepts either a Project or an Organisation and generates the data for the tree view visualisation .
def maybe_add_activity_type hash
    if @node.class == Project
      ac_type = @node.activity_type_resource
      ac_kind = Concepts::ActivityType.top_level_concepts.include?(ac_type) ? ac_type : Concepts::ActivityType.find('http://data.digitalsocial.eu/def/concept/activity-type/other')
      hash[:activity_type] = {:uri => ac_type.uri.to_s,
                              :name => ac_type.label,
                              :type => ac_kind.uri.to_s }
      hash
    else
      hash
    end
  end
def maybe_add_activity_type hash if @node . class == Project ac_type = @node . activity_type_resource ac_kind = Concepts :: ActivityType . top_level_concepts . include? ( ac_type ) ? ac_type : Concepts :: ActivityType . find ( 'http://data.digitalsocial.eu/def/concept/activity-type/other' ) hash [ :activity_type ] = { :uri => ac_type . uri . to_s , :name => ac_type . label , :type => ac_kind . uri . to_s } hash else hash end end
Accepts either a Project or an Organisation and generates the
data for the tree view visualisation.
Accepts either a Project or an Organisation and generates the data for the tree view visualisation .
hash
<not_specific>