Commit b62d6a1fe28ad040e96fd88604131f357e5e6e9e

Authored by Robert Speicher
1 parent 86a7864d

Remove commit_tab_class helper

app/helpers/tab_helper.rb
@@ -51,12 +51,6 @@ module TabHelper @@ -51,12 +51,6 @@ module TabHelper
51 end 51 end
52 end 52 end
53 53
54 - def commit_tab_class  
55 - if ['commits', 'repositories', 'protected_branches'].include? controller.controller_name  
56 - "active"  
57 - end  
58 - end  
59 -  
60 def branches_tab_class 54 def branches_tab_class
61 if current_page?(branches_project_repository_path(@project)) || 55 if current_page?(branches_project_repository_path(@project)) ||
62 controller.controller_name == "protected_branches" || 56 controller.controller_name == "protected_branches" ||
app/views/layouts/_project_menu.html.haml
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 - if can? current_user, :download_code, @project 6 - if can? current_user, :download_code, @project
7 %li{class: current_controller?(:tree, :blob, :blame) ? 'active' : ''} 7 %li{class: current_controller?(:tree, :blob, :blame) ? 'active' : ''}
8 = link_to 'Files', project_tree_path(@project, @project.root_ref) 8 = link_to 'Files', project_tree_path(@project, @project.root_ref)
9 - %li{class: commit_tab_class} 9 + %li{class: current_controller?(:commit, :commits, :compare, :repositories, :protected_branches) ? 'active' : ''}
10 = link_to "Commits", project_commits_path(@project, @project.root_ref) 10 = link_to "Commits", project_commits_path(@project, @project.root_ref)
11 %li{class: tab_class(:network)} 11 %li{class: tab_class(:network)}
12 = link_to "Network", graph_project_path(@project) 12 = link_to "Network", graph_project_path(@project)