diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-15 03:12:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-15 03:12:58 +0300 |
commit | 45465a1f217b65ee3b11870175f363afaf912eb9 (patch) | |
tree | 0f4103ad51619ed03fc47cc28e32df3fb57b5c0c /app/views/layouts | |
parent | 046498496e140f96beb63ff45ec9b0bb9acdbdd3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/application.html.haml | 7 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 23 | ||||
-rw-r--r-- | app/views/layouts/header/_gitlab_version.html.haml | 20 | ||||
-rw-r--r-- | app/views/layouts/header/_help_dropdown.html.haml | 25 | ||||
-rw-r--r-- | app/views/layouts/header/_new_dropdown.html.haml | 38 | ||||
-rw-r--r-- | app/views/layouts/header/_title.html.haml | 8 | ||||
-rw-r--r-- | app/views/layouts/header/_whats_new_dropdown_item.html.haml | 5 |
7 files changed, 2 insertions, 124 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 5a66cc0ddb5..78fa40167f8 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -12,11 +12,8 @@ = render 'peek/bar' = header_message - - if show_super_sidebar? - - if !current_user - = render partial: "layouts/header/super_sidebar_logged_out" - - else - = render partial: "layouts/header/default", locals: { project: @project, group: @group } + - if !current_user + = render partial: "layouts/header/super_sidebar_logged_out" = render 'layouts/page', sidebar: sidebar, nav: nav = footer_message diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml deleted file mode 100644 index 7f7758d4081..00000000000 --- a/app/views/layouts/header/_default.html.haml +++ /dev/null @@ -1,23 +0,0 @@ -%header.navbar.navbar-gitlab.navbar-expand-sm.js-navbar.legacy-top-bar{ data: { testid: 'navbar' } } - %a.gl-sr-only.gl-accessibility{ href: "#content-body" } Skip to content - .container-fluid - .header-content.js-header-content - .title-container.gl-transition-medium.gl-display-flex.gl-align-items-stretch.gl-pt-0.gl-mr-3 - = render 'layouts/header/title' - - .navbar-collapse.gl-transition-medium.collapse - %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' - %li.nav-item.header-help.dropdown.d-none.d-md-block - = link_to help_path, class: 'header-help-dropdown-toggle gl-relative', data: { toggle: "dropdown", track_action: 'click_question_mark_link', track_label: 'main_navigation', track_property: 'navigation_top' } do - %span.gl-sr-only - = s_('Nav|Help') - = sprite_icon('question-o') - %span.notification-dot.rounded-circle.gl-absolute - = sprite_icon('chevron-down', css_class: 'caret-down') - .dropdown-menu.dropdown-menu-right - = render 'layouts/header/help_dropdown' - -- if display_whats_new? - #whats-new-app{ data: { version_digest: whats_new_version_digest } } diff --git a/app/views/layouts/header/_gitlab_version.html.haml b/app/views/layouts/header/_gitlab_version.html.haml deleted file mode 100644 index 22771ac09c9..00000000000 --- a/app/views/layouts/header/_gitlab_version.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -- return unless show_version_check? - -%a{ - class: 'gl-display-flex! gl-flex-direction-column gl-px-4! gl-py-3! gl-line-height-24!', - href: help_page_path('update/index'), - data: { - testid: 'gitlab-version-container', - track_action: 'click_link', - track_label: 'version_help_dropdown', - track_property: 'navigation_top' - } - } - %span - = s_("VersionCheck|Your GitLab Version") - = emoji_icon('rocket') - %span - %span.gl-font-sm.gl-text-gray-500 - #{Gitlab.version_info.major}.#{Gitlab.version_info.minor} - %span.gl-ml-2 - .js-gitlab-version-check-badge{ data: { "size": "sm", "version": gitlab_version_check.to_json } } diff --git a/app/views/layouts/header/_help_dropdown.html.haml b/app/views/layouts/header/_help_dropdown.html.haml deleted file mode 100644 index 38b9a9a5383..00000000000 --- a/app/views/layouts/header/_help_dropdown.html.haml +++ /dev/null @@ -1,25 +0,0 @@ -%ul - - if current_user_menu?(:help) - %li - = render 'layouts/header/gitlab_version' - = render 'layouts/header/whats_new_dropdown_item' - %li - = link_to _("Help"), help_path, data: {track_action: 'click_link', track_label: 'help', track_property: 'navigation_top'} - %li - = link_to _("Support"), support_url, data: {track_action: 'click_link', track_label: 'support', track_property: 'navigation_top'} - %li - = render 'shared/help_dropdown_forum_link' - %li - %button.js-shortcuts-modal-trigger{ type: "button", data: {track_action: 'click_button', track_label: 'keyboard_shortcuts_help', track_property: 'navigation_top'} } - = _("Keyboard shortcuts") - %kbd.flat.float-right{ "aria-hidden": "true" }= '?'.html_safe - %li.divider - %li - = link_to _("Submit feedback"), "https://about.gitlab.com/submit-feedback", data: {track_action: 'click_link', track_label: 'submit_feedback', track_property: 'navigation_top'} - - if current_user_menu?(:help) || current_user_menu?(:settings) || current_user_menu?(:profile) - %li - = render 'shared/user_dropdown_contributing_link' - = render 'shared/user_dropdown_instance_review' - - if Gitlab.com_but_not_canary? - %li - = link_to _("Switch to GitLab Next"), Gitlab::Saas.canary_toggle_com_url, data: {track_action: 'click_link', track_label: 'gitlab_next', track_property: 'navigation_top'} diff --git a/app/views/layouts/header/_new_dropdown.html.haml b/app/views/layouts/header/_new_dropdown.html.haml deleted file mode 100644 index 3fe2894f236..00000000000 --- a/app/views/layouts/header/_new_dropdown.html.haml +++ /dev/null @@ -1,38 +0,0 @@ -- view_model = new_dropdown_view_model(project: @project, group: @group) -- menu_sections = view_model.fetch(:menu_sections) -- title = view_model.fetch(:title) -- show_headers = menu_sections.length > 1 -- top_class = local_assigns.fetch(:class, nil) - -- return if menu_sections.empty? - -%li.header-new.gl-flex-grow-1.gl-flex-shrink-1.dropdown{ class: top_class, - data: { track_label: "new_dropdown", track_action: "click_dropdown", track_property: "navigation_top" } } - = link_to new_project_path, - class: "header-new-dropdown-toggle has-tooltip gl-display-flex", - id: "js-onboarding-new-project-link", - title: title, ref: 'tooltip', aria: { label: title }, - data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static', - testid: 'new-menu-toggle' } do - = sprite_icon('plus-square') - = sprite_icon('chevron-down', css_class: 'caret-down') - .dropdown-menu.dropdown-menu-right.dropdown-extended-height - %ul - - menu_sections.each_with_index do |section, index| - - if index > 0 - %li.divider - - if show_headers - %li.dropdown-bold-header - = section.fetch(:title) - - section.fetch(:menu_items).each do |menu_item| - %li< - - if menu_item.fetch(:partial).present? - = render partial: menu_item.fetch(:partial), - locals: { display_text: menu_item.fetch(:title), - icon: menu_item.fetch(:icon), - data: menu_item.fetch(:data) } - - else - = link_to menu_item.fetch(:title), - menu_item.fetch(:href), - class: menu_item.fetch(:css_class), - data: menu_item.fetch(:data) diff --git a/app/views/layouts/header/_title.html.haml b/app/views/layouts/header/_title.html.haml deleted file mode 100644 index 59141cfa2a3..00000000000 --- a/app/views/layouts/header/_title.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -.title - %span.gl-sr-only GitLab - = link_to root_path, title: _('Homepage'), id: 'logo', class: 'has-tooltip', aria: { label: _('Homepage') }, **tracking_attrs('main_navigation', 'click_gitlab_logo_link', 'navigation_top') do - = brand_header_logo - .gl-display-flex.gl-align-items-center - - if Gitlab.com_and_canary? - = gl_badge_tag({ variant: :success, size: :sm }, { href: Gitlab::Saas.canary_toggle_com_url, data: { testid: 'canary_badge_link' }, target: :_blank, rel: 'noopener noreferrer', class: 'canary-badge' }) do - = _('Next') diff --git a/app/views/layouts/header/_whats_new_dropdown_item.html.haml b/app/views/layouts/header/_whats_new_dropdown_item.html.haml deleted file mode 100644 index 6473d9c8dd4..00000000000 --- a/app/views/layouts/header/_whats_new_dropdown_item.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- if display_whats_new? - %li - %button.gl-justify-content-space-between.gl-align-items-center.js-whats-new-trigger{ type: 'button', class: 'gl-display-flex!' } - = _("What's new") - = gl_badge_tag whats_new_most_recent_release_items_count, { size: :sm }, { class: 'js-whats-new-notification-count' } |