diff options
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_head.html.haml | 22 | ||||
-rw-r--r-- | app/views/layouts/_page.html.haml | 1 | ||||
-rw-r--r-- | app/views/layouts/_startup_css.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/_startup_css_activation.haml | 1 | ||||
-rw-r--r-- | app/views/layouts/group.html.haml | 4 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/header/_new_dropdown.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/jira_connect.html.haml | 1 | ||||
-rw-r--r-- | app/views/layouts/nav/_dashboard.html.haml | 10 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_admin.html.haml | 9 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_group.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_project.html.haml | 10 | ||||
-rw-r--r-- | app/views/layouts/project.html.haml | 4 |
13 files changed, 39 insertions, 35 deletions
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 1c87452f0a3..6cc736e7056 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -42,35 +42,39 @@ %title= page_title(site_name) %meta{ name: "description", content: page_description } + - if page_canonical_link + %link{ rel: 'canonical', href: page_canonical_link } + = favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png' = render 'layouts/startup_css' - if user_application_theme == 'gl-dark' = stylesheet_link_tag_defer "application_dark" + = yield :page_specific_styles + = stylesheet_link_tag_defer "application_utilities_dark" - else = stylesheet_link_tag_defer "application" + = yield :page_specific_styles + = stylesheet_link_tag_defer "application_utilities" - unless use_startup_css? - = stylesheet_link_tag_defer "themes/theme_#{user_application_theme_name}" + = stylesheet_link_tag_defer "themes/#{user_application_theme_css_filename}" if user_application_theme_css_filename = stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations'] - = stylesheet_link_tag_defer 'performance_bar' if performance_bar_enabled? = stylesheet_link_tag_defer "highlight/themes/#{user_color_scheme}" = render 'layouts/startup_css_activation' - = Gon::Base.render_data(nonce: content_security_policy_nonce) + = stylesheet_link_tag 'performance_bar' if performance_bar_enabled? - - if content_for?(:library_javascripts) - = yield :library_javascripts + = Gon::Base.render_data(nonce: content_security_policy_nonce) = javascript_include_tag locale_path unless I18n.locale == :en = webpack_bundle_tag "sentry" if Gitlab.config.sentry.enabled + = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? - - if content_for?(:page_specific_javascripts) - = yield :page_specific_javascripts + = yield :page_specific_javascripts = webpack_controller_bundle_tags - = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? = webpack_bundle_tag "chrome_84_icon_fix" if browser.chrome?([">=84", "<84.0.4147.125"]) || browser.edge?([">=84", "<84.0.522.59"]) = yield :project_javascripts @@ -79,8 +83,6 @@ = csp_meta_tag = action_cable_meta_tag - - unless browser.safari? - %meta{ name: 'referrer', content: 'origin-when-cross-origin' } %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1' } %meta{ name: 'theme-color', content: '#474D57' } diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 5184bc93a81..9b925369660 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -19,7 +19,6 @@ = yield :customize_homepage_banner - unless @hide_breadcrumbs = render "layouts/nav/breadcrumbs" - .d-flex %div{ class: "#{(container_class unless @no_container)} #{@content_class}" } .content{ id: "content-body" } = render "layouts/flash", extra_flash_class: 'limit-container-width' diff --git a/app/views/layouts/_startup_css.haml b/app/views/layouts/_startup_css.haml index ea05157ed19..2f674f79b2f 100644 --- a/app/views/layouts/_startup_css.haml +++ b/app/views/layouts/_startup_css.haml @@ -3,5 +3,5 @@ - startup_filename = current_path?("sessions#new") ? 'signin' : user_application_theme == 'gl-dark' ? 'dark' : 'general' %style{ type: "text/css" } - = Rails.application.assets_manifest.find_sources("themes/theme_#{user_application_theme_name}.css").first.to_s.html_safe + = Rails.application.assets_manifest.find_sources("themes/#{user_application_theme_css_filename}.css").first.to_s.html_safe if user_application_theme_css_filename = Rails.application.assets_manifest.find_sources("startup/startup-#{startup_filename}.css").first.to_s.html_safe diff --git a/app/views/layouts/_startup_css_activation.haml b/app/views/layouts/_startup_css_activation.haml index 022b9a695bc..a426d686c34 100644 --- a/app/views/layouts/_startup_css_activation.haml +++ b/app/views/layouts/_startup_css_activation.haml @@ -7,4 +7,3 @@ const startupLinkLoadedEvent = new CustomEvent('CSSStartupLinkLoaded'); linkTag.addEventListener('load',function(){this.media='all';this.setAttribute('data-startupcss', 'loaded');document.dispatchEvent(startupLinkLoadedEvent);},{once: true}); }) -- return unless use_startup_css? diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml index 8f4c89a9e77..6d2c5870e43 100644 --- a/app/views/layouts/group.html.haml +++ b/app/views/layouts/group.html.haml @@ -1,6 +1,6 @@ - page_title @group.name -- page_description @group.description unless page_description -- header_title group_title(@group) unless header_title +- page_description @group.description_html unless page_description +- header_title group_title(@group) unless header_title - nav "group" - display_subscription_banner! - display_namespace_storage_limit_alert! diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 845231238f6..328c6031b24 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -73,7 +73,7 @@ %span.gl-sr-only = s_('Nav|Help') = sprite_icon('question') - = sprite_icon('angle-down', css_class: 'caret-down') + = sprite_icon('chevron-down', css_class: 'caret-down') .dropdown-menu.dropdown-menu-right = render 'layouts/header/help_dropdown' - if header_link?(:user_dropdown) @@ -81,7 +81,7 @@ = 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 - = sprite_icon('angle-down', css_class: 'caret-down') + = sprite_icon('chevron-down', css_class: 'caret-down') .dropdown-menu.dropdown-menu-right = render 'layouts/header/current_user_dropdown' - if has_impersonation_link @@ -100,7 +100,7 @@ = sprite_icon('close', size: 12, css_class: 'close-icon js-navbar-toggle-left') - if ::Feature.enabled?(:whats_new_drawer) - #whats-new-app{ data: { features: whats_new_most_recent_release_items } } + #whats-new-app{ data: { features: whats_new_most_recent_release_items, storage_key: whats_new_storage_key } } - if can?(current_user, :update_user_status, current_user) .js-set-status-modal-wrapper{ data: { current_emoji: current_user.status.present? ? current_user.status.emoji : '', current_message: current_user.status.present? ? current_user.status.message : '' } } diff --git a/app/views/layouts/header/_new_dropdown.haml b/app/views/layouts/header/_new_dropdown.haml index 0c989242194..2c5cd7e96c7 100644 --- a/app/views/layouts/header/_new_dropdown.haml +++ b/app/views/layouts/header/_new_dropdown.haml @@ -1,7 +1,7 @@ %li.header-new.dropdown{ data: { track_label: "new_dropdown", track_event: "click_dropdown", track_value: "" } } = link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", id: "js-onboarding-new-project-link", title: _("New..."), ref: 'tooltip', aria: { label: _("New...") }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static' } do = sprite_icon('plus-square') - = sprite_icon('angle-down', css_class: 'caret-down') + = sprite_icon('chevron-down', css_class: 'caret-down') .dropdown-menu.dropdown-menu-right %ul - if @group&.persisted? diff --git a/app/views/layouts/jira_connect.html.haml b/app/views/layouts/jira_connect.html.haml index fdeb3d3c9ac..17f6e9af61a 100644 --- a/app/views/layouts/jira_connect.html.haml +++ b/app/views/layouts/jira_connect.html.haml @@ -7,6 +7,7 @@ = stylesheet_link_tag 'https://unpkg.com/@atlaskit/reduced-ui-pack@10.5.5/dist/bundle.css' = javascript_include_tag 'https://connect-cdn.atl-paas.net/all.js' = javascript_include_tag 'https://unpkg.com/jquery@3.3.1/dist/jquery.min.js' + = yield :page_specific_styles = yield :head %body .ac-content diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index 40ea42091bd..abaadc89a9e 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -3,17 +3,17 @@ %ul.list-unstyled.navbar-sub-nav - if dashboard_nav_link?(:projects) = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: { id: 'nav-projects-dropdown', class: "home dropdown header-projects qa-projects-dropdown", data: { track_label: "projects_dropdown", track_event: "click_dropdown", track_value: "" } }) do - %button.btn{ type: 'button', data: { toggle: "dropdown" } } + %button{ type: 'button', data: { toggle: "dropdown" } } = _('Projects') - = sprite_icon('angle-down', css_class: 'caret-down') + = sprite_icon('chevron-down', css_class: 'caret-down') .dropdown-menu.frequent-items-dropdown-menu = render "layouts/nav/projects_dropdown/show" - if dashboard_nav_link?(:groups) = nav_link(controller: ['dashboard/groups', 'explore/groups'], html_options: { id: 'nav-groups-dropdown', class: "d-none d-md-block home dropdown header-groups qa-groups-dropdown", data: { track_label: "groups_dropdown", track_event: "click_dropdown", track_value: "" } }) do - %button.btn{ type: 'button', data: { toggle: "dropdown" } } + %button{ type: 'button', data: { toggle: "dropdown" } } = _('Groups') - = sprite_icon('angle-down', css_class: 'caret-down') + = sprite_icon('chevron-down', css_class: 'caret-down') .dropdown-menu.frequent-items-dropdown-menu = render "layouts/nav/groups_dropdown/show" @@ -21,7 +21,7 @@ %li.header-more.dropdown{ **tracking_attrs('main_navigation', 'click_more_link', 'navigation') } %a{ href: "#", data: { toggle: "dropdown", qa_selector: 'more_dropdown' } } = _('More') - = sprite_icon('angle-down', css_class: 'caret-down') + = sprite_icon('chevron-down', css_class: 'caret-down') .dropdown-menu %ul - if dashboard_nav_link?(:groups) diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index cb5277c02f0..0da4d4f7ddd 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -260,10 +260,11 @@ = link_to general_admin_application_settings_path, title: _('General'), class: 'qa-admin-settings-general-item' do %span = _('General') - = nav_link(path: ['application_settings#integrations', 'integrations#edit']) do - = link_to integrations_admin_application_settings_path, title: _('Integrations'), data: { qa_selector: 'integration_settings_link' } do - %span - = _('Integrations') + - if instance_level_integrations? + = nav_link(path: ['application_settings#integrations', 'integrations#edit']) do + = link_to integrations_admin_application_settings_path, title: _('Integrations'), data: { qa_selector: 'integration_settings_link' } do + %span + = _('Integrations') = nav_link(path: 'application_settings#repository') do = link_to repository_admin_application_settings_path, title: _('Repository'), class: 'qa-admin-settings-repository-item' do %span diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index 9e9e6493e5b..5f4b1f8ad45 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -139,6 +139,8 @@ %strong.fly-out-top-item-name = _('Members') + = render_if_exists 'groups/invite_members_side_nav_link', group: @group + - if group_sidebar_link?(:settings) = nav_link(path: group_settings_nav_link_paths) do = link_to edit_group_path(@group) do diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 0eef587d7c7..c11afc8e4ca 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -235,11 +235,11 @@ %span = _('Alerts') - - if project_nav_tab?(:incidents) - = nav_link(controller: :incidents) do - = link_to project_incidents_path(@project), title: _('Incidents'), data: { qa_selector: 'operations_incidents_link' } do - %span - = _('Incidents') + - if project_nav_tab?(:incidents) + = nav_link(controller: :incidents) do + = link_to project_incidents_path(@project), title: _('Incidents'), data: { qa_selector: 'operations_incidents_link' } do + %span + = _('Incidents') - if project_nav_tab? :environments = render_if_exists "layouts/nav/sidebar/tracing_link" diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 222ca02b1df..a0c82380023 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -1,6 +1,6 @@ - page_title @project.full_name -- page_description @project.description unless page_description -- header_title project_title(@project) unless header_title +- page_description @project.description_html unless page_description +- header_title project_title(@project) unless header_title - nav "project" - display_subscription_banner! - display_namespace_storage_limit_alert! |