diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-29 02:26:47 +0300 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-29 02:26:47 +0300 |
commit | 9c2bd8b70eedc9969f5ba4c7fc1a7d96369e1438 (patch) | |
tree | 94aad324b952cf568e655e94755a5ff016f9959e /app/helpers/nav_helper.rb | |
parent | 0b030e00a15f849a5cbb2778a6b88c57a2e43d4b (diff) |
Sidebar collapse and expand work with whole page.
Diffstat (limited to 'app/helpers/nav_helper.rb')
-rw-r--r-- | app/helpers/nav_helper.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb index 20b89cc9db3..2c299d1d794 100644 --- a/app/helpers/nav_helper.rb +++ b/app/helpers/nav_helper.rb @@ -3,6 +3,18 @@ module NavHelper cookies[:collapsed_nav] == 'true' end + def sidebar_gutter_collapsed_class + if cookies[:collapsed_gutter] == 'true' + "right-sidebar-collapsed" + else + "right-sidebar-expanded" + end + end + + def sidebar_gutter_collapsed? + cookies[:collapsed_gutter] == 'true' + end + def nav_sidebar_class if nav_menu_collapsed? "sidebar-collapsed" @@ -20,8 +32,13 @@ module NavHelper end def page_gutter_class + if current_path?('merge_requests#show') || current_path?('issues#show') - "page-gutter" + if cookies[:collapsed_gutter] == 'true' + "page-gutter right-sidebar-collapsed" + else + "page-gutter right-sidebar-expanded" + end end end |