navigation_helper.rb revision fe90e1e1ecaa3e8916cdb1bac8cadb8daf9631c3
4070N/A row << ontology
.send(counter_key) if ontology.respond_to?(counter_key) 4070N/A @page_title = ontology.to_s 4070N/A @page_title = "#{current_page.capitalize} ยท #{@page_title}" if current_page != pages[0][0] 4070N/A render :partial => '/ontologies/info', :locals => { 4070N/A current_page: current_page, def subnavigation(resource, pages, current_page, additional_actions = []) counter_key = "#{row[0]}_count" row << resource.send(counter_key) if resource.respond_to?(counter_key) @page_title = resource.to_s @page_title = "#{current_page.capitalize} ยท #{@page_title}" if current_page != pages[0][0] render :partial => '/shared/subnavigation', :locals => { current_page: current_page, additional_actions: additional_actions def team_nav(team, current_page) [:permissions, [team, :permissions]] pages << [:members, [team, :team_users]] if can? :edit, team subnavigation(team, pages, current_page) def active_navigation(controller) if params[:repository_id] return 'active' if controller == :ontologies return 'active' if controller == :repositories return 'active' if [controller.to_s, controller.to_s.gsub('_', '/')].include? params[:controller] def menu_entry(title, controller) content_tag :li, class: active_navigation(controller) do link_to title, controller