diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-08-16 18:29:04 -0500 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2017-08-16 18:29:04 -0500 |
commit | a3fbe3fedeb700f43bfa0de7e9113b3cff943c4e (patch) | |
tree | 4075549fa4b898c1187e8adecd112cea50ee880b /app/helpers | |
parent | 72d5165bd57472692c77d6a9d159e65058513bf3 (diff) | |
download | gitlab-ce-revert-merge-request-9199.tar.gz |
WIP: Revert "Merge branch '26200-convert-sidebar-to-dropdown' into 'master'"revert-merge-request-9199
This reverts commit aa792b91bbddeeb61ce77f9525fcaf238a9ad331, reversing
changes made to 5d8f5328baca93b9134f10ae593e71834578a9f8.
Conflicts:
app/assets/javascripts/application.js
app/assets/javascripts/right_sidebar.js
app/assets/stylesheets/framework.scss
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/print.scss
app/controllers/profiles/preferences_controller.rb
app/helpers/nav_helper.rb
app/models/user.rb
app/views/layouts/_page.html.haml
app/views/layouts/application.html.haml
app/views/layouts/header/_default.html.haml
app/views/layouts/nav/_dashboard.html.haml
app/views/profiles/preferences/show.html.haml
db/schema.rb
doc/api/users.md
spec/features/dashboard/active_tab_spec.rb
spec/features/dashboard/issuables_counter_spec.rb
spec/features/dashboard/shortcuts_spec.rb
spec/features/profiles/preferences_spec.rb
spec/fixtures/api/schemas/user/public.json
spec/models/user_spec.rb
Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
On branch revert-merge-request-9199
You are currently reverting commit aa792b91bb.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/nav_helper.rb | 19 | ||||
-rw-r--r-- | app/helpers/preferences_helper.rb | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb index b63b3b70903..dad4c1f666a 100644 --- a/app/helpers/nav_helper.rb +++ b/app/helpers/nav_helper.rb @@ -1,10 +1,17 @@ module NavHelper +<<<<<<< HEAD def page_with_sidebar_class class_name = page_gutter_class class_name << 'page-with-new-sidebar' if defined?(@new_sidebar) && @new_sidebar class_name << 'page-with-icon-sidebar' if collapsed_sidebar? && @new_sidebar class_name +======= + def page_sidebar_class + if pinned_nav? + "page-sidebar-expanded page-sidebar-pinned" + end +>>>>>>> parent of aa792b91bb... Merge branch '26200-convert-sidebar-to-dropdown' into 'master' end def page_gutter_class @@ -34,7 +41,15 @@ module NavHelper class_names = [] class_names << 'with-horizontal-nav' if defined?(nav) && nav +<<<<<<< HEAD class_names +======= + if pinned_nav? + class_name << " header-sidebar-expanded header-sidebar-pinned" + end + + class_name +>>>>>>> parent of aa792b91bb... Merge branch '26200-convert-sidebar-to-dropdown' into 'master' end def layout_nav_class @@ -50,4 +65,8 @@ module NavHelper def nav_control_class "nav-control" if current_user end + + def pinned_nav? + cookies[:pin_nav] == 'true' + end end diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index d36bb4ab074..64605908c05 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -40,6 +40,10 @@ module PreferencesHelper ] end + def user_application_theme + Gitlab::Themes.for_user(current_user).css_class + end + def user_color_scheme Gitlab::ColorSchemes.for_user(current_user).css_class end |