summaryrefslogtreecommitdiff
path: root/app/helpers/tab_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-19 20:05:30 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-19 20:05:30 +0200
commit324e57693b21339273a9b9cafd9d27348fcd0488 (patch)
tree026b35bfa58191c061634f34512d0af7e2b3bb37 /app/helpers/tab_helper.rb
parent55380e69fcd070751a26e368da55968fa3f57419 (diff)
downloadgitlab-ce-324e57693b21339273a9b9cafd9d27348fcd0488.tar.gz
Implement top navigation concept for profile area
Main idea is to keep left sidebar static so user is not confused by changing context. Instead we put changing navigation with changing content in one main block Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/tab_helper.rb')
-rw-r--r--app/helpers/tab_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb
index 04e53fe7c61..96a83671009 100644
--- a/app/helpers/tab_helper.rb
+++ b/app/helpers/tab_helper.rb
@@ -110,4 +110,12 @@ module TabHelper
'active'
end
end
+
+ def profile_tab_class
+ if controller.controller_path =~ /\Aprofiles/
+ return 'active'
+ end
+
+ 'active' if current_controller?('oauth/applications')
+ end
end