diff options
author | Rémy Coutable <remy@rymai.me> | 2016-02-15 17:19:23 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-15 17:40:24 +0300 |
commit | 54613b6af56008588a3cc8a9e9f2ee642ca59a36 (patch) | |
tree | 1e5c08d6ce26d4fb839302eac3911ba59f227cd9 /app/helpers/nav_helper.rb | |
parent | c29517aaf420b0d83f21d468b371260f4887cf00 (diff) |
Fix the "x of y" displayed at the top of Issuables' sidebar
1. We now display the index of the current issuable among all its project's
issuables, of the same type and with the same state.
2. Also, refactored a bit the Issuable helpers into a new IssuablesHelper
module.
3. Added acceptance specs for the sidebar counter.
Diffstat (limited to 'app/helpers/nav_helper.rb')
-rw-r--r-- | app/helpers/nav_helper.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb index 75f2ed5e054..29cb753e62c 100644 --- a/app/helpers/nav_helper.rb +++ b/app/helpers/nav_helper.rb @@ -3,18 +3,6 @@ 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" @@ -32,9 +20,9 @@ module NavHelper end def page_gutter_class - if current_path?('merge_requests#show') || - current_path?('merge_requests#diffs') || - current_path?('merge_requests#commits') || + if current_path?('merge_requests#show') || + current_path?('merge_requests#diffs') || + current_path?('merge_requests#commits') || current_path?('issues#show') if cookies[:collapsed_gutter] == 'true' "page-gutter right-sidebar-collapsed" |