summaryrefslogtreecommitdiff
path: root/app/views/repositories
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-09-26 16:14:17 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-09-26 16:38:28 -0400
commit36f68140d1fcd89ed6bd92ac69cf13c566db63d5 (patch)
treef674b473d24680a5511dab6008760aa9c33e932e /app/views/repositories
parentf064c84019f7414cb9cfa9e49fb735dba7f495df (diff)
downloadgitlab-ce-36f68140d1fcd89ed6bd92ac69cf13c566db63d5.tar.gz
Replace various "active tab" checks with nav_link
Also remove now-unused tab_class helper
Diffstat (limited to 'app/views/repositories')
-rw-r--r--app/views/repositories/_branches_head.html.haml15
1 files changed, 6 insertions, 9 deletions
diff --git a/app/views/repositories/_branches_head.html.haml b/app/views/repositories/_branches_head.html.haml
index 6afff627b94..25a988cf01b 100644
--- a/app/views/repositories/_branches_head.html.haml
+++ b/app/views/repositories/_branches_head.html.haml
@@ -1,11 +1,8 @@
= render "commits/head"
%ul.nav.nav-pills
- %li{class: ("active" if current_page?(project_repository_path(@project)))}
- = link_to project_repository_path(@project) do
- Recent
- %li{class: ("active" if current_page?(project_protected_branches_path(@project)))}
- = link_to project_protected_branches_path(@project) do
- Protected
- %li{class: ("active" if current_page?(branches_project_repository_path(@project)))}
- = link_to branches_project_repository_path(@project) do
- All
+ = nav_link(path: 'repositories#show') do
+ = link_to 'Recent', project_repository_path(@project)
+ = nav_link(path: 'protected_branches#index') do
+ = link_to 'Protected', project_protected_branches_path(@project)
+ = nav_link(path: 'repositories#branches') do
+ = link_to 'All', branches_project_repository_path(@project)