Commit 0887dda8e4eba68004e087e12302f3dbf2688790
1 parent
b6d6663e
Exists in
master
and in
4 other branches
Use current ref for Files and Commits if available
Closes #1452
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/views/layouts/_project_menu.html.haml
... | ... | @@ -5,9 +5,9 @@ |
5 | 5 | - if @project.repo_exists? |
6 | 6 | - if can? current_user, :download_code, @project |
7 | 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, @ref || @project.root_ref) | |
9 | 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, @ref || @project.root_ref) | |
11 | 11 | %li{class: tab_class(:network)} |
12 | 12 | = link_to "Network", graph_project_path(@project) |
13 | 13 | ... | ... |