navigation_helper.rb revision 118a3240abc3c3ff233450b3551bd451d39ef6ea
883N/A row << resource
.send(counter_key) if resource.respond_to?(counter_key) 883N/A @page_title = resource.to_s 883N/A @page_title = "#{current_page.capitalize} ยท #{@page_title}" if current_page != pages[0][0] 883N/A render :partial => '/shared/subnavigation', :locals => { 883N/A current_page: current_page, 883N/A additional_actions: additional_actions 883N/A def ontology_nav(ontology, current_page) 883N/A pages = [[:overview,ontology]] 883N/A if ontology.distributed? 883N/A pages << [:children, [ontology, :children]] 883N/A pages << [:sentences, [ontology, :sentences]] 883N/A pages << [:entities, [ontology, :entities]] 883N/A [:versions, [ontology, :ontology_versions]], 883N/A [:metadata, [ontology, :metadata]], 883N/A [:comments, [ontology, :comments]] 883N/A # nav link to permissions 883N/A pages << [:permissions, [ontology, :permissions]] if can? :permissions, ontology 883N/A # action link to new version 883N/A actions << link_to('New version', [:new, ontology, :ontology_version ]) if can? :edit, ontology 883N/A subnavigation(ontology, pages, current_page, actions) 883N/A def team_nav(team, current_page) 883N/A [:permissions, [team, :permissions]] 883N/A pages << [:members, [team, :team_users]] if can? :edit, team 883N/A subnavigation(team, pages, current_page)