diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/views/layouts | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/views/layouts')
21 files changed, 119 insertions, 93 deletions
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 7aa57331c51..8b430f579e9 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -79,6 +79,9 @@ = favicon_link_tag 'touch-icon-ipad-retina.png', rel: 'apple-touch-icon', sizes: '152x152' %link{ rel: 'mask-icon', href: image_path('logo.svg'), color: 'rgb(226, 67, 41)' } + -# OpenSearch + %link{ href: search_opensearch_path(format: :xml), rel: 'search', title: 'Search GitLab', type: 'application/opensearchdescription+xml' } + -# Windows 8 pinned site tile %meta{ name: 'msapplication-TileImage', content: image_path('msapplication-tile.png') } %meta{ name: 'msapplication-TileColor', content: '#30353E' } diff --git a/app/views/layouts/_matomo.html.haml b/app/views/layouts/_matomo.html.haml index fcd3156a162..81721baba64 100644 --- a/app/views/layouts/_matomo.html.haml +++ b/app/views/layouts/_matomo.html.haml @@ -4,6 +4,7 @@ var _paq = window._paq = window._paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); + #{extra_config.matomo_disable_cookies ? '_paq.push(["disableCookies"])' : ""}; (function() { var u="//#{extra_config.matomo_url}/"; _paq.push(['setTrackerUrl', u+'matomo.php']); diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index c552454caa7..1f2fcd1c70b 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -22,6 +22,7 @@ - unless @hide_breadcrumbs = render "layouts/nav/breadcrumbs" %div{ class: "#{(container_class unless @no_container)} #{@content_class}" } - .content{ id: "content-body", **page_itemtype } + %main.content{ id: "content-body", **page_itemtype } = render "layouts/flash", extra_flash_class: 'limit-container-width' + = yield :before_content = yield diff --git a/app/views/layouts/_startup_css.haml b/app/views/layouts/_startup_css.haml index 35b91c8d35e..7d3cfe28007 100644 --- a/app/views/layouts/_startup_css.haml +++ b/app/views/layouts/_startup_css.haml @@ -1,5 +1,5 @@ - startup_filename = current_path?("sessions#new") ? 'signin' : user_application_theme == 'gl-dark' ? 'dark' : 'general' -%style{ type: "text/css" } +%style = 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/admin.html.haml b/app/views/layouts/admin.html.haml index 31259b8ac25..85fff22a3b7 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -3,4 +3,9 @@ - nav "admin" - @left_sidebar = true +-# This active_nav_link check is also used in `app/views/layouts/nav/sidebar/_admin.html.haml` +- is_application_settings = active_nav_link?(controller: [:application_settings, :integrations]) + +- enable_search_settings if is_application_settings + = render template: "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 d7ca93a296b..5ac0db4137f 100644 --- a/app/views/layouts/header/_current_user_dropdown.html.haml +++ b/app/views/layouts/header/_current_user_dropdown.html.haml @@ -2,18 +2,12 @@ %ul %li.current-user - .user-name.gl-font-weight-bold - = current_user.name - - if current_user&.status && user_status_set_to_busy?(current_user.status) - %span.gl-font-weight-normal.gl-text-gray-500= s_("UserProfile|(Busy)") - = current_user.to_reference - - if current_user.status - .user-status.d-flex.align-items-center.gl-mt-2.has-tooltip{ title: current_user.status.message_html, data: { html: 'true', placement: 'bottom' } } - - if show_status_emoji?(current_user.status) - .user-status-emoji.d-flex.align-items-center - = emoji_icon current_user.status.emoji - %span.user-status-message.str-truncated - = current_user.status.message_html.html_safe + - if current_user_menu?(:profile) + = link_to current_user, class: 'gl-line-height-20!', data: { user: current_user.username, testid: 'user-profile-link' } do + = render 'layouts/header/current_user_dropdown_item' + - else + .gl-py-3.gl-px-4 + = render 'layouts/header/current_user_dropdown_item' %li.divider - if can?(current_user, :update_user_status, current_user) %li @@ -22,17 +16,16 @@ = s_('SetStatusModal|Edit status') - else = s_('SetStatusModal|Set status') - - if current_user_menu?(:profile) - %li - = link_to s_("CurrentUser|Profile"), current_user, class: 'profile-link', data: { user: current_user.username } - if current_user_menu?(:start_trial) %li %a.trial-link{ href: trials_link_url } - = s_("CurrentUser|Start a Gold trial") + = s_("CurrentUser|Start an Ultimate trial") = emoji_icon('rocket') - if current_user_menu?(:settings) %li - = link_to s_("CurrentUser|Settings"), profile_path, data: { qa_selector: 'settings_link' } + = link_to s_("CurrentUser|Edit profile"), profile_path, data: { qa_selector: 'edit_profile_link' } + %li + = link_to s_("CurrentUser|Preferences"), profile_preferences_path = render_if_exists 'layouts/header/buy_pipeline_minutes', project: @project, namespace: @group = render_if_exists 'layouts/header/upgrade' diff --git a/app/views/layouts/header/_current_user_dropdown_item.html.haml b/app/views/layouts/header/_current_user_dropdown_item.html.haml new file mode 100644 index 00000000000..06c597b4932 --- /dev/null +++ b/app/views/layouts/header/_current_user_dropdown_item.html.haml @@ -0,0 +1,12 @@ +.gl-font-weight-bold + = current_user.name + - if current_user&.status && user_status_set_to_busy?(current_user.status) + %span.gl-font-weight-normal.gl-text-gray-500= s_("UserProfile|(Busy)") += current_user.to_reference +- if current_user.status + .user-status.d-flex.align-items-center.gl-mt-2.gl-mr-0.gl-font-sm.has-tooltip{ title: current_user.status.message_html, data: { html: 'true', placement: 'bottom' } } + - if show_status_emoji?(current_user.status) + .user-status-emoji.d-flex.align-items-center + = emoji_icon current_user.status.emoji + %span.user-status-message.str-truncated + = current_user.status.message_html.html_safe diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index f7e93182ca2..c54ad23c094 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -15,7 +15,7 @@ %span.logo-text.d-none.d-lg-block.gl-ml-3 = logo_text - if Gitlab.com_and_canary? - = link_to 'https://next.gitlab.com', class: 'canary-badge bg-transparent', target: :_blank do + = link_to 'https://next.gitlab.com', class: 'canary-badge bg-transparent', target: :_blank, rel: :_noopener do %span.gl-badge.gl-bg-green-500.gl-text-white.gl-rounded-pill.gl-font-weight-bold.gl-py-1 = _('Next') @@ -47,11 +47,10 @@ %span.badge.badge-pill.issues-count.green-badge{ class: ('hidden' if issues_count == 0) } = number_with_delimiter(issues_count) - if header_link?(:merge_requests) - - reviewers_enabled = merge_request_reviewers_enabled? - = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter #{reviewers_enabled ? 'dropdown' : ''}" }) do + = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter dropdown" }) do = link_to assigned_mrs_dashboard_path, class: 'dashboard-shortcuts-merge_requests', title: _('Merge requests'), aria: { label: _('Merge requests') }, data: { qa_selector: 'merge_requests_shortcut_button', - toggle: reviewers_enabled ? "dropdown" : "tooltip", + toggle: "dropdown", placement: 'bottom', track_label: 'main_navigation', track_event: 'click_merge_link', @@ -60,23 +59,21 @@ = sprite_icon('git-merge') %span.badge.badge-pill.merge-requests-count.js-merge-requests-count{ class: ('hidden' if user_merge_requests_counts[:total] == 0) } = number_with_delimiter(user_merge_requests_counts[:total]) - - if reviewers_enabled - = sprite_icon('chevron-down', css_class: 'caret-down gl-mx-0!') - - if reviewers_enabled - .dropdown-menu.dropdown-menu-right - %ul - %li.dropdown-header - = _('Merge requests') - %li - = link_to assigned_mrs_dashboard_path, class: 'gl-display-flex! gl-align-items-center' do - = _('Assigned to you') - %span.badge.gl-badge.badge-pill.badge-muted.merge-request-badge.gl-ml-auto.js-assigned-mr-count{ class: "" } - = user_merge_requests_counts[:assigned] - %li - = link_to reviewer_mrs_dashboard_path, class: 'gl-display-flex! gl-align-items-center' do - = _('Review requests for you') - %span.badge.gl-badge.badge-pill.badge-muted.merge-request-badge.gl-ml-auto.js-reviewer-mr-count{ class: "" } - = user_merge_requests_counts[:review_requested] + = sprite_icon('chevron-down', css_class: 'caret-down gl-mx-0!') + .dropdown-menu.dropdown-menu-right + %ul + %li.dropdown-header + = _('Merge requests') + %li + = link_to assigned_mrs_dashboard_path, class: 'gl-display-flex! gl-align-items-center' do + = _('Assigned to you') + %span.badge.gl-badge.badge-pill.badge-muted.merge-request-badge.gl-ml-auto.js-assigned-mr-count{ class: "" } + = user_merge_requests_counts[:assigned] + %li + = link_to reviewer_mrs_dashboard_path, class: 'gl-display-flex! gl-align-items-center' do + = _('Review requests for you') + %span.badge.gl-badge.badge-pill.badge-muted.merge-request-badge.gl-ml-auto.js-reviewer-mr-count{ class: "" } + = user_merge_requests_counts[:review_requested] - if header_link?(:todos) = nav_link(controller: 'dashboard/todos', html_options: { class: "user-counter" }) do = link_to dashboard_todos_path, title: _('To-Do List'), aria: { label: _('To-Do List') }, class: 'shortcuts-todos', @@ -120,8 +117,7 @@ = sprite_icon('ellipsis_h', size: 12, css_class: 'more-icon js-navbar-toggle-right') = sprite_icon('close', size: 12, css_class: 'close-icon js-navbar-toggle-left') -- if ::Feature.enabled?(:whats_new_drawer, current_user) - #whats-new-app{ data: { storage_key: whats_new_storage_key, versions: whats_new_versions, gitlab_dot_com: Gitlab.dev_env_org_or_com? } } +#whats-new-app{ data: { storage_key: whats_new_storage_key, versions: whats_new_versions, gitlab_dot_com: Gitlab.dev_env_org_or_com? } } - if can?(current_user, :update_user_status, current_user) .js-set-status-modal-wrapper{ data: user_status_data } diff --git a/app/views/layouts/header/_help_dropdown.html.haml b/app/views/layouts/header/_help_dropdown.html.haml index 40bf45db80d..c3769dd2993 100644 --- a/app/views/layouts/header/_help_dropdown.html.haml +++ b/app/views/layouts/header/_help_dropdown.html.haml @@ -1,6 +1,6 @@ %ul - if current_user_menu?(:help) - = render_if_exists 'layouts/header/whats_new_dropdown_item' + = render 'layouts/header/whats_new_dropdown_item' %li = link_to _("Help"), help_path %li diff --git a/app/views/layouts/header/_whats_new_dropdown_item.html.haml b/app/views/layouts/header/_whats_new_dropdown_item.html.haml new file mode 100644 index 00000000000..f79b741ced0 --- /dev/null +++ b/app/views/layouts/header/_whats_new_dropdown_item.html.haml @@ -0,0 +1,5 @@ +%li + %button.gl-justify-content-space-between.gl-align-items-center.js-whats-new-trigger{ type: 'button', data: { storage_key: whats_new_storage_key }, class: 'gl-display-flex!' } + = _("What's new") + %span.js-whats-new-notification-count.whats-new-notification-count + = whats_new_most_recent_release_items_count diff --git a/app/views/layouts/jira_connect.html.haml b/app/views/layouts/jira_connect.html.haml index d996b3387a3..da45d84a83b 100644 --- a/app/views/layouts/jira_connect.html.haml +++ b/app/views/layouts/jira_connect.html.haml @@ -9,7 +9,6 @@ = yield :page_specific_styles = 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' = Gon::Base.render_data(nonce: content_security_policy_nonce) = yield :head %body diff --git a/app/views/layouts/nav/_breadcrumbs.html.haml b/app/views/layouts/nav/_breadcrumbs.html.haml index dd2c5e2a19e..aeeffb6f4b6 100644 --- a/app/views/layouts/nav/_breadcrumbs.html.haml +++ b/app/views/layouts/nav/_breadcrumbs.html.haml @@ -3,7 +3,7 @@ - unless @skip_current_level_breadcrumb - push_to_schema_breadcrumb(@breadcrumb_title, breadcrumb_title_link) -%nav.breadcrumbs{ role: "navigation", class: [container, @content_class] } +%nav.breadcrumbs{ class: [container, @content_class], 'aria-label': _('Breadcrumbs') } .breadcrumbs-container{ class: ("border-bottom-0" if @no_breadcrumb_border) } - if defined?(@left_sidebar) = button_tag class: 'toggle-mobile-nav', type: 'button' do diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index da16be707eb..f887d335807 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -1,4 +1,4 @@ -.nav-sidebar.qa-admin-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) } +%aside.nav-sidebar.qa-admin-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), 'aria-label': _('Admin navigation') } .nav-sidebar-inner-scroll .context-header = link_to admin_root_path, title: _('Admin Overview') do @@ -65,10 +65,6 @@ = link_to admin_dev_ops_report_path, title: _('DevOps Report') do %span = _('DevOps Report') - = nav_link(controller: :cohorts) do - = link_to admin_cohorts_path, title: _('Cohorts') do - %span - = _('Cohorts') - if Feature.enabled?(:instance_statistics, default_enabled: true) = nav_link(controller: :instance_statistics) do = link_to admin_instance_statistics_path, title: _('Usage Trends') do @@ -251,6 +247,7 @@ = _('Settings') %ul.sidebar-sub-level-items{ data: { qa_selector: 'admin_sidebar_settings_submenu_content' } } + -# This active_nav_link check is also used in `app/views/layouts/admin.html.haml` = nav_link(controller: [:application_settings, :integrations], html_options: { class: "fly-out-top-item" } ) do = link_to general_admin_application_settings_path do %strong.fly-out-top-item-name @@ -260,6 +257,9 @@ = link_to general_admin_application_settings_path, title: _('General'), class: 'qa-admin-settings-general-item' do %span = _('General') + + = render_if_exists 'layouts/nav/sidebar/advanced_search', class: 'qa-admin-settings-advanced-search' + - 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 diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index 473a0d131b8..e99b2f443be 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -1,7 +1,9 @@ -- issues_count = group_issues_count(state: 'opened') +- issues_count = group_open_issues_count(@group) - merge_requests_count = group_merge_requests_count(state: 'opened') +- aside_title = @group.subgroup? ? _('Subgroup navigation') : _('Group navigation') +- overview_title = @group.subgroup? ? _('Subgroup overview') : _('Group overview') -.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **tracking_attrs('groups_side_navigation', 'render', 'groups_side_navigation') } +%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **tracking_attrs('groups_side_navigation', 'render', 'groups_side_navigation'), 'aria-label': aside_title } .nav-sidebar-inner-scroll .context-header = link_to group_path(@group), title: @group.name do @@ -19,19 +21,13 @@ .nav-icon-container = sprite_icon('home') %span.nav-item-name - - if @group.subgroup? - = _('Subgroup overview') - - else - = _('Group overview') + = overview_title %ul.sidebar-sub-level-items = nav_link(path: ['groups#show', 'groups#details', 'groups#activity', 'groups#subgroups'], html_options: { class: "fly-out-top-item" } ) do = link_to group_path(@group) do %strong.fly-out-top-item-name - - if @group.subgroup? - = _('Subgroup overview') - - else - = _('Group overview') + = overview_title %li.divider.fly-out-top-item = nav_link(path: ['groups#show', 'groups#details', 'groups#subgroups'], html_options: { class: 'home' }) do @@ -54,14 +50,14 @@ = sprite_icon('issues') %span.nav-item-name = _('Issues') - %span.badge.badge-pill.count= number_with_delimiter(issues_count) + %span.badge.badge-pill.count= issues_count %ul.sidebar-sub-level-items{ data: { qa_selector: 'group_issues_sidebar_submenu'} } = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index', 'iterations#index'], html_options: { class: "fly-out-top-item" } ) do = link_to issues_group_path(@group) do %strong.fly-out-top-item-name = _('Issues') - %span.badge.badge-pill.count.issue_counter.fly-out-badge= number_with_delimiter(issues_count) + %span.badge.badge-pill.count.issue_counter.fly-out-badge= issues_count %li.divider.fly-out-top-item = nav_link(path: 'groups#issues', html_options: { class: 'home' }) do @@ -121,7 +117,7 @@ %strong.fly-out-top-item-name = _('Kubernetes') - = render_if_exists 'groups/sidebar/packages' + = render 'groups/sidebar/packages' = render 'layouts/nav/sidebar/analytics_links', links: group_analytics_navbar_links(@group, current_user) @@ -141,7 +137,7 @@ %strong.fly-out-top-item-name = _('Members') - = render_if_exists 'groups/invite_members_side_nav_link', group: @group + = content_for :invite_members_sidebar - if group_sidebar_link?(:settings) = nav_link(path: group_settings_nav_link_paths) do @@ -181,11 +177,7 @@ %span = _('CI / CD') - - if Feature.enabled?(:packages_and_registries_group_settings, @group) - = nav_link(controller: :packages_and_registries) do - = link_to group_settings_packages_and_registries_path(@group), title: _('Packages & Registries') do - %span - = _('Packages & Registries') + = render 'groups/sidebar/packages_settings' = render_if_exists "groups/ee/settings_nav" diff --git a/app/views/layouts/nav/sidebar/_profile.html.haml b/app/views/layouts/nav/sidebar/_profile.html.haml index dadab554c02..a66110f28e8 100644 --- a/app/views/layouts/nav/sidebar/_profile.html.haml +++ b/app/views/layouts/nav/sidebar/_profile.html.haml @@ -1,4 +1,4 @@ -.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **tracking_attrs('user_side_navigation', 'render', 'user_side_navigation') } +%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **tracking_attrs('user_side_navigation', 'render', 'user_side_navigation'), 'aria-label': _('User settings') } .nav-sidebar-inner-scroll .context-header = link_to profile_path, title: _('Profile Settings') do diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index e02b8333c60..8bb009bfd17 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -1,4 +1,4 @@ -.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **tracking_attrs('projects_side_navigation', 'render', 'projects_side_navigation') } +%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **tracking_attrs('projects_side_navigation', 'render', 'projects_side_navigation'), 'aria-label': _('Project navigation') } .nav-sidebar-inner-scroll .context-header = link_to project_path(@project), title: @project.name do @@ -33,6 +33,13 @@ = link_to project_releases_path(@project), title: _('Releases'), class: 'shortcuts-project-releases' do %span= _('Releases') + - if project_nav_tab? :learn_gitlab + = nav_link(controller: :learn_gitlab, html_options: { class: 'home' }) do + = link_to project_learn_gitlab_path(@project) do + .nav-icon-container + = sprite_icon('home') + %span.nav-item-name + = _('Learn GitLab') - if project_nav_tab? :files = nav_link(controller: sidebar_repository_paths, unless: -> { current_path?('projects/graphs#charts') }) do @@ -212,7 +219,8 @@ = render_if_exists "layouts/nav/test_cases_link", project: @project - = render_if_exists 'layouts/nav/sidebar/project_security_link' # EE-specific + - if project_nav_tab? :security_and_compliance + = render_if_exists 'layouts/nav/sidebar/project_security_link' # EE-specific - if project_nav_tab? :operations = nav_link(controller: sidebar_operations_paths) do @@ -283,27 +291,14 @@ %span = _('Kubernetes') - if show_cluster_hint - .feature-highlight.js-feature-highlight{ disabled: true, + .js-feature-highlight{ disabled: true, data: { trigger: 'manual', container: 'body', placement: 'right', highlight: UserCalloutsHelper::GKE_CLUSTER_INTEGRATION, highlight_priority: UserCallout.feature_names[:GKE_CLUSTER_INTEGRATION], - dismiss_endpoint: user_callouts_path } } - - if show_cluster_hint - .feature-highlight-popover-content - = image_tag 'illustrations/cluster_popover.svg', class: 'feature-highlight-illustration', lazy: false, alt: _('Kubernetes popover') - .feature-highlight-popover-sub-content - %p= _('Allows you to add and manage Kubernetes clusters.') - %p - = _('Protip:') - = link_to _('Auto DevOps'), help_page_path('topics/autodevops/index.md') - %span= _('uses Kubernetes clusters to deploy your code!') - %hr - %button.gl-button.btn.btn-success.btn-sm.dismiss-feature-highlight{ type: 'button' } - %span.gl-mr-2= _("Got it!") - = sprite_icon('thumb-up') - + dismiss_endpoint: user_callouts_path, + auto_devops_help_path: help_page_path('topics/autodevops/index.md') } } - if project_nav_tab? :environments = nav_link(controller: :environments, action: [:index, :folder, :show, :new, :edit, :create, :update, :stop, :terminal]) do = link_to project_environments_path(@project), title: _('Environments'), class: 'shortcuts-environments qa-operations-environments-link' do @@ -383,7 +378,7 @@ %strong.fly-out-top-item-name = _('Members') - = render_if_exists 'projects/invite_members_side_nav_link', project: @project + = content_for :invite_members_sidebar - if project_nav_tab? :settings = nav_link(path: sidebar_settings_paths) do @@ -438,8 +433,6 @@ %span = _('Pages') - = render 'shared/sidebar_toggle_button' - -# Shortcut to Project > Activity %li.hidden = link_to activity_project_path(@project), title: _('Activity'), class: 'shortcuts-project-activity' do @@ -474,3 +467,5 @@ - if project_nav_tab?(:issues) %li.hidden = link_to _('Issue Boards'), project_boards_path(@project), title: _('Issue Boards'), class: 'shortcuts-issue-boards' + + = render 'shared/sidebar_toggle_button' diff --git a/app/views/layouts/nav/sidebar/_project_security_link.html.haml b/app/views/layouts/nav/sidebar/_project_security_link.html.haml new file mode 100644 index 00000000000..426845639e3 --- /dev/null +++ b/app/views/layouts/nav/sidebar/_project_security_link.html.haml @@ -0,0 +1,21 @@ +- top_level_link = project_security_configuration_path(@project) +- top_level_qa_selector = 'security_configuration_link' +- if any_project_nav_tab?([:security_configuration]) + = nav_link(path: sidebar_security_paths) do + = link_to top_level_link, data: { qa_selector: top_level_qa_selector } do + .nav-icon-container + = sprite_icon('shield') + %span.nav-item-name + = _('Security & Compliance') + + %ul.sidebar-sub-level-items + = nav_link(path: sidebar_security_paths, html_options: { class: "fly-out-top-item" } ) do + = link_to top_level_link do + %strong.fly-out-top-item-name + = _('Security & Compliance') + + %li.divider.fly-out-top-item + - if project_nav_tab?(:security_configuration) + = nav_link(path: sidebar_security_configuration_paths) do + = link_to project_security_configuration_path(@project), title: _('Configuration'), data: { qa_selector: 'security_configuration_link'} do + %span= _('Configuration') diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 7aca64663e0..17153e72e6e 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -4,4 +4,5 @@ - nav "profile" - @left_sidebar = true +- enable_search_settings locals: { container_class: 'gl-my-5' } = render template: "layouts/application" diff --git a/app/views/layouts/devise_experimental_onboarding_issues.html.haml b/app/views/layouts/signup_onboarding.html.haml index f768fba84ca..f768fba84ca 100644 --- a/app/views/layouts/devise_experimental_onboarding_issues.html.haml +++ b/app/views/layouts/signup_onboarding.html.haml diff --git a/app/views/layouts/welcome.html.haml b/app/views/layouts/welcome.html.haml index 48921e9ff89..944f524d692 100644 --- a/app/views/layouts/welcome.html.haml +++ b/app/views/layouts/welcome.html.haml @@ -1,8 +1,8 @@ !!! 5 %html.subscriptions-layout-html{ lang: 'en' } = render 'layouts/head' - %body.ui-indigo.d-flex.vh-100.gl-bg-gray-10 + %body.ui-indigo.gl-display-flex.vh-100 = render "layouts/header/logo_with_title" = render "layouts/broadcast" - .container.d-flex.flex-grow-1.m-0 + .container.gl-display-flex.gl-flex-grow-1 = yield diff --git a/app/views/layouts/xml.atom.builder b/app/views/layouts/xml.atom.builder index 4ee09cb87a1..7144b6305a2 100644 --- a/app/views/layouts/xml.atom.builder +++ b/app/views/layouts/xml.atom.builder @@ -1,3 +1,5 @@ +# frozen_string_literal: true + xml.instruct! xml.feed 'xmlns' => 'http://www.w3.org/2005/Atom', 'xmlns:media' => 'http://search.yahoo.com/mrss/' do xml << yield |