diff options
author | Dennis Tang <dennis@dennistang.net> | 2018-10-18 13:27:04 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-10-18 13:27:04 +0000 |
commit | dc6ab436efb1cd78da5d340653d48dc12cdc49c0 (patch) | |
tree | 48fad9e99567a2c015cfe894f675e9110ba8a402 /app/views/layouts | |
parent | 054d900ed93c72c9750db485a132d401c28012fa (diff) | |
download | gitlab-ce-dc6ab436efb1cd78da5d340653d48dc12cdc49c0.tar.gz |
Resolve "Re-arrange help-related user menu items into new Help menu"
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/header/_current_user_dropdown.html.haml | 7 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/header/_help_dropdown.html.haml | 6 |
3 files changed, 13 insertions, 6 deletions
diff --git a/app/views/layouts/header/_current_user_dropdown.html.haml b/app/views/layouts/header/_current_user_dropdown.html.haml index 261d758622b..648124d3870 100644 --- a/app/views/layouts/header/_current_user_dropdown.html.haml +++ b/app/views/layouts/header/_current_user_dropdown.html.haml @@ -19,12 +19,7 @@ - if current_user_menu?(:settings) %li = link_to s_("CurrentUser|Settings"), profile_path - - if current_user_menu?(:help) - %li - = link_to _("Help"), help_path - - if current_user_menu?(:help) || current_user_menu?(:settings) || current_user_menu?(:profile) - %li.divider - = render 'shared/user_dropdown_contributing_link' - if current_user_menu?(:sign_out) + %li.divider %li = link_to _("Sign out"), destroy_user_session_path, class: "sign-out-link" diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 39604611440..596fc3985b3 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -53,6 +53,12 @@ = sprite_icon('todo-done', size: 16) %span.badge.badge-pill.todos-count{ class: ('hidden' if todos_pending_count.zero?) } = todos_count_format(todos_pending_count) + %li.nav-item.header-help.dropdown + = link_to help_path, class: 'header-help-dropdown-toggle', data: { toggle: "dropdown" } do + = sprite_icon('question', size: 16) + = sprite_icon('angle-down', css_class: 'caret-down') + .dropdown-menu.dropdown-menu-right + = render 'layouts/header/help_dropdown' - if header_link?(:user_dropdown) %li.nav-item.header-user.dropdown = link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do diff --git a/app/views/layouts/header/_help_dropdown.html.haml b/app/views/layouts/header/_help_dropdown.html.haml new file mode 100644 index 00000000000..953c0e7f46c --- /dev/null +++ b/app/views/layouts/header/_help_dropdown.html.haml @@ -0,0 +1,6 @@ +%ul + - if current_user_menu?(:help) + %li + = link_to _("Help"), help_path + - if current_user_menu?(:help) || current_user_menu?(:settings) || current_user_menu?(:profile) + = render 'shared/user_dropdown_contributing_link' |