gitlab-org--gitlab-foss/app/helpers/nav_helper.rb
Dmitriy Zaporozhets 4860c4dc07
Fix toggle of sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-04-22 16:48:39 +03:00

21 lines
350 B
Ruby

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