Commit b62d6a1fe28ad040e96fd88604131f357e5e6e9e
1 parent
86a7864d
Exists in
master
and in
4 other branches
Remove commit_tab_class helper
Showing
2 changed files
with
1 additions
and
7 deletions
Show diff stats
app/helpers/tab_helper.rb
... | ... | @@ -51,12 +51,6 @@ module TabHelper |
51 | 51 | end |
52 | 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 | 54 | def branches_tab_class |
61 | 55 | if current_page?(branches_project_repository_path(@project)) || |
62 | 56 | controller.controller_name == "protected_branches" || | ... | ... |
app/views/layouts/_project_menu.html.haml
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | - if can? current_user, :download_code, @project |
7 | 7 | %li{class: current_controller?(:tree, :blob, :blame) ? 'active' : ''} |
8 | 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 | 10 | = link_to "Commits", project_commits_path(@project, @project.root_ref) |
11 | 11 | %li{class: tab_class(:network)} |
12 | 12 | = link_to "Network", graph_project_path(@project) | ... | ... |