diff options
Diffstat (limited to 'app/views/layouts/header')
-rw-r--r-- | app/views/layouts/header/_current_user_dropdown.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 28 | ||||
-rw-r--r-- | app/views/layouts/header/_storage_enforcement_banner.html.haml | 15 |
3 files changed, 22 insertions, 23 deletions
diff --git a/app/views/layouts/header/_current_user_dropdown.html.haml b/app/views/layouts/header/_current_user_dropdown.html.haml index 353f07c07c5..00e7a0567da 100644 --- a/app/views/layouts/header/_current_user_dropdown.html.haml +++ b/app/views/layouts/header/_current_user_dropdown.html.haml @@ -37,7 +37,7 @@ %li.d-md-none = render 'shared/help_dropdown_forum_link' %li.d-md-none - = link_to _("Submit feedback"), "https://about.gitlab.com/submit-feedback" + = link_to _("Submit feedback"), Gitlab::Utils.append_path(promo_url, "submit-feedback") - if current_user_menu?(:help) || current_user_menu?(:settings) || current_user_menu?(:profile) %li.d-md-none = render 'shared/user_dropdown_contributing_link' diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 783733bb313..a00c5c186cc 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -5,15 +5,15 @@ %a.gl-sr-only.gl-accessibility{ href: "#content-body" } Skip to content .container-fluid .header-content.js-header-content - .title-container.hide-when-top-nav-responsive-open.gl-transition-medium.gl-display-flex.gl-align-items-stretch.gl-pt-0 + .title-container.hide-when-top-nav-responsive-open.gl-transition-medium.gl-display-flex.gl-align-items-stretch.gl-pt-0.gl-mr-3 .title %span.gl-sr-only GitLab = link_to root_path, title: _('Dashboard'), id: 'logo', class: 'has-tooltip', **tracking_attrs('main_navigation', 'click_gitlab_logo_link', 'navigation') do = brand_header_logo + .gl-display-flex.gl-align-items-center - if Gitlab.com_and_canary? - = link_to Gitlab::Saas.canary_toggle_com_url, class: 'canary-badge bg-transparent', data: { qa_selector: 'canary_badge_link' }, target: :_blank, rel: 'noopener noreferrer' do - = gl_badge_tag({ variant: :success, size: :sm }) do - = _('Next') + = gl_badge_tag({ variant: :success, size: :sm }, { href: Gitlab::Saas.canary_toggle_com_url, data: { qa_selector: 'canary_badge_link' }, target: :_blank, rel: 'noopener noreferrer', class: 'canary-badge' }) do + = _('Next') - if current_user .gl-display-none.gl-sm-display-block @@ -28,11 +28,25 @@ .gl-display-none.gl-sm-display-block = render "layouts/nav/top_nav" - .navbar-collapse.gl-transition-medium.collapse + - if top_nav_show_search && Feature.enabled?(:new_navbar_layout) + .navbar-collapse.gl-transition-medium.collapse.gl-mr-auto.global-search-container.hide-when-top-nav-responsive-open + - search_menu_item = top_nav_search_menu_item_attrs + %ul.nav.navbar-nav.gl-w-full.gl-align-items-center + %li.nav-item.header-search-new.gl-display-none.gl-lg-display-block.gl-w-full + - unless current_controller?(:search) + - if Feature.enabled?(:new_header_search) + = render 'layouts/header_search' + - else + = render 'layouts/search' + %li.nav-item{ class: 'd-none d-sm-inline-block d-lg-none' } + = link_to search_menu_item.fetch(:href), title: search_menu_item.fetch(:title), aria: { label: search_menu_item.fetch(:title) }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = sprite_icon(search_menu_item.fetch(:icon)) + + .navbar-collapse.gl-transition-medium.collapse{ class: ('global-search-container' unless Feature.enabled?(:new_navbar_layout)) } %ul.nav.navbar-nav.gl-w-full.gl-align-items-center.gl-justify-content-end - if current_user = render 'layouts/header/new_dropdown', class: 'gl-display-none gl-sm-display-block gl-white-space-nowrap gl-text-right' - - if top_nav_show_search + - if top_nav_show_search && Feature.disabled?(:new_navbar_layout) - search_menu_item = top_nav_search_menu_item_attrs %li.nav-item.header-search-new.gl-display-none.gl-lg-display-block.gl-w-full - unless current_controller?(:search) @@ -116,7 +130,7 @@ = render "layouts/nav/top_nav" - e.control {} - if header_link?(:user_dropdown) - %li.nav-item.header-user.js-nav-user-dropdown.dropdown{ data: { track_label: "profile_dropdown", track_action: "click_dropdown", track_value: "", qa_selector: 'user_menu' }, class: ('mr-0' if has_impersonation_link) } + %li.nav-item.header-user.js-nav-user-dropdown.dropdown{ data: { track_label: "profile_dropdown", track_action: "click_dropdown", track_value: "", qa_selector: 'user_menu', testid: 'user-menu' }, class: ('mr-0' if has_impersonation_link) } = link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do = image_tag avatar_icon_for_user(current_user, 23), width: 23, height: 23, class: "header-user-avatar qa-user-avatar", alt: current_user.name = render_if_exists 'layouts/header/user_notification_dot', project: project, namespace: group diff --git a/app/views/layouts/header/_storage_enforcement_banner.html.haml b/app/views/layouts/header/_storage_enforcement_banner.html.haml deleted file mode 100644 index 1f7060f8235..00000000000 --- a/app/views/layouts/header/_storage_enforcement_banner.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -- return unless current_user -- context = local_assigns.fetch(:context) -- banner_info = storage_enforcement_banner_info(context) -- return unless banner_info.present? - -= render Pajamas::AlertComponent.new(variant: :warning, - alert_options: { class: 'js-storage-enforcement-banner', - data: { feature_id: banner_info[:callouts_feature_name], - dismiss_endpoint: banner_info[:callouts_path], - group_id: banner_info[:namespace_id], - defer_links: "true" }}) do |c| - = c.body do - %p= banner_info[:text_paragraph_1] - %p= banner_info[:text_paragraph_2] - %p= banner_info[:text_paragraph_3] |