From 0887dda8e4eba68004e087e12302f3dbf2688790 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 25 Sep 2012 23:39:28 -0400 Subject: [PATCH] Use current ref for Files and Commits if available --- app/views/layouts/_project_menu.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_project_menu.html.haml b/app/views/layouts/_project_menu.html.haml index 5a662a4..d69f9a0 100644 --- a/app/views/layouts/_project_menu.html.haml +++ b/app/views/layouts/_project_menu.html.haml @@ -5,9 +5,9 @@ - if @project.repo_exists? - if can? current_user, :download_code, @project %li{class: current_controller?(:tree, :blob, :blame) ? 'active' : ''} - = link_to 'Files', project_tree_path(@project, @project.root_ref) + = link_to 'Files', project_tree_path(@project, @ref || @project.root_ref) %li{class: current_controller?(:commit, :commits, :compare, :repositories, :protected_branches) ? 'active' : ''} - = link_to "Commits", project_commits_path(@project, @project.root_ref) + = link_to "Commits", project_commits_path(@project, @ref || @project.root_ref) %li{class: tab_class(:network)} = link_to "Network", graph_project_path(@project) -- libgit2 0.21.2