diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-22 16:48:39 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-22 16:48:39 +0300 |
commit | 4860c4dc07181b97e50558c43b1e35a97677beb8 (patch) | |
tree | e326669ce633215b46d6faa34d97433b463c6bd0 /app/helpers/nav_helper.rb | |
parent | 1e7c4a25fd08685b04dfb19db4f9b1015aaf904d (diff) | |
download | gitlab-ce-4860c4dc07181b97e50558c43b1e35a97677beb8.tar.gz |
Fix toggle of sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/nav_helper.rb')
-rw-r--r-- | app/helpers/nav_helper.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb index 2b03269800e..9b1dd8b8e54 100644 --- a/app/helpers/nav_helper.rb +++ b/app/helpers/nav_helper.rb @@ -2,4 +2,20 @@ module NavHelper def nav_menu_collapsed? cookies[:collapsed_nav] == 'true' end + + def nav_sidebar_class + if nav_menu_collapsed? + "page-sidebar-collapsed" + else + "page-sidebar-expanded" + end + end + + def nav_header_class + if nav_menu_collapsed? + "header-collapsed" + else + "header-expanded" + end + end end |