diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 09:14:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 09:14:52 +0000 |
commit | 347bf09d6ecf4871da234c06ca8ee541e27b5105 (patch) | |
tree | 2ad6943e0c681c22acc8850d1debc6a983b0e006 /app/views | |
parent | 0a51be0866d33273070f535257626a9eb2e10700 (diff) | |
download | gitlab-ce-13.10.0-rc20210223090520.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc20210223090520
Diffstat (limited to 'app/views')
48 files changed, 149 insertions, 126 deletions
diff --git a/app/views/admin/application_settings/_package_registry.html.haml b/app/views/admin/application_settings/_package_registry.html.haml index 86df1aa6e02..19801a3e01c 100644 --- a/app/views/admin/application_settings/_package_registry.html.haml +++ b/app/views/admin/application_settings/_package_registry.html.haml @@ -36,7 +36,7 @@ = f.label :maven_max_file_size, _('Maximum Maven package file size in bytes'), class: 'label-bold' = f.number_field :maven_max_file_size, class: 'form-control gl-form-input' .form-group - = f.label :npm_max_file_size, _('Maximum NPM package file size in bytes'), class: 'label-bold' + = f.label :npm_max_file_size, _('Maximum npm package file size in bytes'), class: 'label-bold' = f.number_field :npm_max_file_size, class: 'form-control gl-form-input' .form-group = f.label :nuget_max_file_size, _('Maximum NuGet package file size in bytes'), class: 'label-bold' diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index dc122d74e90..df7af86e089 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -33,5 +33,5 @@ = visibility_level_icon(group.visibility_level) .controls.gl-flex-shrink-0.gl-ml-5 - = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'gl-button btn' + = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn gl-button btn-default' = link_to _('Delete'), [:admin, group], data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, method: :delete, class: 'gl-button btn btn-danger' diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index 4131c8b7edd..c2e40413a14 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -4,7 +4,7 @@ - @projects.each_with_index do |project| %li.project-row{ class: ('no-description' if project.description.blank?) } .controls - = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "gl-button btn" + = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn gl-button btn-default" %button.delete-project-button.gl-button.btn.btn-danger{ data: { delete_project_url: admin_project_path(project), project_name: project.name } } = s_('AdminProjects|Delete') diff --git a/app/views/admin/instance_statistics/index.html.haml b/app/views/admin/usage_trends/index.html.haml index d5902f702e5..a0be48f71ce 100644 --- a/app/views/admin/instance_statistics/index.html.haml +++ b/app/views/admin/usage_trends/index.html.haml @@ -1,4 +1,4 @@ - breadcrumb_title _("Usage Trends") - page_title _("Usage Trends") -#js-instance-statistics-app +#js-usage-trends-app diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 8da0c7f4300..f9b631ed6cf 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -5,7 +5,7 @@ %a.nav-link{ href: '#users', class: active_when(params[:tab] != 'cohorts'), data: { toggle: 'tab' }, role: 'tab' } = s_('AdminUsers|Users') %li.nav-item.js-users-tab-item{ role: 'presentation' } - %a.nav-link{ href: '#cohorts', class: active_when(params[:tab] == 'cohorts'), data: { toggle: 'tab', track: { event: 'i_analytics_cohorts', action: 'click_tab' } }, role: 'tab' } + %a.nav-link{ href: '#cohorts', class: active_when(params[:tab] == 'cohorts'), data: { toggle: 'tab' }, role: 'tab' } = s_('AdminUsers|Cohorts') .tab-content diff --git a/app/views/devise/confirmations/almost_there.haml b/app/views/devise/confirmations/almost_there.haml index bf321bb690b..684af933f3a 100644 --- a/app/views/devise/confirmations/almost_there.haml +++ b/app/views/devise/confirmations/almost_there.haml @@ -1,14 +1,14 @@ -.well-confirmation.text-center.gl-mb-6 +.well-confirmation.gl-text-center.gl-mb-6 %h1.gl-mt-0 - Almost there... + = _("Almost there...") %p.lead.gl-mb-6 - Please check your email to confirm your account + = _("Please check your email to confirm your account") %hr - if Gitlab::CurrentSettings.after_sign_up_text.present? - .well-confirmation.text-center + .well-confirmation.gl-text-center = markdown_field(Gitlab::CurrentSettings, :after_sign_up_text) %p.text-center - No confirmation email received? Please check your spam folder or -.gl-mb-6.prepend-top-20.text-center - %a.btn.btn-lg.btn-success{ href: new_user_confirmation_path } - Request new confirmation email + = _("No confirmation email received? Please check your spam folder or") +.gl-mb-6.prepend-top-20.gl-text-center + %a.btn.gl-button.btn-confirm{ href: new_user_confirmation_path } + = _("Request new confirmation email") diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml index 270652483b7..98af69d43b7 100644 --- a/app/views/devise/sessions/_new_base.html.haml +++ b/app/views/devise/sessions/_new_base.html.haml @@ -20,4 +20,4 @@ = recaptcha_tags .submit-container.move-submit-down - = f.submit _('Sign in'), class: 'gl-button btn btn-success', data: { qa_selector: 'sign_in_button' } + = f.submit _('Sign in'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'sign_in_button' } diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index 705fd9bbd0f..3ec859551ca 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -7,7 +7,7 @@ .d-flex.justify-content-between.flex-wrap - providers.each do |provider| - has_icon = provider_has_icon?(provider) - = button_to omniauth_authorize_path(:user, provider), id: "oauth-login-#{provider}", class: "btn gl-button btn-default d-flex align-items-center omniauth-btn text-left oauth-login #{qa_class_for_provider(provider)}" do + = button_to omniauth_authorize_path(:user, provider), id: "oauth-login-#{provider}", class: "btn gl-button btn-default omniauth-btn oauth-login #{qa_class_for_provider(provider)}" do - if has_icon = provider_image_tag(provider) %span diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index a5257ff20bc..de9859230d5 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -16,8 +16,9 @@ = html_escape(_('You can invite a new member to %{strong_start}%{group_name}%{strong_end}.')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - if can_invite_members_for_group?(@group) .gl-w-half.gl-xs-w-full - .gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2.gl-mb-3 - .js-invite-members-trigger.gl-px-2.gl-sm-w-auto.gl-w-full.gl-mb-4{ data: { classes: 'btn btn-success gl-button gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite members') } } + .gl-display-flex.gl-flex-wrap.gl-justify-content-end.gl-mb-3 + .js-invite-group-trigger{ data: { classes: 'gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite a group') } } + .js-invite-members-trigger{ data: { classes: 'btn btn-success gl-button gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', display_text: _('Invite members') } } = render 'groups/invite_members_modal', group: @group - if can_manage_members && !can_invite_members_for_group?(@group) %hr.gl-mt-4 diff --git a/app/views/groups/settings/_general.html.haml b/app/views/groups/settings/_general.html.haml index 8ad5755fef8..e45601aa0ff 100644 --- a/app/views/groups/settings/_general.html.haml +++ b/app/views/groups/settings/_general.html.haml @@ -1,3 +1,5 @@ +- enable_search_settings locals: { container_class: 'gl-my-5' } + = form_for @group, html: { multipart: true, class: 'gl-show-field-errors js-general-settings-form' }, authenticity_token: true do |f| %input{ type: 'hidden', name: 'update_section', value: 'js-general-settings' } = form_errors(@group) diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index 1badb7b6ba1..508d8a45255 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -4,6 +4,8 @@ - expanded = expanded_by_default? - general_expanded = @group.errors.empty? ? expanded : true +- enable_search_settings locals: { container_class: 'gl-my-5' } + -# Given we only have one field in this form which is also admin-only, -# we don't want to show an empty section to non-admin users, - if can?(current_user, :update_max_artifacts_size, @group) diff --git a/app/views/groups/settings/packages_and_registries/index.html.haml b/app/views/groups/settings/packages_and_registries/index.html.haml index 1a12ad4902b..21eef20a987 100644 --- a/app/views/groups/settings/packages_and_registries/index.html.haml +++ b/app/views/groups/settings/packages_and_registries/index.html.haml @@ -2,4 +2,6 @@ - page_title _('Packages & Registries') - @content_class = 'limit-container-width' unless fluid_layout +- enable_search_settings locals: { container_class: 'gl-my-5' } + %section#js-packages-and-registries-settings{ data: { default_expanded: expanded_by_default?.to_s, group_path: @group.full_path } } diff --git a/app/views/groups/settings/repository/show.html.haml b/app/views/groups/settings/repository/show.html.haml index a5819320405..b15d36c631a 100644 --- a/app/views/groups/settings/repository/show.html.haml +++ b/app/views/groups/settings/repository/show.html.haml @@ -1,6 +1,8 @@ - breadcrumb_title _('Repository Settings') - page_title _('Repository') +- enable_search_settings locals: { container_class: 'gl-my-5' } + - deploy_token_description = s_('DeployTokens|Group deploy tokens allow access to the packages, repositories, and registry images within the group.') = render "shared/deploy_tokens/index", group_or_project: @group, description: deploy_token_description diff --git a/app/views/import/bulk_imports/status.html.haml b/app/views/import/bulk_imports/status.html.haml index 778bc1ef1a4..b46720ca63e 100644 --- a/app/views/import/bulk_imports/status.html.haml +++ b/app/views/import/bulk_imports/status.html.haml @@ -9,4 +9,5 @@ available_namespaces_path: import_available_namespaces_path(format: :json), create_bulk_import_path: import_bulk_imports_path(format: :json), jobs_path: realtime_changes_import_bulk_imports_path(format: :json), + can_create_group: current_user.can_create_group?.to_s, source_url: @source_url } } diff --git a/app/views/jira_connect/subscriptions/index.html.haml b/app/views/jira_connect/subscriptions/index.html.haml index a549ed3540b..6a549227185 100644 --- a/app/views/jira_connect/subscriptions/index.html.haml +++ b/app/views/jira_connect/subscriptions/index.html.haml @@ -1,61 +1,62 @@ -%header.jira-connect-header - = brand_header_logo +%header.jira-connect-header.gl-display-flex.gl-align-items-center.gl-justify-content-center.gl-px-5.gl-border-b-solid.gl-border-b-gray-100.gl-border-b-1.gl-bg-white + = link_to brand_header_logo, Gitlab.config.gitlab.url, target: '_blank', rel: 'noopener noreferrer' -.jira-connect-user +.jira-connect-user.gl-font-base - if current_user - user_link = link_to(current_user.to_reference, jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in') = _('Signed in to GitLab as %{user_link}').html_safe % { user_link: user_link } - elsif @subscriptions.present? = link_to _('Sign in to GitLab'), jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in' -.jira-connect-app +%main.jira-connect-app.gl-px-5.gl-pt-7.gl-mx-auto - if current_user.blank? && @subscriptions.empty? - %h2= s_('JiraService|GitLab for Jira Configuration') - %p= s_('JiraService|Sign in to GitLab.com to get started.') + .jira-connect-app-body.gl-text-center + %h2= s_('JiraService|GitLab for Jira Configuration') + %p= s_('JiraService|Sign in to GitLab.com to get started.') - .gl-mt-7 - - sign_in_button_class = new_jira_connect_ui? ? 'btn gl-button btn-confirm' : 'ak-button ak-button__appearance-primary' - = external_link _('Sign in to GitLab'), jira_connect_users_path, class: "#{sign_in_button_class} js-jira-connect-sign-in" + .gl-mt-7 + - sign_in_button_class = new_jira_connect_ui? ? 'btn gl-button btn-confirm' : 'ak-button ak-button__appearance-primary' + = external_link _('Sign in to GitLab'), jira_connect_users_path, class: "#{sign_in_button_class} js-jira-connect-sign-in" - .gl-mt-7 - %p Note: this integration only works with accounts on GitLab.com (SaaS). + .gl-mt-7 + %p= s_('Integrations|Note: this integration only works with accounts on GitLab.com (SaaS).') - else .js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) } - - unless new_jira_connect_ui? - %form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path } - .ak-field-group - %label - GitLab namespace + .jira-connect-app-body + - unless new_jira_connect_ui? + %form#add-subscription-form.subscription-form.gl-mb-5{ action: jira_connect_subscriptions_path } + .ak-field-group + %label= _('GitLab namespace') - .ak-field-group.field-group-input - %input#namespace-input.ak-field-text{ type: 'text', required: true, placeholder: 'e.g. "MyCompany" or "MyCompany/GroupName"' } - %button.ak-button.ak-button__appearance-primary{ type: 'submit' } - Link namespace to Jira + .ak-field-group.field-group-input + %input#namespace-input.ak-field-text{ type: 'text', required: true, placeholder: 'e.g. "MyCompany" or "MyCompany/GroupName"' } + %button.ak-button.ak-button__appearance-primary{ type: 'submit' } + = s_('Integrations|Link namespace to Jira') - - if @subscriptions.present? - %table.subscriptions.gl-w-full - %thead - %tr - %th Namespace - %th Added - %th - %tbody - - @subscriptions.each do |subscription| + - if @subscriptions.present? + %table.subscriptions.gl-w-full + %thead %tr - %td= subscription.namespace.full_path - %td= subscription.created_at - %td= link_to 'Remove', jira_connect_subscription_path(subscription), class: 'js-jira-connect-remove-subscription' - - else - %h4.empty-subscriptions - No linked namespaces - %p= s_('Integrations|Namespaces are your GitLab groups and subgroups that will be linked to this Jira instance.') + %th= _('Namespace') + %th= _('Added') + %th + %tbody + - @subscriptions.each do |subscription| + %tr + %td= subscription.namespace.full_path + %td= subscription.created_at + %td= link_to _('Remove'), jira_connect_subscription_path(subscription), class: 'js-jira-connect-remove-subscription' + - else + .gl-text-center + %h4= s_('Integrations|No linked namespaces') + %p= s_('Integrations|Namespaces are your GitLab groups and subgroups that will be linked to this Jira instance.') - %p.browser-limitations-notice - %strong Browser limitations: - Adding a namespace currently works only in browsers that allow cross‑site cookies. Please make sure to use - %a{ href: 'https://www.mozilla.org/en-US/firefox/', target: '_blank', rel: 'noopener noreferrer' } Firefox - or enable cross‑site cookies in your browser when adding a namespace. + %p.jira-connect-app-body.gl-mt-7.gl-font-base.gl-text-center + %strong= s_('Integrations|Browser limitations') + - firefox_link_url = 'https://www.mozilla.org/en-US/firefox/' + - firefox_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: firefox_link_url } + = s_('Integrations|Adding a namespace currently works only in browsers that allow cross‑site cookies. Please make sure to use %{firefox_link_start}Firefox%{firefox_link_end} or enable cross‑site cookies in your browser when adding a namespace.').html_safe % { firefox_link_start: firefox_link_start, firefox_link_end: '</a>'.html_safe } = link_to _('Learn more'), 'https://gitlab.com/gitlab-org/gitlab/-/issues/284211', target: '_blank', rel: 'noopener noreferrer' = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 8b430f579e9..83a0eddbb39 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -54,8 +54,7 @@ = Gon::Base.render_data(nonce: content_security_policy_nonce) = javascript_include_tag locale_path unless I18n.locale == :en - -# Temporarily commented out to investigate performance: https://gitlab.com/gitlab-org/gitlab/-/issues/251179 - -# = webpack_bundle_tag "sentry" if Gitlab.config.sentry.enabled + = webpack_bundle_tag "sentry" if Gitlab.config.sentry.enabled = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? = yield :page_specific_javascripts diff --git a/app/views/layouts/jira_connect.html.haml b/app/views/layouts/jira_connect.html.haml index da45d84a83b..e9da940ca7a 100644 --- a/app/views/layouts/jira_connect.html.haml +++ b/app/views/layouts/jira_connect.html.haml @@ -12,5 +12,4 @@ = Gon::Base.render_data(nonce: content_security_policy_nonce) = yield :head %body - .ac-content - = yield + = yield diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index f887d335807..d756867541b 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -65,11 +65,10 @@ = link_to admin_dev_ops_report_path, title: _('DevOps Report') do %span = _('DevOps Report') - - if Feature.enabled?(:instance_statistics, default_enabled: true) - = nav_link(controller: :instance_statistics) do - = link_to admin_instance_statistics_path, title: _('Usage Trends') do - %span - = _('Usage Trends') + = nav_link(controller: :usage_trends) do + = link_to admin_usage_trends_path, title: _('Usage Trends') do + %span + = _('Usage Trends') = nav_link(controller: admin_monitoring_nav_links) do = link_to admin_system_info_path, data: { qa_selector: 'admin_monitoring_link' } do diff --git a/app/views/layouts/nav/sidebar/_profile.html.haml b/app/views/layouts/nav/sidebar/_profile.html.haml index a66110f28e8..4ae81d69c16 100644 --- a/app/views/layouts/nav/sidebar/_profile.html.haml +++ b/app/views/layouts/nav/sidebar/_profile.html.haml @@ -3,7 +3,7 @@ .context-header = link_to profile_path, title: _('Profile Settings') do .avatar-container.s40.settings-avatar - = image_tag avatar_icon_for_user(current_user, 40), class: "avatar s40 avatar-tile", alt: current_user.name + = image_tag avatar_icon_for_user(current_user, 40), class: "avatar s40 avatar-tile js-sidebar-user-avatar", alt: current_user.name, data: { testid: 'sidebar-user-avatar' } .sidebar-context-title= _('User Settings') %ul.sidebar-top-level-items = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do diff --git a/app/views/peek/_bar.html.haml b/app/views/peek/_bar.html.haml index 9725f640be9..8914bfab336 100644 --- a/app/views/peek/_bar.html.haml +++ b/app/views/peek/_bar.html.haml @@ -2,5 +2,6 @@ #js-peek{ data: { env: Peek.env, request_id: peek_request_id, + stats_url: ENV.fetch('GITLAB_PERFORMANCE_BAR_STATS_URL', ''), peek_url: "#{peek_routes_path}/results" }, class: Peek.env } diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 4689fd5272a..dd24dd49a6f 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -48,17 +48,17 @@ .col-lg-8 = f.fields_for :status, @user.status do |status_form| - emoji_button = button_tag type: :button, - class: 'js-toggle-emoji-menu emoji-menu-toggle-button gl-button btn has-tooltip', + class: 'js-toggle-emoji-menu emoji-menu-toggle-button btn gl-button btn-default has-tooltip', title: s_("Profiles|Add status emoji") do - if custom_emoji - = emoji_icon @user.status.emoji + = emoji_icon(@user.status.emoji, class: 'gl-mr-0!') %span#js-no-emoji-placeholder.no-emoji-placeholder{ class: ('hidden' if custom_emoji) } = sprite_icon('slight-smile', css_class: 'award-control-icon-neutral') = sprite_icon('smiley', css_class: 'award-control-icon-positive') = sprite_icon('smile', css_class: 'award-control-icon-super-positive') - reset_message_button = button_tag type: :button, id: 'js-clear-user-status-button', - class: 'clear-user-status gl-button btn has-tooltip', + class: 'clear-user-status btn gl-button btn-default has-tooltip', title: s_("Profiles|Clear status") do = sprite_icon("close") diff --git a/app/views/projects/_merge_request_merge_method_settings.html.haml b/app/views/projects/_merge_request_merge_method_settings.html.haml index 1be7f7bb418..cb3fcdef403 100644 --- a/app/views/projects/_merge_request_merge_method_settings.html.haml +++ b/app/views/projects/_merge_request_merge_method_settings.html.haml @@ -22,7 +22,7 @@ = s_('ProjectSettings|When conflicts arise the user is given the option to rebase') .form-check.mb-2 - = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff form-check-input" + = form.radio_button :merge_method, :ff, class: "js-merge-method-radio form-check-input", data: { qa_selector: 'merge_ff_radio_button' } = label_tag :project_merge_method_ff, class: 'form-check-label' do = s_('ProjectSettings|Fast-forward merge') .text-secondary diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml index 70a4202a5d0..717c03ad27d 100644 --- a/app/views/projects/blob/_template_selectors.html.haml +++ b/app/views/projects/blob/_template_selectors.html.haml @@ -11,7 +11,7 @@ = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-metrics-dashboard-selector qa-metrics-dashboard-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: metrics_dashboard_ymls(@project) } } ) #gitlab-ci-yml-selector.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitlab-ci-yml-selector qa-gitlab-ci-yml-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(@project) } } ) - - if experiment_enabled?(:ci_syntax_templates, subject: current_user) + - if experiment_enabled?(:ci_syntax_templates_b, subject: current_user) && @project.namespace.recent? .gitlab-ci-syntax-yml-selector.js-gitlab-ci-syntax-yml-selector-wrap.js-template-selector-wrap.hidden = dropdown_tag(_("Learn CI/CD syntax"), options: { toggle_class: 'js-gitlab-ci-syntax-yml-selector qa-gitlab-ci-syntax-yml-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_syntax_ymls(@project) } } ) .dockerfile-selector.js-dockerfile-selector-wrap.js-template-selector-wrap.hidden diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml index f400c7de5eb..b68c75701b9 100644 --- a/app/views/projects/blob/_upload.html.haml +++ b/app/views/projects/blob/_upload.html.haml @@ -17,7 +17,7 @@ %br .dropzone-alerts.gl-alert.gl-alert-danger.gl-mb-5.data{ style: "display:none" } - = render 'shared/new_commit_form', placeholder: placeholder + = render 'shared/new_commit_form', placeholder: placeholder, ref: local_assigns[:ref] .form-actions = button_tag class: 'btn gl-button btn-success btn-upload-file', id: 'submit-all', type: 'button' do diff --git a/app/views/projects/commit/_pipelines_list.haml b/app/views/projects/commit/_pipelines_list.haml index 81c354f1c8f..7f52e6ed7eb 100644 --- a/app/views/projects/commit/_pipelines_list.haml +++ b/app/views/projects/commit/_pipelines_list.haml @@ -1,8 +1,6 @@ - disable_initialization = local_assigns.fetch(:disable_initialization, false) #commit-pipeline-table-view{ data: { disable_initialization: disable_initialization, endpoint: endpoint, - "help-page-path" => help_page_path('ci/quick_start/README'), - "help-auto-devops-path" => help_page_path('topics/autodevops/index.md'), "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), "project-id": @project.id, diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index c708efe7c7b..ceb312450be 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -60,5 +60,5 @@ .commit-sha-group.btn-group.d-none.d-sm-flex .label.label-monospace.monospace = commit.short_id - = clipboard_button(text: commit.id, title: _("Copy commit SHA"), class: "gl-button btn btn-default", container: "body") + = clipboard_button(text: commit.id, title: _("Copy commit SHA"), class: "gl-button btn btn-default btn-icon", container: "body") = link_to_browse_code(project, commit) diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 2f533b5848d..cec8948aaa4 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -3,7 +3,7 @@ - can_create_note = !@diff_notes_disabled && can?(current_user, :create_note, diffs.project) - diff_page_context = local_assigns.fetch(:diff_page_context, nil) - load_diff_files_async = Feature.enabled?(:async_commit_diff_files, @project) && diff_page_context == "is-commit" -- paginate_diffs = local_assigns.fetch(:paginate_diffs, false) && !load_diff_files_async && Feature.enabled?(:paginate_commit_view, @project, type: :development) +- paginate_diffs = local_assigns.fetch(:paginate_diffs, false) && !load_diff_files_async - diff_files = conditionally_paginate_diff_files(diffs, paginate: paginate_diffs) .content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index c26017ccb79..2922ba4fb6e 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -27,7 +27,7 @@ = render "visibility_modal" = f.submit _('Save changes'), class: "btn gl-button btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } -%section.qa-merge-request-settings.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } +%section.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)], data: { qa_selector: 'merge_request_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') @@ -39,7 +39,7 @@ = form_for @project, remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' } = render 'projects/merge_request_settings', form: f - = f.submit _('Save changes'), class: "btn gl-button btn-success qa-save-merge-request-changes rspec-save-merge-request-changes" + = f.submit _('Save changes'), class: "btn gl-button btn-success rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' } = render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded @@ -60,7 +60,7 @@ = render 'projects/service_desk_settings' -%section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) } +%section.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded), data: { qa_selector: 'advanced_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') @@ -96,8 +96,8 @@ .input-group-prepend .input-group-text #{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/ - = f.text_field :path, class: 'form-control qa-project-path-field h-auto' - = f.submit _('Change path'), class: "gl-button btn btn-warning qa-change-path-button" + = f.text_field :path, class: 'form-control h-auto', data: { qa_selector: 'project_path_field' } + = f.submit _('Change path'), class: "gl-button btn btn-warning", data: { qa_selector: 'change_path_button' } = render 'transfer', project: @project diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 2c245c1a914..d16f271c8d8 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,5 +1,5 @@ - @content_class = "limit-container-width" unless fluid_layout -- default_branch_name = @project.default_branch || "master" +- default_branch_name = @project.default_branch_or_master - @skip_current_level_breadcrumb = true = content_for :invite_members_sidebar do @@ -77,3 +77,6 @@ %span>< git push -u origin --all git push -u origin --tags + +- if @project.empty_repo_upload_experiment? + = render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, default_branch_name), ref: default_branch_name, method: :post diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index e17c905e092..190bf9bf071 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -27,14 +27,14 @@ %td .float-right.btn-group - if can?(current_user, :play_pipeline_schedule, pipeline_schedule) - = link_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('Play'), class: 'btn gl-button btn-default btn-svg' do + = link_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('Play'), class: 'btn gl-button btn-default btn-icon' do = sprite_icon('play') - if can?(current_user, :take_ownership_pipeline_schedule, pipeline_schedule) = link_to take_ownership_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('PipelineSchedules|Take ownership'), class: 'btn gl-button btn-default' do = s_('PipelineSchedules|Take ownership') - if can?(current_user, :update_pipeline_schedule, pipeline_schedule) - = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-button btn-default' do + = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-button btn-default btn-icon' do = sprite_icon('pencil') - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) - = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn gl-button btn-danger', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do + = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn gl-button btn-danger btn-icon', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do = sprite_icon('remove') diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 6a4dd88ae07..7d7b8a155ac 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -7,8 +7,6 @@ #pipelines-list-vue{ data: { endpoint: project_pipelines_path(@project, format: :json), project_id: @project.id, params: params.to_json, - "help-page-path" => help_page_path('ci/quick_start/README'), - "auto-devops-help-path" => help_page_path('topics/autodevops/index.md'), "pipeline-schedule-url" => pipeline_schedules_path(@project), "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index 7d5cef2015d..a760aaaf9b3 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -6,7 +6,7 @@ = s_('Pipeline|Run Pipeline') %hr -- if Feature.enabled?(:new_pipeline_form, @project, default_enabled: true) +- if Feature.enabled?(:new_pipeline_form, @project, default_enabled: :yaml) #js-new-pipeline{ data: { project_id: @project.id, pipelines_path: project_pipelines_path(@project), config_variables_path: config_variables_namespace_project_pipelines_path(@project.namespace, @project), diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index b431ef202b3..751268ec920 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -26,4 +26,4 @@ = render "projects/pipelines/with_tabs", pipeline: @pipeline, pipeline_has_errors: pipeline_has_errors -.js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json), pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid } } +.js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json), metrics_path: namespace_project_ci_prometheus_metrics_histograms_path(namespace_id: @project.namespace, project_id: @project, format: :json), pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid } } diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index beb435d268a..509092b64c9 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -18,8 +18,9 @@ %p = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } .col-md-12.col-lg-6 - .gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2.gl-mb-3 - .js-invite-members-trigger.gl-px-2.gl-sm-w-auto.gl-w-full.gl-mb-4{ data: { classes: 'btn btn-success gl-button gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite members') } } + .gl-display-flex.gl-flex-wrap.gl-justify-content-end + .js-invite-group-trigger{ data: { classes: 'gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite a group') } } + .js-invite-members-trigger{ data: { classes: 'btn btn-success gl-button gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', display_text: _('Invite members') } } = render 'projects/invite_members_modal', project: @project - else diff --git a/app/views/projects/project_templates/_project_fields_form.html.haml b/app/views/projects/project_templates/_project_fields_form.html.haml index 201e2d5b5fb..7908550ca88 100644 --- a/app/views/projects/project_templates/_project_fields_form.html.haml +++ b/app/views/projects/project_templates/_project_fields_form.html.haml @@ -8,5 +8,5 @@ .selected-icon.gl-mr-3 .selected-template .input-group-append - %button.btn.btn-default.change-template{ type: "button" } + %button.btn.gl-button.btn-default.change-template{ type: "button" } = _('Change template') diff --git a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml index 6ce01566a42..d74449ce2c7 100644 --- a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml @@ -23,4 +23,4 @@ = yield :push_access_levels = render_if_exists 'projects/protected_branches/ee/code_owner_approval_form', f: f .card-footer - = f.submit s_('ProtectedBranch|Protect'), class: 'btn-success btn', disabled: true, data: { qa_selector: 'protect_button' } + = f.submit s_('ProtectedBranch|Protect'), class: 'btn-success gl-button btn', disabled: true, data: { qa_selector: 'protect_button' } diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml index 1d3e3fb11ae..bb848d0e44c 100644 --- a/app/views/projects/protected_branches/shared/_index.html.haml +++ b/app/views/projects/protected_branches/shared/_index.html.haml @@ -4,7 +4,7 @@ .settings-header %h4 Protected branches - %button.btn.js-settings-toggle.qa-expand-protected-branches{ type: 'button' } + %button.btn.gl-button.js-settings-toggle.qa-expand-protected-branches{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p Keep stable branches secure, and force developers to use merge requests. #{link_to "What are protected branches?", help_page_path("user/project/protected_branches")} diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index 3b03e213983..bd365123b81 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -7,7 +7,7 @@ .form-group.col-md-5 = f.label :name, class: 'label-bold', for: 'project_name_edit' do = _('Project name') - = f.text_field :name, class: 'form-control gl-form-input qa-project-name-field', id: "project_name_edit" + = f.text_field :name, class: 'form-control gl-form-input', id: "project_name_edit", data: { qa_selector: 'project_name_field' } .form-group.col-md-7 = f.label :id, class: 'label-bold' do @@ -40,4 +40,4 @@ %hr = link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link' - = f.submit _('Save changes'), class: "gl-button btn btn-success gl-mt-6 qa-save-naming-topics-avatar-button" + = f.submit _('Save changes'), class: "gl-button btn btn-success gl-mt-6", data: { qa_selector: 'save_naming_topics_avatar_button' } diff --git a/app/views/projects/settings/ci_cd/_badge.html.haml b/app/views/projects/settings/ci_cd/_badge.html.haml index 2c3e6387972..38d8c8d26e1 100644 --- a/app/views/projects/settings/ci_cd/_badge.html.haml +++ b/app/views/projects/settings/ci_cd/_badge.html.haml @@ -12,21 +12,21 @@ = render 'shared/ref_switcher', destination: 'badges', align_right: true .card-body .row - .col-md-2.text-center + .col-md-2.gl-text-center Markdown .col-md-10.code.js-syntax-highlight = highlight_badge('.md', badge.to_markdown, language: 'markdown') .row %hr .row - .col-md-2.text-center + .col-md-2.gl-text-center HTML .col-md-10.code.js-syntax-highlight = highlight_badge('.html', badge.to_html, language: 'html') .row %hr .row - .col-md-2.text-center + .col-md-2.gl-text-center AsciiDoc .col-md-10.code.js-syntax-highlight = highlight_badge('.adoc', badge.to_asciidoc) diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index e0c4a3d624e..3b0073848a6 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -96,7 +96,7 @@ = html_escape(_('The regular expression used to find test coverage output in the job log. For example, use %{regex} for Simplecov (Ruby). Leave blank to disable.')) % { regex: '<code>\(\d+.\d+%\)</code>'.html_safe } = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'test-coverage-parsing'), target: '_blank' - = f.submit _('Save changes'), class: "btn btn-success", data: { qa_selector: 'save_general_pipelines_changes_button' } + = f.submit _('Save changes'), class: "btn gl-button btn-success", data: { qa_selector: 'save_general_pipelines_changes_button' } %hr diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index ee49377595b..4ff5ab515ec 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -5,6 +5,8 @@ - expanded = expanded_by_default? - general_expanded = @project.errors.empty? ? expanded : true +- enable_search_settings locals: { container_class: 'gl-my-5' } + %section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded), data: { qa_selector: 'general_pipelines_settings_content' } } .settings-header %h4 @@ -45,16 +47,17 @@ .settings-content = render 'projects/runners/index' -%section.settings.no-animate#js-artifacts-settings{ class: ('expanded' if expanded) } - .settings-header - %h4 - = _("Artifacts") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } - = expanded ? _('Collapse') : _('Expand') - %p - = _("A job artifact is an archive of files and directories saved by a job when it finishes.") - .settings-content - #js-artifacts-settings-app{ data: { full_path: @project.full_path, help_page_path: help_page_path('ci/pipelines/job_artifacts', anchor: 'keep-artifacts-from-most-recent-successful-jobs') } } +- if Gitlab::CurrentSettings.current_application_settings.keep_latest_artifact? + %section.settings.no-animate#js-artifacts-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = _("Artifacts") + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = _("A job artifact is an archive of files and directories saved by a job when it finishes.") + .settings-content + #js-artifacts-settings-app{ data: { full_path: @project.full_path, help_page_path: help_page_path('ci/pipelines/job_artifacts', anchor: 'keep-artifacts-from-most-recent-successful-jobs') } } %section.qa-variables-settings.settings.no-animate#js-cicd-variables-settings{ class: ('expanded' if expanded), data: { qa_selector: 'variables_settings_content' } } .settings-header diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 73722a5a789..5ba796f5720 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -2,6 +2,8 @@ - page_title _('Operations Settings') - breadcrumb_title _('Operations Settings') +- enable_search_settings locals: { container_class: 'gl-my-5' } + = render 'projects/settings/operations/alert_management' = render 'projects/settings/operations/incidents' = render 'projects/settings/operations/error_tracking' diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml index 24fc137fd29..8ac42ce3f81 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -3,6 +3,8 @@ - @content_class = "limit-container-width" unless fluid_layout - deploy_token_description = s_('DeployTokens|Deploy tokens allow access to packages, your repository, and registry images.') +- enable_search_settings locals: { container_class: 'gl-my-5' } + = render "projects/default_branch/show" = render_if_exists "projects/push_rules/index" = render "projects/mirrors/mirror_repos" diff --git a/app/views/shared/_new_commit_form.html.haml b/app/views/shared/_new_commit_form.html.haml index 62ba89e2576..5641c67e462 100644 --- a/app/views/shared/_new_commit_form.html.haml +++ b/app/views/shared/_new_commit_form.html.haml @@ -3,8 +3,11 @@ = render 'shared/commit_message_container', placeholder: placeholder -- if @project.empty_repo? - = hidden_field_tag 'branch_name', @ref +- if project.empty_repo? + - ref = local_assigns[:ref] || @ref + - branch_name_class = project.empty_repo_upload_experiment? ? 'js-branch-name' : nil + + = hidden_field_tag 'branch_name', ref, class: branch_name_class - else - if can?(current_user, :push_code, @project) .form-group.row.branch diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index d1e74cc771e..b82cfc86e26 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -195,7 +195,7 @@ #js-board-labels-toggle - if current_user #js-board-epics-swimlanes-toggle - .js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } } + .js-board-config{ data: { can_admin_list: user_can_admin_list.to_s, has_scope: board.scoped?.to_s } } - if user_can_admin_list - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) .js-create-column-trigger{ data: board_list_data } diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 2b6920ed80f..26986c913f0 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -43,6 +43,9 @@ - options[:dropdown_class] += ' dropdown-extended-height' - options[:footer_content] = true - options[:wrapper_class] = 'js-sidebar-assignee-dropdown' + - options[:toggle_class] += ' js-invite-members-track' + - data['track-event'] = show_invite_members_track_event + - options[:data].merge!(data) - invite_text = _('Invite Members') - track_label = 'edit_assignee' diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 115d0c9a7c5..a33cd7c3b53 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -12,9 +12,10 @@ - css_class += " no-description" if project.description.blank? && !show_last_commit_as_description - cache_key = project_list_cache_key(project, pipeline_status: pipeline_status) - updated_tooltip = time_ago_with_tooltip(project.last_activity_date) -- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) && project.last_pipeline.present? +- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) +- last_pipeline = project.last_pipeline if show_pipeline_status_icon - css_controls_class = compact_mode ? [] : ["flex-lg-row", "justify-content-lg-between"] -- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon +- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present? - avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar' %li.project-row.d-flex{ class: css_class } @@ -68,10 +69,10 @@ .controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class.join(" ") } .icon-container.d-flex.align-items-center - - if show_pipeline_status_icon + - if show_pipeline_status_icon && last_pipeline.present? - pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref) %span.icon-wrapper.pipeline-status - = render 'ci/status/icon', status: project.last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path + = render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path = render_if_exists 'shared/projects/archived', project: project - if stars diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index cdaa739a7b3..fbd61123078 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -13,6 +13,13 @@ .user-profile .cover-block.user-cover-block{ class: [('border-bottom' if profile_tabs.empty?)] } = render layout: 'users/cover_controls' do + - if current_user && current_user.id != @user.id + - if current_user.following?(@user) + = link_to user_unfollow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do + = _('Unfollow') + - else + = link_to user_follow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do + = _('Follow') - if @user == current_user = link_to profile_path, class: link_classes + 'btn gl-button btn-default btn-icon has-tooltip', title: s_('UserProfile|Edit profile'), 'aria-label': 'Edit profile', data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do @@ -26,13 +33,6 @@ = link_to new_abuse_report_path(user_id: @user.id, ref_url: request.referrer), class: link_classes + 'btn gl-button btn-default btn-icon', title: s_('UserProfile|Report abuse'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do = sprite_icon('error') - - if current_user && current_user.id != @user.id - - if current_user.following?(@user) - = link_to user_unfollow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do - = _('Unfollow') - - else - = link_to user_follow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do - = _('Follow') - if can?(current_user, :read_user_profile, @user) = link_to user_path(@user, rss_url_options), class: link_classes + 'btn gl-button btn-default btn-icon has-tooltip', title: s_('UserProfile|Subscribe'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do |