diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-14 22:24:27 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-14 22:24:27 +0200 |
commit | a685624d27a99a4d7ee9d607fcf2ccbc85eb7fc7 (patch) | |
tree | 4d3d692b74c3358d61640b84d4f3337d1456b94a /app/helpers/tab_helper.rb | |
parent | 753ecbdcecfacfaea9157267db4151d1b68e555a (diff) | |
download | gitlab-ce-a685624d27a99a4d7ee9d607fcf2ccbc85eb7fc7.tar.gz |
Merge wiki, wall & snippets under one tab - writeboards
Diffstat (limited to 'app/helpers/tab_helper.rb')
-rw-r--r-- | app/helpers/tab_helper.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb index 063a210cb2c..3465bf456f1 100644 --- a/app/helpers/tab_helper.rb +++ b/app/helpers/tab_helper.rb @@ -73,11 +73,19 @@ module TabHelper end def project_tab_class - [:files, :edit].each do |action| + return "active" if current_page?(controller: "projects", action: :edit, id: @project) + + if ['services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name + "active" + end + end + + def project_writeboards_tab_class + [:files, :wall].each do |action| return "active" if current_page?(controller: "projects", action: action, id: @project) end - if ['snippets', 'services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name + if ['wikis', 'snippets'].include? controller.controller_name "active" end end |