diff options
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_google_tag_manager_head.html.haml | 15 | ||||
-rw-r--r-- | app/views/layouts/_page.html.haml | 1 | ||||
-rw-r--r-- | app/views/layouts/devise.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/fullscreen.html.haml | 18 | ||||
-rw-r--r-- | app/views/layouts/group.html.haml | 5 | ||||
-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 | ||||
-rw-r--r-- | app/views/layouts/nav/_top_nav.html.haml | 7 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_admin.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/profile.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/project.html.haml | 4 |
12 files changed, 55 insertions, 46 deletions
diff --git a/app/views/layouts/_google_tag_manager_head.html.haml b/app/views/layouts/_google_tag_manager_head.html.haml index f5c823465be..97e118aba93 100644 --- a/app/views/layouts/_google_tag_manager_head.html.haml +++ b/app/views/layouts/_google_tag_manager_head.html.haml @@ -6,19 +6,20 @@ function gtag(){dataLayer.push(arguments);} gtag('consent', 'default', { - 'analytics_storage': 'denied', - 'ad_storage': 'denied', - 'functionality_storage': 'denied', - 'region': ['EU', 'UK', 'PE', 'RU'], - 'wait_for_update': 500 - }); - gtag('consent', 'default', { 'analytics_storage': 'granted', 'ad_storage': 'granted', 'functionality_storage': 'granted', 'wait_for_update': 500 }); + gtag('consent', 'default', { + 'analytics_storage': 'denied', + 'ad_storage': 'denied', + 'functionality_storage': 'denied', + 'region': ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'IS', 'LI', 'NO', 'GB', 'PE', 'RU'], + 'wait_for_update': 500 + }); + - if Feature.enabled?(:gtm_nonce, type: :ops) = javascript_tag nonce: content_security_policy_nonce do :plain diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 59d4c81358d..014e26c7613 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -27,6 +27,7 @@ %div{ class: "#{(container_class unless @no_container)} #{@content_class}" } %main.content{ id: "content-body", **page_itemtype } = render "layouts/flash", extra_flash_class: 'limit-container-width' + = yield :after_flash_content = yield :before_content = yield = yield :after_content diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml index 87a8b6dd870..6650e07be2a 100644 --- a/app/views/layouts/devise.html.haml +++ b/app/views/layouts/devise.html.haml @@ -18,10 +18,10 @@ = current_appearance&.title.presence || _('GitLab') - if current_appearance&.description? = brand_text + = render_if_exists 'layouts/devise_help_text' .mb-3 .gl-w-half.gl-xs-w-full.gl-ml-auto.gl-mr-auto.bar = yield - = render_if_exists 'layouts/devise_help_text' = render 'devise/shared/footer', footer_message: footer_message diff --git a/app/views/layouts/fullscreen.html.haml b/app/views/layouts/fullscreen.html.haml index 2a865aeda40..61a57240ed5 100644 --- a/app/views/layouts/fullscreen.html.haml +++ b/app/views/layouts/fullscreen.html.haml @@ -6,12 +6,16 @@ = header_message = render partial: "layouts/header/default", locals: { project: @project, group: @group } .mobile-overlay - .alert-wrapper.hide-when-top-nav-responsive-open - = render 'shared/outdated_browser' - = render "layouts/broadcast" - = yield :flash_message - = render "layouts/flash" - .content-wrapper.hide-when-top-nav-responsive-open{ id: "content-body", class: "d-flex flex-column align-items-stretch" } - = yield + .hide-when-top-nav-responsive-open.gl--flex-full.gl-h-full{ class: nav ? ["layout-page", page_with_sidebar_class, "gl-mt-0!"]: '' } + - if defined?(nav) && nav + = render "layouts/nav/sidebar/#{nav}" + .gl--flex-full.gl-flex-direction-column.gl-w-full + .alert-wrapper + = render 'shared/outdated_browser' + = render "layouts/broadcast" + = yield :flash_message + = render "layouts/flash" + .content-wrapper{ id: "content-body", class: "d-flex flex-column align-items-stretch" } + = yield = render "layouts/nav/top_nav_responsive", class: "gl-flex-grow-1 gl-overflow-y-auto" = footer_message diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml index 67809cbc608..97c2b8bb7e3 100644 --- a/app/views/layouts/group.html.haml +++ b/app/views/layouts/group.html.haml @@ -4,9 +4,10 @@ - nav "group" - display_subscription_banner! - @left_sidebar = true +- base_layout = local_assigns[:base_layout] - content_for :flash_message do - = render "layouts/header/storage_enforcement_banner", context: @group + = dispensable_render_if_exists "groups/storage_enforcement_alert", context: @group = dispensable_render_if_exists "shared/namespace_storage_limit_alert", context: @group - content_for :page_specific_javascripts do @@ -15,4 +16,4 @@ :plain window.uploads_path = "#{group_uploads_path(@group)}"; -= render template: "layouts/application" += render template: base_layout || "layouts/application" 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] diff --git a/app/views/layouts/nav/_top_nav.html.haml b/app/views/layouts/nav/_top_nav.html.haml index 42119ddb291..aa1c462d2bf 100644 --- a/app/views/layouts/nav/_top_nav.html.haml +++ b/app/views/layouts/nav/_top_nav.html.haml @@ -1,9 +1,10 @@ - view_model = top_nav_view_model(project: @project, group: @group) -%ul.list-unstyled.navbar-sub-nav#js-top-nav{ data: { view_model: view_model.to_json } } +%ul.list-unstyled.nav.navbar-sub-nav#js-top-nav{ data: { view_model: view_model.to_json } } %li %a.top-nav-toggle{ href: '#', type: 'button', data: { toggle: "dropdown" } } - = sprite_icon('hamburger', css_class: "dropdown-icon") - = view_model[:activeTitle] + = sprite_icon('hamburger') + - if view_model[:menuTitle] + .gl-ml-3= view_model[:menuTitle] .hidden - view_model[:shortcuts].each do |shortcut| diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index f3f79750643..56f333664df 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -175,7 +175,7 @@ %strong.fly-out-top-item-name = _('Kubernetes') - - if akismet_enabled? + - if anti_spam_service_enabled? = nav_link(controller: :spam_logs) do = link_to admin_spam_logs_path do .nav-icon-container diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 1ec839ef642..1b6e78b7b3d 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -7,7 +7,7 @@ - enable_search_settings locals: { container_class: 'gl-my-5' } - content_for :flash_message do - = render "layouts/header/storage_enforcement_banner", context: current_user.namespace + = dispensable_render_if_exists "profiles/storage_enforcement_alert", context: current_user.namespace = dispensable_render_if_exists "shared/namespace_storage_limit_alert", context: current_user.namespace = render template: "layouts/application" diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 9503e874fd0..75d5e40011c 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -8,7 +8,7 @@ - @content_class = [@content_class, project_classes(@project)].compact.join(" ") - content_for :flash_message do - = render "layouts/header/storage_enforcement_banner", context: @project + = dispensable_render_if_exists "projects/storage_enforcement_alert", context: @project = dispensable_render_if_exists "shared/namespace_storage_limit_alert", context: @project - content_for :project_javascripts do @@ -18,4 +18,6 @@ :plain window.uploads_path = "#{project_uploads_path(project)}"; += dispensable_render_if_exists "shared/web_hooks/web_hook_disabled_alert" + = render template: "layouts/application" |