diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /app/views | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'app/views')
229 files changed, 607 insertions, 1111 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml deleted file mode 100644 index aa5543700a7..00000000000 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ /dev/null @@ -1,39 +0,0 @@ -- reporter = abuse_report.reporter -- user = abuse_report.user -%tr - %th.d-block.d-sm-none - %strong= _('User') - %td - - if user - = link_to user.name, user - .light.small - = html_escape(_('Joined %{time_ago}')) % { time_ago: time_ago_with_tooltip(user.created_at).html_safe } - - else - = _('(removed)') - %td - - if reporter - %strong.subheading.d-block.d-sm-none - = _('Reported by %{reporter}').html_safe % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } - .light.gl-display-none.gl-sm-display-block - = link_to(reporter.name, reporter) - .light.small - = time_ago_with_tooltip(abuse_report.created_at) - - else - = _('(removed)') - %td - %strong.subheading.d-block.d-sm-none - = _('Message') - .message - = markdown_field(abuse_report, :message) - %td - - if user && user != current_user - = render Pajamas::ButtonComponent.new(href: admin_abuse_report_path(abuse_report, remove_user: true), variant: :danger, block: true, button_options: { data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name }, confirm_btn_variant: "danger", remote: true, method: :delete }, class: "js-remove-tr" }) do - = _('Remove user & report') - - if user.blocked? - = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, disabled: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do - = _('Already blocked') - - else - = render Pajamas::ButtonComponent.new(href: block_admin_user_path(user), block: true, button_options: { data: { confirm: _('USER WILL BE BLOCKED! Are you sure?'), method: :put } }) do - = _('Block user') - = render Pajamas::ButtonComponent.new(href: [:admin, abuse_report], block: true, button_options: { data: { remote: true, method: :delete }, class: "js-remove-tr" }) do - = _('Remove report') diff --git a/app/views/admin/abuse_reports/index.html.haml b/app/views/admin/abuse_reports/index.html.haml index fee3a846849..ea2d4f3b4af 100644 --- a/app/views/admin/abuse_reports/index.html.haml +++ b/app/views/admin/abuse_reports/index.html.haml @@ -2,35 +2,5 @@ %h1.page-title.gl-font-size-h-display= _('Abuse Reports') -- if Feature.enabled?(:abuse_reports_list) - #js-abuse-reports-list-app{ data: abuse_reports_list_data(@abuse_reports) } - = gl_loading_icon(css_class: 'gl-my-5', size: 'md') -- else - .row-content-block.second-block - = form_tag admin_abuse_reports_path, method: :get, class: 'filter-form' do - .filter-categories.flex-fill - .filter-item.inline - = dropdown_tag(user_dropdown_label(params[:user_id], 'User'), - options: { toggle_class: 'js-filter-submit js-user-search', - title: _('Filter by user'), filter: true, filterInput: 'input#user-search', - dropdown_class: 'dropdown-menu-selectable dropdown-menu-user js-filter-submit', - placeholder: _('Search users'), - data: { current_user: true, field_name: 'user_id' }}) - - .abuse-reports - - if @abuse_reports.present? - .table-holder - %table.table.responsive-table - %thead.d-none.d-md-table-header-group - %tr - %th= _('User') - %th= _('Reported by') - %th.wide= _('Message') - %th= _('Action') - = render @abuse_reports - = paginate @abuse_reports, theme: 'gitlab' - - else - .empty-state - .text-center - %h4= _("There are no abuse reports!") - %h3= emoji_icon('tada') +#js-abuse-reports-list-app{ data: abuse_reports_list_data(@abuse_reports) } + = gl_loading_icon(css_class: 'gl-my-5', size: 'md') diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml index d8d6af606ac..b65649b5a07 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -19,25 +19,6 @@ = f.label :receive_max_input_size, _('Maximum push size (MiB)'), class: 'label-light' = f.number_field :receive_max_input_size, class: 'form-control gl-form-input', title: _('Maximum size limit for a single commit.'), data: { toggle: 'tooltip', container: 'body', qa_selector: 'receive_max_input_size_field' } .form-group - = f.label :max_export_size, _('Maximum export size (MiB)'), class: 'label-light' - = f.number_field :max_export_size, class: 'form-control gl-form-input', title: _('Maximum size of export files.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Set to 0 for no size limit.') - .form-group - = f.label :max_import_size, _('Maximum import size (MiB)'), class: 'label-light' - = f.number_field :max_import_size, class: 'form-control gl-form-input', title: _('Maximum size of import files.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Only effective when remote storage is enabled. Set to 0 for no size limit.') - .form-group - = f.label :max_import_remote_file_size, s_('Import|Maximum import remote file size (MB)'), class: 'label-light' - = f.number_field :max_import_remote_file_size, class: 'form-control gl-form-input', title: s_('Import|Maximum remote file size for imports from external object storages. For example, AWS S3.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Set to 0 for no size limit.') - .form-group - = f.label :bulk_import_max_download_file_size, s_('BulkImport|Direct transfer maximum download file size (MB)'), class: 'label-light' - = f.number_field :bulk_import_max_download_file_size, class: 'form-control gl-form-input', title: s_('BulkImport|Maximum download file size when importing from source GitLab instances by direct transfer.'), data: { toggle: 'tooltip', container: 'body' } - .form-group - = f.label :max_decompressed_archive_size, s_('Import|Maximum decompressed size (MiB)'), class: 'label-light' - = f.number_field :max_decompressed_archive_size, class: 'form-control gl-form-input', title: s_('Import|Maximum size of decompressed archive.'), data: { toggle: 'tooltip', container: 'body' } - %span.form-text.text-muted= _('Set to 0 for no size limit.') - .form-group = f.label :session_expire_delay, _('Session duration (minutes)'), class: 'label-light' = f.number_field :session_expire_delay, class: 'form-control gl-form-input', title: _('Maximum duration of a session.'), data: { toggle: 'tooltip', container: 'body' } %span.form-text.text-muted#session_expire_delay_help_block= _('Restart GitLab to apply changes.') @@ -53,7 +34,7 @@ .form-group = f.label :user_oauth_applications, _('User OAuth applications'), class: 'label-bold' - = f.gitlab_ui_checkbox_component :user_oauth_applications, _('Allow users to register any application to use GitLab as an OAuth provider') + = f.gitlab_ui_checkbox_component :user_oauth_applications, _('Allow users to register any application to use GitLab as an OAuth provider. This setting does not affect group-level OAuth applications.') .form-group = f.label :user_default_external, _('New users set to external'), class: 'label-bold' = f.gitlab_ui_checkbox_component :user_default_external, _('Newly-registered users are external by default') diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml index 2f31eb5f6d1..65049fa5466 100644 --- a/app/views/admin/application_settings/_email.html.haml +++ b/app/views/admin/application_settings/_email.html.haml @@ -16,9 +16,6 @@ = render_if_exists 'admin/application_settings/email_additional_text_setting', form: f .form-group - = f.gitlab_ui_checkbox_component :in_product_marketing_emails_enabled, _('Enable in-product marketing emails'), help_text: _('Send emails to help guide new users through the onboarding process.') - - .form-group = f.gitlab_ui_checkbox_component :user_deactivation_emails_enabled, _('Enable user deactivation emails'), help_text: _('Send emails to users upon account deactivation.') - if Feature.enabled?(:deactivation_email_additional_text) diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index 988153d45a4..1f56487cea4 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -6,7 +6,7 @@ = _('Gitpod') = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') - .gl-text-secondary + .gl-text-secondary.gl-mb-5 #js-gitpod-settings-help-text{ data: {"message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } } = link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information') diff --git a/app/views/admin/application_settings/_import_and_export.html.haml b/app/views/admin/application_settings/_import_and_export.html.haml new file mode 100644 index 00000000000..8e321406bf8 --- /dev/null +++ b/app/views/admin/application_settings/_import_and_export.html.haml @@ -0,0 +1,43 @@ += gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-import-export-settings'), html: { class: 'fieldset-form', id: 'import-export-settings' } do |f| + = form_errors(@application_setting) + + %fieldset + .form-group + = f.label :import_sources, s_('AdminSettings|Import sources'), class: 'label-bold gl-mb-0' + %span.form-text.gl-mt-0.gl-mb-3#import-sources-help + - tag_pair_github_docs = tag_pair(link_to('', help_page_path('integration/github'), target: '_blank', rel: 'noopener noreferrer'), :github_docs_link_start, :github_docs_link_end) + - tag_pair_bitbucket_docs = tag_pair(link_to('', help_page_path('integration/bitbucket'), target: '_blank', rel: 'noopener noreferrer'), :bitbucket_docs_link_start, :bitbucket_docs_link_end) + = safe_format(s_('AdminSettings|Code can be imported from enabled sources during project creation. OmniAuth must be configured for GitHub %{github_docs_link_start}%{icon}%{github_docs_link_end} and Bitbucket %{bitbucket_docs_link_start}%{icon}%{bitbucket_docs_link_end}.'), tag_pair_github_docs, tag_pair_bitbucket_docs, icon: sprite_icon('question-o')) + = hidden_field_tag 'application_setting[import_sources][]' + - import_sources_checkboxes(f).each do |source| + = source + .form-group{ data: { testid: 'project-export' } } + = f.label :project_export, s_('AdminSettings|Project export'), class: 'label-bold' + = f.gitlab_ui_checkbox_component :project_export_enabled, s_('AdminSettings|Enabled') + .form-group{ data: { testid: 'bulk-import' } } + = f.label :bulk_import, s_('AdminSettings|Allow migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold' + = f.gitlab_ui_checkbox_component :bulk_import_enabled, s_('AdminSettings|Enabled') + .form-group + = f.label :max_export_size, _('Maximum export size (MiB)'), class: 'label-light' + = f.number_field :max_export_size, class: 'form-control gl-form-input', title: _('Maximum size of export files.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 for no size limit.') + .form-group + = f.label :max_import_size, _('Maximum import size (MiB)'), class: 'label-light' + = f.number_field :max_import_size, class: 'form-control gl-form-input', title: _('Maximum size of import files.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Only effective when remote storage is enabled. Set to 0 for no size limit.') + .form-group + = f.label :max_import_remote_file_size, s_('Import|Maximum import remote file size (MiB)'), class: 'label-light' + = f.number_field :max_import_remote_file_size, class: 'form-control gl-form-input', title: s_('Import|Maximum remote file size for imports from external object storages. For example, AWS S3.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 for no size limit.') + .form-group + = f.label :bulk_import_max_download_file_size, s_('BulkImport|Direct transfer maximum download file size (MiB)'), class: 'label-light' + = f.number_field :bulk_import_max_download_file_size, class: 'form-control gl-form-input', title: s_('BulkImport|Maximum download file size when importing from source GitLab instances by direct transfer.'), data: { toggle: 'tooltip', container: 'body' } + .form-group + = f.label :max_decompressed_archive_size, s_('Import|Maximum decompressed file size for archives from imports (MiB)'), class: 'label-light' + = f.number_field :max_decompressed_archive_size, class: 'form-control gl-form-input', title: s_('Import|Maximum size of decompressed archive.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 for no size limit.') + .form-group + = f.label :decompress_archive_file_timeout, s_('Import|Timeout for decompressing archived files (seconds)'), class: 'label-light' + = f.number_field :decompress_archive_file_timeout, class: 'form-control gl-form-input', title: s_('Import|Timeout for decompressing archived files.'), data: { toggle: 'tooltip', container: 'body' } + %span.form-text.text-muted= _('Set to 0 to disable timeout.') + = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 1eb6b747704..d5f2c6afee3 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -19,28 +19,25 @@ = f.label :max_pages_size, _('Maximum size of pages (MiB)'), class: 'label-bold' = f.number_field :max_pages_size, class: 'form-control gl-form-input' .form-text.text-muted - - pages_link_url = help_page_path('administration/pages/index', anchor: 'set-maximum-size-of-gitlab-pages-site-in-a-project') - - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url } - = s_('AdminSettings|Set the maximum size of GitLab Pages per project (0 for unlimited). %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('administration/pages/index', anchor: 'set-maximum-size-of-gitlab-pages-site-in-a-project'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AdminSettings|Set the maximum size of GitLab Pages per project (0 for unlimited). %{link_start}Learn more.%{link_end}'), tag_pair(link, :link_start, :link_end)) .form-group = f.label :max_pages_custom_domains_per_project, s_('AdminSettings|Maximum number of custom domains per project'), class: 'label-bold' = f.number_field :max_pages_custom_domains_per_project, class: 'form-control gl-form-input' .form-text.text-muted - - pages_link_url = help_page_path('administration/pages/index', anchor: 'set-maximum-number-of-gitlab-pages-custom-domains-for-a-project') - - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url } - = s_('AdminSettings|Set the maximum number of GitLab Pages custom domains per project (0 for unlimited). %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('administration/pages/index', anchor: 'set-maximum-number-of-gitlab-pages-custom-domains-for-a-project'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AdminSettings|Set the maximum number of GitLab Pages custom domains per project (0 for unlimited). %{link_start}Learn more.%{link_end}'), tag_pair(link, :link_start, :link_end)) %h5 = s_("AdminSettings|Configure Let's Encrypt") %p - - lets_encrypt_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: "https://letsencrypt.org/" } - = _("%{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end} is a free, automated, and open certificate authority (CA) that issues digital certificates to enable HTTPS (SSL/TLS) for sites.").html_safe % { lets_encrypt_link_start: lets_encrypt_link_start, lets_encrypt_link_end: '</a>'.html_safe } + - link = link_to('', "https://letsencrypt.org/", target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("%{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end} is a free, automated, and open certificate authority (CA) that issues digital certificates to enable HTTPS (SSL/TLS) for sites."), tag_pair(link, :lets_encrypt_link_start, :lets_encrypt_link_end)) .form-group = f.label :lets_encrypt_notification_email, s_("AdminSettings|Let's Encrypt email"), class: 'label-bold' = f.text_field :lets_encrypt_notification_email, class: 'form-control gl-form-input' .form-text.text-muted - - pages_link_url = help_page_path('administration/pages/index', anchor: 'lets-encrypt-integration') - - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url } - = s_("AdminSettings|A Let's Encrypt account will be configured for this GitLab instance using this email address. You will receive emails to warn of expiring certificates. %{link_start}Learn more.%{link_end}").html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('administration/pages/index', anchor: 'lets-encrypt-integration'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_("AdminSettings|A Let's Encrypt account will be configured for this GitLab instance using this email address. You will receive emails to warn of expiring certificates. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) .form-group - terms_of_service_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: lets_encrypt_terms_of_service_admin_application_settings_path } = f.gitlab_ui_checkbox_component :lets_encrypt_terms_of_service_accepted, diff --git a/app/views/admin/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml index 3a7a951d137..cd17e4bdec3 100644 --- a/app/views/admin/application_settings/_protected_paths.html.haml +++ b/app/views/admin/application_settings/_protected_paths.html.haml @@ -4,7 +4,7 @@ %fieldset .form-group = f.gitlab_ui_checkbox_component :throttle_protected_paths_enabled, - _('Enable rate limiting for POST requests to the specified paths'), + _('Enable rate limiting for requests to the specified paths'), help_text: _('Helps reduce request volume for protected paths.') .form-group = f.label :throttle_protected_paths_requests_per_period, 'Maximum requests per period per user', class: 'label-bold' @@ -14,11 +14,14 @@ = f.number_field :throttle_protected_paths_period_in_seconds, class: 'form-control gl-form-input' .form-group = f.label :protected_paths, class: 'label-bold' do - = _('Paths to protect with rate limiting') + = _('Paths with rate limiting for POST requests') = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10 + .form-group + = f.label :protected_paths_for_get_request, class: 'label-bold' do + = _('Paths with rate limiting for GET requests') + = f.text_area :protected_paths_for_get_request_raw, class: 'form-control gl-form-input', rows: 10 %span.form-text.text-muted - - relative_url_link = 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab' - - relative_url_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: relative_url_link } - = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } + - link = link_to('', 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab', target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.'), tag_pair(link, :relative_url_link_start, :relative_url_link_end)) = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_search_limits.html.haml b/app/views/admin/application_settings/_search_limits.html.haml index 396c263dd5d..b318f7e5a20 100644 --- a/app/views/admin/application_settings/_search_limits.html.haml +++ b/app/views/admin/application_settings/_search_limits.html.haml @@ -12,5 +12,11 @@ = f.label :search_rate_limit_unauthenticated, _('Maximum number of requests per minute for an unauthenticated IP address'), class: 'label-bold' = f.number_field :search_rate_limit_unauthenticated, class: 'form-control gl-form-input' + .form-group + = f.label :search_rate_limit_allowlist, _('Users to exclude from the rate limit'), class: 'label-bold' + = f.text_area :search_rate_limit_allowlist_raw, class: 'form-control gl-form-input', rows: 5, aria: { describedBy: 'search-rate-limit-allowlist-field-description' } + .form-text.text-muted{ id: 'search-rate-limit-allowlist-field-description' } + = _('List of users who are allowed to exceed the rate limit. Example: username1, username2') + = f.submit _('Save changes'), data: { qa_selector: 'save_changes_button' }, pajamas_button: true diff --git a/app/views/admin/application_settings/_sentry.html.haml b/app/views/admin/application_settings/_sentry.html.haml index 20164cfe88d..9f2a40e4e54 100644 --- a/app/views/admin/application_settings/_sentry.html.haml +++ b/app/views/admin/application_settings/_sentry.html.haml @@ -17,4 +17,12 @@ = f.label :sentry_environment, _('Environment'), class: 'label-light' = f.text_field :sentry_environment, class: 'form-control gl-form-input', placeholder: Rails.env + %p.text-muted + = _("Changing any setting bellow doesn't require an application restart") + + %fieldset + .form-group + = f.label :sentry_clientside_traces_sample_rate, _('Clientside traces sample rate'), class: 'label-light' + = f.number_field :sentry_clientside_traces_sample_rate, class: 'form-control gl-form-input', placeholder: '0.5', min: 0, max: 1, step: 0.001 + = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_silent_mode_settings_form.html.haml b/app/views/admin/application_settings/_silent_mode_settings_form.html.haml new file mode 100644 index 00000000000..92b4174842f --- /dev/null +++ b/app/views/admin/application_settings/_silent_mode_settings_form.html.haml @@ -0,0 +1,11 @@ +%section.settings.no-animate#js-silent-mode-toggle{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only + = s_('SilentMode|Silent mode') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded_by_default? ? _('Collapse') : _('Expand') + %p.gl-text-secondary + = s_('SilentMode|Suppress outbound communication, such as emails, from GitLab.') + = link_to _('Learn more.'), help_page_path('administration/silent_mode/index'), target: '_blank', rel: 'noopener noreferrer' + .settings-content + #js-silent-mode-settings{ data: { "silent-mode-enabled" => @application_setting.silent_mode_enabled.to_s } } diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 6f9aad56ce8..1b90432e1f3 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -6,7 +6,7 @@ = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p.gl-text-secondary - - help_link = link_to('', help_page_path('development/snowplow/index'), target: '_blank', rel: 'noopener noreferrer') + - help_link = link_to('', help_page_path('development/internal_analytics/snowplow/index'), target: '_blank', rel: 'noopener noreferrer') - snowplow_link = link_to('', 'https://snowplow.io/', target: '_blank', rel: 'noopener noreferrer') = safe_format(_('Configure %{snowplow_link_start}Snowplow%{snowplow_link_end} to track events. %{help_link_start}Learn more.%{help_link_end}'), tag_pair(snowplow_link, :snowplow_link_start, :snowplow_link_end), tag_pair(help_link, :help_link_start, :help_link_end)) .settings-content diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 0455394444c..5a3814ca83d 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -12,7 +12,7 @@ help_text: _("GitLab informs you if a new version is available. %{link_start}What information does GitLab Inc. collect?%{link_end}").html_safe % { link_start: help_link_start, link_end: link_end } .form-group - can_be_configured = @application_setting.usage_ping_can_be_configured? - - service_ping_link_start = link_start % { url: help_page_path('development/service_ping/index') } + - service_ping_link_start = link_start % { url: help_page_path('development/internal_analytics/service_ping/index') } - deactivating_service_ping_link_start = link_start % { url: help_page_path('administration/settings/usage_statistics', anchor: 'disable-usage-statistics-with-the-configuration-file') } - usage_ping_help_text = s_('AdminSettings|To help improve GitLab and its user experience, GitLab periodically collects usage information. %{link_start}What information is shared with GitLab Inc.?%{link_end}').html_safe % { link_start: service_ping_link_start, link_end: link_end } - disabled_help_text = s_('AdminSettings|Service ping is disabled in your configuration file, and cannot be enabled through this form. For more information, see the documentation on %{link_start}deactivating service ping%{link_end}.').html_safe % { link_start: deactivating_service_ping_link_start, link_end: link_end } @@ -35,19 +35,10 @@ checkbox_options: { id: 'application_setting_usage_ping_features_enabled' }, label_options: { id: 'service_ping_features_label' } .form-text.gl-text-gray-500.gl-pl-6 - %p.gl-mb-3= s_('AdminSettings|Registration Features include:') - - email_from_gitlab_path = help_page_path('administration/email_from_gitlab') - - repo_size_limit_path = help_page_path('administration/settings/account_and_limit_settings', anchor: 'repository-size-limit') - - restrict_ip_path = help_page_path('user/group/access_and_permissions', anchor: 'restrict-group-access-by-ip-address') - - email_from_gitlab_link = link_start % { url: email_from_gitlab_path } - - repo_size_limit_link = link_start % { url: repo_size_limit_path } - - restrict_ip_link = link_start % { url: restrict_ip_path } - %ul - %li - = s_('AdminSettings|Email from GitLab - email users right from the Admin Area. %{link_start}Learn more%{link_end}.').html_safe % { link_start: email_from_gitlab_link, link_end: link_end } - %li - = s_('AdminSettings|Limit project size at a global, group, and project level. %{link_start}Learn more%{link_end}.').html_safe % { link_start: repo_size_limit_link, link_end: link_end } - %li - = s_('AdminSettings|Restrict group access by IP address. %{link_start}Learn more%{link_end}.').html_safe % { link_start: restrict_ip_link, link_end: link_end } + %p.gl-mb-3 + - registration_features_gitlab_path = help_page_path('administration/settings/usage_statistics', anchor: 'registration-features-program') + - registration_features_gitlab_link = link_to('', registration_features_gitlab_path, target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AdminSettings|For a list of included Registration Features, see %{link_start}the documentation%{link_end}.'), tag_pair(registration_features_gitlab_link, :link_start, :link_end)) + = f.submit _('Save changes'), pajamas_button: true diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index 7142128d2cd..624f5a48c3a 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -19,33 +19,17 @@ = s_('AdminSettings|Restricted visibility levels') %small.form-text.text-gl-muted = s_('AdminSettings|Prevent non-administrators from using the selected visibility levels for groups, projects and snippets.') + = s_('AdminSettings|The selected level must be different from the selected default group and project visibility.') + = link_to _('Learn more.'), help_page_path('administration/settings/visibility_and_access_controls', anchor: 'restrict-visibility-levels'), target: '_blank', rel: 'noopener noreferrer' = hidden_field_tag 'application_setting[restricted_visibility_levels][]' .gl-form-checkbox-group - restricted_level_checkboxes(f).each do |checkbox| = checkbox - .form-group - = f.label :import_sources, s_('AdminSettings|Import sources'), class: 'label-bold gl-mb-0' - %span.form-text.gl-mt-0.gl-mb-3#import-sources-help - = _('Code can be imported from enabled sources during project creation. OmniAuth must be configured for GitHub') - = link_to sprite_icon('question-o'), help_page_path("integration/github") - and Bitbucket - = link_to sprite_icon('question-o'), help_page_path("integration/bitbucket") - = hidden_field_tag 'application_setting[import_sources][]' - - import_sources_checkboxes(f).each do |source| - = source = render_if_exists 'admin/application_settings/ldap_access_setting', form: f = render_if_exists 'admin/application_settings/saml_group_locks_setting', form: f - .form-group{ data: { testid: 'project-export' } } - = f.label :project_export, s_('AdminSettings|Project export'), class: 'label-bold' - = f.gitlab_ui_checkbox_component :project_export_enabled, s_('AdminSettings|Enabled') - - .form-group{ data: { testid: 'bulk-import' } } - = f.label :bulk_import, s_('AdminSettings|Allow migrating GitLab groups and projects by direct transfer'), class: 'gl-font-weight-bold' - = f.gitlab_ui_checkbox_component :bulk_import_enabled, s_('AdminSettings|Enabled') - .form-group %label.label-bold= _('Enabled Git access protocols') = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control') diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 6ae9c58ffcd..5aa2684f084 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -10,7 +10,7 @@ = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p.gl-text-secondary - = _('Set visibility of project contents. Configure import sources and Git access protocols.') + = s_('AdminSettings|Set visibility of project contents and configure Git access protocols.') .settings-content = render 'visibility_and_access' @@ -25,6 +25,17 @@ .settings-content = render 'account_and_limit' +%section.settings.as-import-export.no-animate#js-import-export-settings{ class: ('expanded' if expanded_by_default?), data: { testid: 'admin-import-export-settings' } } + .settings-header + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only + = _('Import and export settings') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle '}) do + = expanded_by_default? ? _('Collapse') : _('Expand') + %p.gl-text-secondary + = _('Configure import sources and settings related to import and export features.') + .settings-content + = render 'import_and_export' + %section.settings.as-diff-limits.no-animate#js-merge-request-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only @@ -89,6 +100,7 @@ = render 'terminal' = render_if_exists 'admin/application_settings/maintenance_mode_settings_form' += render 'admin/application_settings/silent_mode_settings_form' = render 'admin/application_settings/gitpod' = render 'admin/application_settings/kroki' = render 'admin/application_settings/mailgun' diff --git a/app/views/admin/dev_ops_report/_score.html.haml b/app/views/admin/dev_ops_report/_score.html.haml index 208afefc73b..a504563ad91 100644 --- a/app/views/admin/dev_ops_report/_score.html.haml +++ b/app/views/admin/dev_ops_report/_score.html.haml @@ -1,6 +1,6 @@ - service_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled - if !service_ping_enabled - #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/service_ping/index.md') } } + #js-devops-service-ping-disabled{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_service_ping_path: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/internal_analytics/service_ping/index.md') } } - else #js-devops-score{ data: { devops_score_metrics: devops_score_metrics(@metric).to_json, no_data_image_path: image_path('dev_ops_report_no_data.svg'), devops_score_intro_image_path: image_path('dev_ops_report_overview.svg') } } diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index b708564e23a..2da28910af3 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -41,6 +41,6 @@ - else .gl-mt-5 - = f.submit _('Save changes'), data: { qa_selector: 'save_changes_button' }, pajamas_button: true + = f.submit _('Save changes'), data: { testid: 'save-changes-button' }, pajamas_button: true = render Pajamas::ButtonComponent.new(href: admin_group_path(@group)) do = _('Cancel') diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index 20d24161c57..0c4bf91f545 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -1,11 +1,11 @@ - group = local_assigns.fetch(:group) -%li.group-row.gl-py-3.gl-align-items-center{ class: 'gl-display-flex!', data: { qa_selector: 'group_row_content' } } +%li.group-row.gl-py-3.gl-align-items-center{ class: 'gl-display-flex!', data: { testid: 'group-row-content' } } = render Pajamas::AvatarComponent.new(group, size: 32, alt: '') .gl-min-w-0.gl-flex-grow-1.gl-ml-3 .title - = link_to [:admin, group], class: 'group-name', data: { qa_selector: 'group_name_link' } do + = link_to [:admin, group], class: 'group-name', data: { testid: 'group-name-link' } do = group.full_name - if group.description.present? diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 2a49b9c5ad8..9f42897d1da 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -7,7 +7,7 @@ = hidden_field_tag :sort, @sort .search-holder .search-field-holder - = search_field_tag :name, params[:name].presence, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' } + = search_field_tag :name, params[:name].presence, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { testid: 'group-search-field' } = sprite_icon('search', css_class: 'search-icon') = render "shared/groups/dropdown", options_hash: admin_groups_sort_options_hash = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_admin_group_path) do diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 5f5f6c98663..f7a49c88d78 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -8,7 +8,7 @@ = _('Group: %{group_name}') % { group_name: @group.full_name } = render Pajamas::ButtonComponent.new(href: admin_group_edit_path(@group), - button_options: { class: 'gl-float-right', data: { qa_selector: 'edit_group_link' }}, + button_options: { class: 'gl-float-right', data: { testid: 'edit-group-link' }}, icon: 'pencil') do = _('Edit') %hr diff --git a/app/views/admin/hook_logs/show.html.haml b/app/views/admin/hook_logs/show.html.haml index 0ccde159905..096fae8d457 100644 --- a/app/views/admin/hook_logs/show.html.haml +++ b/app/views/admin/hook_logs/show.html.haml @@ -1,5 +1,5 @@ - page_title _('Request details') -%h1.page-title.gl-font-size-h-display +%h2.page-title.gl-font-size-h-display = _("Request details") %hr diff --git a/app/views/admin/identities/_identity.html.haml b/app/views/admin/identities/_identity.html.haml index a24cd000464..921232125ff 100644 --- a/app/views/admin/identities/_identity.html.haml +++ b/app/views/admin/identities/_identity.html.haml @@ -7,6 +7,8 @@ = saml_group_link(identity) %td = identity.extern_uid + %td + = '-' %td{ class: 'gl-py-0!' } - button_classes = 'has-tooltip gl-my-3' = render Pajamas::ButtonComponent.new(category: :tertiary, diff --git a/app/views/admin/identities/index.html.haml b/app/views/admin/identities/index.html.haml index 1bb14969939..8077f0e15ca 100644 --- a/app/views/admin/identities/index.html.haml +++ b/app/views/admin/identities/index.html.haml @@ -10,6 +10,7 @@ %th{ class: 'gl-border-t-0!' }= s_('Identity|Provider ID') %th{ class: 'gl-border-t-0!' }= _('Group') %th{ class: 'gl-border-t-0!' }= _('Identifier') + %th{ class: 'gl-border-t-0!' }= s_('Identity|Active') %th{ class: 'gl-border-t-0!' }= _('Actions') - if identity_cells_to_render?(@identities, @user) = render_if_exists partial: 'admin/identities/scim_identity', collection: scim_identities_collection(@user) @@ -17,6 +18,6 @@ - else %tbody %tr - %td{ colspan: '5' } + %td{ colspan: '6' } .text-center.my-2 = _('This user has no identities') diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index c5632e0d70b..b8a9ad32259 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -1,30 +1,7 @@ - add_page_specific_style 'page_bundles/ci_status' -- add_page_specific_style 'page_bundles/admin/jobs_index' - breadcrumb_title _("Jobs") - page_title _("Jobs") -- if Feature.enabled?(:admin_jobs_vue) - #admin-jobs-app{ data: { job_statuses: job_statuses.to_json, empty_state_svg_path: image_path('jobs-empty-state.svg'), url: cancel_all_admin_jobs_path } } -- else - .top-area - .scrolling-tabs-container.inner-page-scroll-tabs.gl-flex-grow-1.gl-min-w-0.gl-w-full - %button.fade-left{ type: 'button', title: _('Scroll left'), 'aria-label': _('Scroll left') } - = sprite_icon('chevron-lg-left', size: 12) - %button.fade-right{ type: 'button', title: _('Scroll right'), 'aria-label': _('Scroll right') } - = sprite_icon('chevron-lg-right', size: 12) - - build_path_proc = ->(scope) { admin_jobs_path(scope: scope) } - = render "shared/builds/tabs", build_path_proc: build_path_proc, all_builds: @all_builds, scope: @scope - - - if @all_builds.running_or_pending.any? - #js-stop-jobs-modal - .nav-controls - = render Pajamas::ButtonComponent.new(variant: :danger, button_options: { id: 'js-stop-jobs-button', data: { url: cancel_all_admin_jobs_path } }) do - = s_('AdminArea|Stop all jobs') - - .row-content-block.second-block - #{(@scope || 'all').capitalize} jobs - - %ul.content-list.builds-content-list.admin-builds-table - = render "projects/jobs/table", builds: @builds, admin: true +#admin-jobs-app{ data: { job_statuses: job_statuses.to_json, empty_state_svg_path: image_path('jobs-empty-state.svg'), url: cancel_all_admin_jobs_path } } diff --git a/app/views/admin/topics/_form.html.haml b/app/views/admin/topics/_form.html.haml index c3b5161d617..2638e45c9eb 100644 --- a/app/views/admin/topics/_form.html.haml +++ b/app/views/admin/topics/_form.html.haml @@ -20,7 +20,7 @@ = f.label :description, _("Description") .js-markdown-editor{ data: { render_markdown_path: preview_markdown_admin_topics_path, markdown_docs_path: help_page_path('user/markdown'), - qa_selector: 'topic_form_description', + testid: 'topic-form-description', form_field_placeholder: _('Write a description…'), supports_quick_actions: 'false', enable_autocomplete: 'false', diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 4979f7e28e7..5c80b3b4352 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -9,7 +9,7 @@ = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control gl-form-input gl-form-input-sm' .form-group.gl-form-group{ role: 'group' } - = f.gitlab_ui_checkbox_component :can_create_group, s_('AdminUsers|Can create group') + = f.gitlab_ui_checkbox_component :can_create_group, s_('AdminUsers|Can create top level group') = f.gitlab_ui_checkbox_component :private_profile, s_('AdminUsers|Private profile') %fieldset.form-group.gl-form-group diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index 8f7741b8a32..f6b7db2032f 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -31,7 +31,7 @@ - if impersonation_enabled? .gl-p-2 %span.btn-group{ class: !@can_impersonate ? 'has-tooltip' : nil, title: @impersonation_error_text } - = render Pajamas::ButtonComponent.new(disabled: !@can_impersonate, method: :post, href: impersonate_admin_user_path(@user), button_options: { data: { qa_selector: 'impersonate_user_link', testid: 'impersonate_user_link' } }) do + = render Pajamas::ButtonComponent.new(disabled: !@can_impersonate, method: :post, href: impersonate_admin_user_path(@user), button_options: { data: { testid: 'impersonate-user-link' } }) do = _('Impersonate') - if can_force_email_confirmation?(@user) .gl-p-2 @@ -48,5 +48,5 @@ = gl_tab_link_to _("SSH keys"), keys_admin_user_path(@user) = gl_tab_link_to _("Identities"), admin_user_identities_path(@user) - if impersonation_enabled? - = gl_tab_link_to _("Impersonation Tokens"), admin_user_impersonation_tokens_path(@user), data: { qa_selector: 'impersonation_tokens_tab' } + = gl_tab_link_to _("Impersonation Tokens"), admin_user_impersonation_tokens_path(@user), data: { testid: 'impersonation-tokens-tab' } .gl-mb-3 diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 213d5847986..d4a9009a0cf 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -35,7 +35,7 @@ = gl_tab_link_to admin_users_path(filter: "banned"), { item_active: active_when(params[:filter] == 'banned'), class: 'gl-border-0!' } do = s_('AdminUsers|Banned') = gl_tab_counter_badge(limited_counter_with_delimiter(User.banned)) - = gl_tab_link_to admin_users_path(filter: "blocked_pending_approval"), { item_active: active_when(params[:filter] == 'blocked_pending_approval'), class: 'filter-blocked-pending-approval gl-border-0!', data: { qa_selector: 'pending_approval_tab' } } do + = gl_tab_link_to admin_users_path(filter: "blocked_pending_approval"), { item_active: active_when(params[:filter] == 'blocked_pending_approval'), class: 'filter-blocked-pending-approval gl-border-0!', data: { testid: 'pending-approval-tab' } } do = s_('AdminUsers|Pending approval') = gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked_pending_approval)) = gl_tab_link_to admin_users_path(filter: "deactivated"), { item_active: active_when(params[:filter] == 'deactivated'), class: 'gl-border-0!' } do @@ -56,7 +56,7 @@ = hidden_field_tag "filter", h(params[:filter]) .search-holder .search-field-holder.gl-mb-4 - = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email, or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { qa_selector: 'user_search_field' } + = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email, or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { testid: 'user-search-field' } - if @sort.present? = hidden_field_tag :sort, @sort = sprite_icon('search', css_class: 'search-icon') diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index a4ae29bed81..4cc3e12a8ad 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -45,7 +45,7 @@ = link_button_to nil, remove_email_admin_user_path(@user, email), data: { confirm: _("Are you sure you want to remove %{email}?") % { email: email.email }, 'confirm-btn-variant': 'danger' }, method: :delete, class: 'float-right', title: _('Remove secondary email'), id: "remove_email_#{email.id}", variant: :danger, size: :small, icon: 'close' %li %span.light ID: - %strong{ data: { qa_selector: 'user_id_content' } } + %strong{ data: { testid: 'user-id-content' } } = @user.id %li %span.light= _('Namespace ID:') @@ -71,7 +71,7 @@ = render_if_exists 'admin/users/provisioned_by', user: @user %li - %span.light= _('Can create groups:') + %span.light= _('Can create top level groups:') %strong = @user.can_create_group ? _('Yes') : _('No') %li diff --git a/app/views/ci/runner/_how_to_setup_runner.html.haml b/app/views/ci/runner/_how_to_setup_runner.html.haml index cdf25a9348c..c46aabf2604 100644 --- a/app/views/ci/runner/_how_to_setup_runner.html.haml +++ b/app/views/ci/runner/_how_to_setup_runner.html.haml @@ -8,13 +8,13 @@ = _("Register the runner with this URL:") %br %code#coordinator_address= root_url(only_path: false) - = clipboard_button(target: '#coordinator_address', title: _("Copy URL")) + = deprecated_clipboard_button(target: '#coordinator_address', title: _("Copy URL")) %br %br = _("And this registration token:") %br %code#registration_token{ data: {testid: 'registration_token' } }= registration_token - = clipboard_button(target: '#registration_token', title: _("Copy token")) + = deprecated_clipboard_button(target: '#registration_token', title: _("Copy token")) .gl-mt-3.gl-mb-3 = render Pajamas::ButtonComponent.new(variant: :default, method: :put, href: reset_token_url, button_options: { id: 'Reset registration token', data: { confirm: _("Are you sure you want to reset the registration token?") } }) do diff --git a/app/views/ci/variables/_variable_row.html.haml b/app/views/ci/variables/_variable_row.html.haml deleted file mode 100644 index a710655aa20..00000000000 --- a/app/views/ci/variables/_variable_row.html.haml +++ /dev/null @@ -1,36 +0,0 @@ -- form_field = local_assigns.fetch(:form_field, nil) -- variable = local_assigns.fetch(:variable, nil) - -- id = variable&.id -- variable_type = variable&.variable_type -- key = variable&.key -- value = variable&.value - -- id_input_name = "#{form_field}[variables_attributes][][id]" -- destroy_input_name = "#{form_field}[variables_attributes][][_destroy]" -- variable_type_input_name = "#{form_field}[variables_attributes][][variable_type]" -- key_input_name = "#{form_field}[variables_attributes][][key]" -- value_input_name = "#{form_field}[variables_attributes][][secret_value]" - -%li.js-row.ci-variable-row{ data: { is_persisted: "#{!id.nil?}" } } - .ci-variable-row-body.border-bottom - %input.js-ci-variable-input-id{ type: "hidden", name: id_input_name, value: id } - %input.js-ci-variable-input-destroy{ type: "hidden", name: destroy_input_name } - %select.js-ci-variable-input-variable-type.ci-variable-body-item.form-control.select-control.custom-select.table-section.section-15{ name: variable_type_input_name } - = options_for_select(ci_variable_type_options, variable_type) - %input.js-ci-variable-input-key.ci-variable-body-item.form-control.gl-form-input.table-section.section-15{ type: "text", - name: key_input_name, - value: key, - placeholder: s_('CiVariables|Input variable key') } - .ci-variable-body-item.gl-show-field-errors.table-section.section-15.border-top-0.p-0 - .form-control.js-secret-value-placeholder.overflow-hidden{ class: ('hide' unless id) } - = '*' * 17 - %textarea.js-ci-variable-input-value.js-secret-value.form-control.gl-form-input{ class: ('hide' if id), - rows: 1, - name: value_input_name, - placeholder: s_('CiVariables|Input variable value') } - = value - %p.masking-validation-error.gl-field-error.hide - = s_("CiVariables|Cannot use Masked Variable with current value") - = link_to sprite_icon('question-o'), help_page_path('ci/variables/index', anchor: 'mask-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer' - = render Pajamas::ButtonComponent.new(icon: 'close', button_options: { class: 'js-row-remove-button ci-variable-row-remove-button table-section', 'aria-label': s_('CiVariables|Remove variable row') }) diff --git a/app/views/clusters/clusters/_provider_details_form.html.haml b/app/views/clusters/clusters/_provider_details_form.html.haml index 59706b6d8c4..4b7164f9845 100644 --- a/app/views/clusters/clusters/_provider_details_form.html.haml +++ b/app/views/clusters/clusters/_provider_details_form.html.haml @@ -1,7 +1,7 @@ = gitlab_ui_form_for cluster, url: update_cluster_url_path, html: { class: 'js-provider-details gl-show-field-errors', role: 'form' }, as: :cluster do |field| .form-group - - copy_name_btn = clipboard_button(text: cluster.name, title: s_('ClusterIntegration|Copy Kubernetes cluster name'), + - copy_name_btn = deprecated_clipboard_button(text: cluster.name, title: s_('ClusterIntegration|Copy Kubernetes cluster name'), class: 'input-group-text btn-default') if cluster.read_only_kubernetes_platform_fields? = field.label :name, s_('ClusterIntegration|Kubernetes cluster name'), class: 'label-bold required' .input-group.gl-field-error-anchor @@ -12,7 +12,7 @@ = field.fields_for :platform_kubernetes, platform do |platform_field| .form-group - - copy_api_url = clipboard_button(text: platform.api_url, title: s_('ClusterIntegration|Copy API URL'), + - copy_api_url = deprecated_clipboard_button(text: platform.api_url, title: s_('ClusterIntegration|Copy API URL'), class: 'input-group-text btn-default') if cluster.read_only_kubernetes_platform_fields? = platform_field.label :api_url, s_('ClusterIntegration|API URL'), class: 'label-bold required' .input-group.gl-field-error-anchor @@ -22,7 +22,7 @@ append: copy_api_url .form-group - - copy_ca_cert_btn = clipboard_button(text: platform.ca_cert, title: s_('ClusterIntegration|Copy CA Certificate'), + - copy_ca_cert_btn = deprecated_clipboard_button(text: platform.ca_cert, title: s_('ClusterIntegration|Copy CA Certificate'), class: 'input-group-text btn-default') if cluster.read_only_kubernetes_platform_fields? = platform_field.label :ca_cert, s_('ClusterIntegration|CA Certificate'), class: 'label-bold' .input-group.gl-field-error-anchor diff --git a/app/views/dashboard/groups/_groups.html.haml b/app/views/dashboard/groups/_groups.html.haml index ea7cd75152d..ddf3bd5ae07 100644 --- a/app/views/dashboard/groups/_groups.html.haml +++ b/app/views/dashboard/groups/_groups.html.haml @@ -1,2 +1,2 @@ .js-groups-list-holder - #js-groups-tree{ data: { endpoint: dashboard_groups_path(format: :json), path: dashboard_groups_path, form_sel: 'form#group-filter-form', filter_sel: '.js-groups-list-filter', holder_sel: '.js-groups-list-holder', dropdown_sel: '.js-group-filter-dropdown-wrap' } } + #js-groups-tree{ data: { endpoint: dashboard_groups_path(format: :json), path: dashboard_groups_path, form_sel: 'form#group-filter-form', filter_sel: '.js-groups-list-filter', holder_sel: '.js-groups-list-holder', dropdown_sel: '.js-group-filter-dropdown-wrap', groups_empty_state_illustration: image_path('illustrations/empty-state/empty-groups-md.svg') } } diff --git a/app/views/dashboard/groups/index.html.haml b/app/views/dashboard/groups/index.html.haml index 7f004e405a7..c5abc964fda 100644 --- a/app/views/dashboard/groups/index.html.haml +++ b/app/views/dashboard/groups/index.html.haml @@ -3,8 +3,4 @@ = render_dashboard_ultimate_trial(current_user) = render 'dashboard/groups_head' -- if params[:filter].blank? && @groups.empty? - .empty-state - = render 'shared/groups/empty_state' -- else - = render 'groups' += render 'groups' diff --git a/app/views/dashboard/todos/_todo.html.haml b/app/views/dashboard/todos/_todo.html.haml index 1cd8015934e..181c79e7bd0 100644 --- a/app/views/dashboard/todos/_todo.html.haml +++ b/app/views/dashboard/todos/_todo.html.haml @@ -1,11 +1,11 @@ %li.todo.gl-hover-border-blue-200.gl-hover-bg-blue-50.gl-hover-cursor-pointer.gl-relative{ class: "todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo) } .gl-display-flex.gl-flex-direction-column.gl-sm-flex-direction-row.gl-sm-align-items-center - .todo-item.gl-overflow-hidden.gl-overflow-x-auto.gl-align-self-center.gl-w-full{ data: { qa_selector: "todo_item_container" } } + .todo-item.gl-overflow-hidden.gl-overflow-x-auto.gl-align-self-center.gl-w-full{ data: { testid: "todo-item-container" } } .todo-title.gl-pt-2.gl-pb-3.gl-px-2.gl-md-mb-1.gl-font-sm.gl-text-secondary = todo_target_state_pill(todo) - %span.todo-target-title{ data: { qa_selector: "todo_target_title_content" }, :id => dom_id(todo) + "_describer" } + %span.todo-target-title{ :id => dom_id(todo) + "_describer" } = todo_target_title(todo) - if !todo.for_design? && !todo.member_access_requested? @@ -25,7 +25,7 @@ = author_avatar(todo, size: 24) .todo-note - if todo_author_display?(todo) - .author-name.bold.gl-display-inline{ data: { qa_selector: "todo_author_name_content" } }< + .author-name.bold.gl-display-inline{ data: { testid: "todo-author-name-content" } }< - if todo.author = link_to_author(todo, self_added: todo.self_added?) - else diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index c5f70397fad..3feb30085c0 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -36,7 +36,7 @@ .filter-item.gl-m-2 - if params[:group_id].present? = hidden_field_tag(:group_id, params[:group_id]) - = dropdown_tag(group_dropdown_label(params[:group_id], _("Group")), options: { toggle_class: 'js-group-search js-filter-submit gl-xs-w-full!', title: s_("Todos|Filter by group"), filter: true, filterInput: 'input#group-search', dropdown_class: 'dropdown-menu-selectable dropdown-menu-group js-filter-submit', placeholder: _("Search groups"), data: { default_label: _("Group"), display: 'static', qa_selector: 'group_dropdown' } }) + = dropdown_tag(group_dropdown_label(params[:group_id], _("Group")), options: { toggle_class: 'js-group-search js-filter-submit gl-xs-w-full!', title: s_("Todos|Filter by group"), filter: true, filterInput: 'input#group-search', dropdown_class: 'dropdown-menu-selectable dropdown-menu-group js-filter-submit', placeholder: _("Search groups"), data: { default_label: _("Group"), display: 'static', testid: 'group-dropdown' } }) .filter-item.gl-m-2 - if params[:project_id].present? = hidden_field_tag(:project_id, params[:project_id]) diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml index 345a1cc0225..e6551adffde 100644 --- a/app/views/devise/sessions/_new_base.html.haml +++ b/app/views/devise/sessions/_new_base.html.haml @@ -1,6 +1,6 @@ = gitlab_ui_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: 'gl-p-5 gl-show-field-errors js-arkose-labs-form', aria: { live: 'assertive' }, data: { testid: 'sign-in-form' }}) do |f| .form-group - = f.label :login, _('Username or email') + = f.label :login, _('Username or primary email') = f.text_field :login, value: @invite_email, class: 'form-control gl-form-input js-username-field', autocomplete: 'username', autofocus: 'autofocus', autocapitalize: 'off', autocorrect: 'off', required: true, title: _('This field is required.'), data: { qa_selector: 'login_field', testid: 'username-field' } .form-group = f.label :password, _('Password') diff --git a/app/views/devise/shared/_email_opted_in.html.haml b/app/views/devise/shared/_email_opted_in.html.haml deleted file mode 100644 index d8ed0028222..00000000000 --- a/app/views/devise/shared/_email_opted_in.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -- return unless Gitlab.com? - -.gl-mb-3.js-email-opt-in.hidden - .gl-font-weight-bold.gl-mb-3 - = _('Email updates (optional)') - = f.gitlab_ui_checkbox_component :email_opted_in, _("I'd like to receive updates about GitLab via email") diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index 8f2c2c58790..73b9a3d5c5a 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -3,7 +3,7 @@ - if restyle_login_page_enabled && (any_form_based_providers_enabled? || password_authentication_enabled_for_web?) .omniauth-divider.gl-display-flex.gl-align-items-center - = _("or") + = _("or sign in with") .gl-mt-5.gl-px-5{ class: restyle_login_page_enabled ? 'omniauth-container gl-text-center gl-ml-auto gl-mr-auto' : 'omniauth-container gl-py-5' } - if !restyle_login_page_enabled diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 6d37257232b..bf1b604465b 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -17,7 +17,7 @@ class: 'form-control gl-form-input top js-block-emoji js-validate-length', data: { max_length: max_first_name_length, max_length_message: s_('SignUp|First name is too long (maximum is %{max_length} characters).') % { max_length: max_first_name_length }, - qa_selector: 'new_user_first_name_field' }, + testid: 'new-user-first-name-field' }, required: true, title: _('This field is required.') .col.form-group @@ -26,7 +26,7 @@ class: 'form-control gl-form-input top js-block-emoji js-validate-length', data: { max_length: max_last_name_length, max_length_message: s_('SignUp|Last name is too long (maximum is %{max_length} characters).') % { max_length: max_last_name_length }, - qa_selector: 'new_user_last_name_field' }, + testid: 'new-user-last-name-field' }, required: true, title: _('This field is required.') .username.form-group @@ -44,7 +44,7 @@ = f.label :email, _('Email') = f.email_field :email, class: 'form-control gl-form-input middle js-validate-email', - data: { qa_selector: 'new_user_email_field' }, + data: { testid: 'new-user-email-field' }, required: true, title: _('Please provide a valid email address.') %p.validation-hint.gl-field-hint.text-secondary= _('We recommend a work email address.') @@ -56,7 +56,7 @@ %input.form-control.gl-form-input.js-password{ data: { id: "#{form_resource_name}_password", title: s_('SignUp|Minimum length is %{minimum_password_length} characters.') % { minimum_password_length: @minimum_password_length }, minimum_password_length: @minimum_password_length, - qa_selector: 'new_user_password_field', + testid: 'new-user-password-field', autocomplete: 'new-password', name: "#{form_resource_name}[password]" } } %p.gl-field-hint-valid.text-secondary= s_('SignUp|Minimum length is %{minimum_password_length} characters.') % { minimum_password_length: @minimum_password_length } @@ -69,7 +69,7 @@ - elsif show_recaptcha_sign_up? = recaptcha_tags nonce: content_security_policy_nonce - = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, block: true, button_options: { data: { qa_selector: 'new_user_register_button' }}) do + = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, block: true, button_options: { data: { testid: 'new-user-register-button' }}) do = button_text = render 'devise/shared/terms_of_service_notice', button_text: button_text diff --git a/app/views/doorkeeper/authorized_applications/_delete_form.html.haml b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml index fcd52f33121..76a805d4d1b 100644 --- a/app/views/doorkeeper/authorized_applications/_delete_form.html.haml +++ b/app/views/doorkeeper/authorized_applications/_delete_form.html.haml @@ -5,4 +5,5 @@ = form_tag path do %input{ :name => "_method", :type => "hidden", :value => "delete" }/ - = submit_tag _('Revoke'), class: 'gl-button btn btn-danger btn-sm', aria: { label: s_('AuthorizedApplication|Revoke application') }, data: { confirm: s_('AuthorizedApplication|Are you sure you want to revoke this application?'), confirm_btn_variant: 'danger' } + = render Pajamas::ButtonComponent.new(type: :submit, variant: :danger, size: :small, button_options: { aria: { label: s_('AuthorizedApplication|Revoke application') }, data: { confirm: s_('AuthorizedApplication|Are you sure you want to revoke this application?'), confirm_btn_variant: 'danger' } }) do + = _('Revoke') diff --git a/app/views/events/_event.atom.builder b/app/views/events/_event.atom.builder index c429bbbb610..43a545c4b4e 100644 --- a/app/views/events/_event.atom.builder +++ b/app/views/events/_event.atom.builder @@ -6,7 +6,7 @@ event = event.present event_url = event_feed_url(event) xml.entry do - xml.id "tag:#{request.host},#{event.created_at.strftime("%Y-%m-%d")}:#{event.id}" + xml.id "tag:#{request.host},#{event.created_at.to_date.iso8601}:#{event.id}" xml.link href: event_url if event_url xml.title truncate(event_feed_title(event), length: 80) xml.updated event.updated_at.xmlschema diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index 4a6b7fcfa84..0ad969116e0 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -6,13 +6,11 @@ .event-title.d-flex.flex-wrap = inline_event_icon(event) - - many_refs = event.ref_count.to_i > 1 - %span.event-type.d-inline-block.gl-mr-2.pushed= many_refs ? "#{event.action_name} #{event.ref_count} #{event.ref_type.pluralize}" : "#{event.action_name} #{event.ref_type}" - - unless many_refs + %span.event-type.d-inline-block.gl-mr-2.pushed= event.push_activity_description + - unless event.batch_push? %span.gl-mr-2.text-truncate - commits_link = project_commits_path(project, event.ref_name) - - should_link = event.tag? ? project.repository.tag_exists?(event.ref_name) : project.repository.branch_exists?(event.ref_name) - = link_to_if should_link, event.ref_name, commits_link, class: 'ref-name' + = link_to_if event.linked_to_reference?, event.ref_name, commits_link, class: 'ref-name' = render "events/event_scope", event: event diff --git a/app/views/explore/groups/_groups.html.haml b/app/views/explore/groups/_groups.html.haml index 3291129fd69..37e5be521b4 100644 --- a/app/views/explore/groups/_groups.html.haml +++ b/app/views/explore/groups/_groups.html.haml @@ -1,3 +1,3 @@ .js-groups-list-holder - #js-groups-tree{ data: { endpoint: explore_groups_path(format: :json), path: explore_groups_path, form_sel: 'form#group-filter-form', filter_sel: '.js-groups-list-filter', holder_sel: '.js-groups-list-holder', dropdown_sel: '.js-group-filter-dropdown-wrap' } } + #js-groups-tree{ data: { endpoint: explore_groups_path(format: :json), path: explore_groups_path, form_sel: 'form#group-filter-form', filter_sel: '.js-groups-list-filter', holder_sel: '.js-groups-list-holder', dropdown_sel: '.js-group-filter-dropdown-wrap', groups_empty_state_illustration: image_path('illustrations/empty-state/empty-groups-md.svg') } } = gl_loading_icon(size: 'md', css_class: 'gl-mt-6') diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index 213346b4cc2..ddb82411add 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -22,7 +22,4 @@ %p= _("Below you will find all the groups that are public.") %p= _("You can easily contribute to them by requesting to join these groups.") -- if params[:filter].blank? && @groups.empty? - .nothing-here-block= _("No public groups") -- else - = render 'groups' += render 'groups' diff --git a/app/views/groups/_import_group_from_another_instance_panel.html.haml b/app/views/groups/_import_group_from_another_instance_panel.html.haml index 8c2434ca4a0..c35bbce6ba7 100644 --- a/app/views/groups/_import_group_from_another_instance_panel.html.haml +++ b/app/views/groups/_import_group_from_another_instance_panel.html.haml @@ -13,10 +13,9 @@ = s_('GroupsNew|Importing groups by direct transfer is currently disabled.') - if current_user.admin? - - admin_link_start = '<a href="%{url}">'.html_safe % { url: general_admin_application_settings_path(anchor: 'js-visibility-settings') } - - admin_link_end = '</a>'.html_safe + - admin_link = link_to('', general_admin_application_settings_path(anchor: 'js-visibility-settings')) - = s_('GroupsNew|Please %{admin_link_start}enable it in the Admin settings%{admin_link_end}.').html_safe % { admin_link_start: admin_link_start, admin_link_end: admin_link_end } + = safe_format(s_('GroupsNew|Please %{admin_link_start}enable it in the Admin settings%{admin_link_end}.'), tag_pair(admin_link, :admin_link_start, :admin_link_end)) - else = s_('GroupsNew|Please ask your Administrator to enable it in the Admin settings.') @@ -25,9 +24,8 @@ = render Pajamas::AlertComponent.new(dismissible: false, variant: :warning) do |c| - c.with_body do - - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md', anchor: 'migrated-group-items') } - - docs_link_end = '</a>'.html_safe - = s_('GroupsNew|Not all group items are migrated. %{docs_link_start}What items are migrated%{docs_link_end}?').html_safe % { docs_link_start: docs_link_start, docs_link_end: docs_link_end } + - docs_link = link_to('', help_page_path('user/group/import/index.md', anchor: 'migrated-group-items'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('GroupsNew|Not all group items are migrated. %{docs_link_start}What items are migrated%{docs_link_end}?'), tag_pair(docs_link, :docs_link_start, :docs_link_end)) %p.gl-mt-3 = s_('GroupsNew|Provide credentials for the source instance to import from. You can provide this instance as a source to move groups in this instance.') @@ -41,9 +39,9 @@ .form-group.gl-display-flex.gl-flex-direction-column = f.label :bulk_import_gitlab_access_token, s_('GroupsNew|Personal access token'), for: 'import_gitlab_token' .gl-font-weight-normal - - pat_link_start = '<a href="%{url}" target="_blank">'.html_safe % { url: help_page_path('user/profile/personal_access_tokens') } - - short_living_link_start = '<a href="%{url}" target="_blank">'.html_safe % { url: help_page_path('security/token_overview', anchor: 'security-considerations') } - = s_('GroupsNew|Create a token with %{code_start}api%{code_end} and %{code_start}read_repository%{code_end} scopes in the %{pat_link_start}user settings%{pat_link_end} of the source GitLab instance. For %{short_living_link_start}security reasons%{short_living_link_end}, set a short expiration date for the token. Keep in mind that large migrations take more time.').html_safe % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe, pat_link_start: pat_link_start, pat_link_end: '</a>'.html_safe, short_living_link_start: short_living_link_start, short_living_link_end: '</a>'.html_safe } + - pat_link = link_to('', help_page_path('user/profile/personal_access_tokens'), target: '_blank') + - short_living_link = link_to('', help_page_path('security/token_overview', anchor: 'security-considerations'), target: '_blank') + = safe_format(s_('GroupsNew|Create a token with %{code_start}api%{code_end} and %{code_start}read_repository%{code_end} scopes in the %{pat_link_start}user settings%{pat_link_end} of the source GitLab instance. For %{short_living_link_start}security reasons%{short_living_link_end}, set a short expiration date for the token. Keep in mind that large migrations take more time.'), tag_pair('<code></code>'.html_safe, :code_start , :code_end), tag_pair(pat_link, :pat_link_start, :pat_link_end), tag_pair(short_living_link, :short_living_link_start, :short_living_link_end)) = f.text_field :bulk_import_gitlab_access_token, placeholder: s_('GroupsNew|e.g. h8d3f016698e...'), class: 'gl-form-input gl-mt-3 col-xs-12 col-sm-8', required: true, disabled: bulk_imports_disabled, diff --git a/app/views/groups/dependency_proxies/show.html.haml b/app/views/groups/dependency_proxies/show.html.haml index 8416cb81c95..02a024ed3b5 100644 --- a/app/views/groups/dependency_proxies/show.html.haml +++ b/app/views/groups/dependency_proxies/show.html.haml @@ -1,6 +1,7 @@ - page_title _("Dependency Proxy") #js-dependency-proxy{ data: { group_path: @group.full_path, + endpoint: group_dependency_proxy_path(@group), no_manifests_illustration: image_path('illustrations/docker-empty-state.svg'), group_id: @group.id, settings_path: group_settings_packages_and_registries_path(@group), diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index c11154cbd75..8d6eebc27b0 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -28,8 +28,8 @@ .settings-content = render 'groups/settings/permissions' -= render_if_exists 'groups/merge_requests', expanded: expanded, group: @group -= render_if_exists 'groups/merge_request_approval_settings', expanded: expanded, group: @group, user: current_user += render_if_exists 'groups/settings/merge_requests/merge_requests', expanded: expanded, group: @group += render_if_exists 'groups/settings/merge_requests/merge_request_approval_settings', expanded: expanded, group: @group, user: current_user = render_if_exists 'groups/analytics', expanded: expanded %section.settings.no-animate#js-badge-settings{ class: ('expanded' if expanded) } diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index e5c66c2c432..fbfaaa49b39 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -15,7 +15,7 @@ = render_if_exists 'groups/group_members/create_service_account' .js-invite-members-trigger{ data: { variant: 'confirm', classes: 'gl-md-w-auto gl-w-full', - trigger_source: 'group-members-page', + trigger_source: 'group_members_page', display_text: _('Invite members') } } = render 'groups/invite_groups_modal', group: @group, reload_page_on_submit: true diff --git a/app/views/groups/labels/edit.html.haml b/app/views/groups/labels/edit.html.haml index 9af842b01df..1a64ba0c27d 100644 --- a/app/views/groups/labels/edit.html.haml +++ b/app/views/groups/labels/edit.html.haml @@ -1,8 +1,9 @@ - add_to_breadcrumbs _("Labels"), group_labels_path(@group) - breadcrumb_title _("Edit") - page_title _("Edit"), @label.name, _("Labels") +- show_lock_on_merge = @group.supports_lock_on_merge? %h1.page-title.gl-font-size-h-display = _('Edit Label') -= render 'shared/labels/form', url: group_label_path(@group, @label), back_path: @previous_labels_path += render 'shared/labels/form', url: group_label_path(@group, @label), back_path: @previous_labels_path, show_lock_on_merge: show_lock_on_merge diff --git a/app/views/groups/milestones/_form.html.haml b/app/views/groups/milestones/_form.html.haml index e84fd7a8692..7665da08582 100644 --- a/app/views/groups/milestones/_form.html.haml +++ b/app/views/groups/milestones/_form.html.haml @@ -13,7 +13,7 @@ - @gfm_form = true .js-markdown-editor{ data: { render_markdown_path: group_preview_markdown_path, markdown_docs_path: help_page_path('user/markdown'), - qa_selector: 'milestone_description_field', + testid: 'milestone-description-field', form_field_placeholder: _('Write milestone description...'), supports_quick_actions: 'false', enable_autocomplete: 'true', diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml index f4749617463..45fd98adbb9 100644 --- a/app/views/groups/settings/_permissions.html.haml +++ b/app/views/groups/settings/_permissions.html.haml @@ -37,7 +37,7 @@ = render_if_exists 'groups/settings/wiki', f: f, group: @group = render 'groups/settings/lfs', f: f = render_if_exists 'groups/settings/code_suggestions', f: f, group: @group - = render_if_exists 'groups/settings/ai_related_settings', f: f, group: @group + = render_if_exists 'groups/settings/experimental_settings', f: f, group: @group = render_if_exists 'groups/settings/ai_third_party_settings', f: f, group: @group = render 'groups/settings/git_access_protocols', f: f, group: @group = render 'groups/settings/project_creation_level', f: f, group: @group diff --git a/app/views/groups/settings/applications/index.html.haml b/app/views/groups/settings/applications/index.html.haml index da3257ca27d..595336d8abb 100644 --- a/app/views/groups/settings/applications/index.html.haml +++ b/app/views/groups/settings/applications/index.html.haml @@ -3,7 +3,7 @@ - @force_desktop_expanded_sidebar = true = render 'shared/doorkeeper/applications/index', - oauth_applications_enabled: user_oauth_applications?, + oauth_applications_enabled: true, oauth_authorized_applications_enabled: false, form_url: group_settings_applications_path(@group), application_url: ->(application) { group_settings_application_path(@group, application) }, diff --git a/app/views/groups/work_items/index.html.haml b/app/views/groups/work_items/index.html.haml index 2e3d3dda941..299a90b362d 100644 --- a/app/views/groups/work_items/index.html.haml +++ b/app/views/groups/work_items/index.html.haml @@ -1,4 +1,4 @@ - page_title s_('WorkItem|Work items') - add_page_specific_style 'page_bundles/issuable_list' -.js-work-items-list-root{ data: { full_path: @group.full_path } } +.js-work-items-list-root{ data: work_items_list_data(@group) } diff --git a/app/views/groups/work_items/show.html.haml b/app/views/groups/work_items/show.html.haml new file mode 100644 index 00000000000..eb962cc0b69 --- /dev/null +++ b/app/views/groups/work_items/show.html.haml @@ -0,0 +1 @@ +.h1 Work Item diff --git a/app/views/help/instance_configuration/_size_limits.html.haml b/app/views/help/instance_configuration/_size_limits.html.haml index add484feac9..1f6379314b9 100644 --- a/app/views/help/instance_configuration/_size_limits.html.haml +++ b/app/views/help/instance_configuration/_size_limits.html.haml @@ -42,8 +42,8 @@ %td= _('Maximum snippet size') %td= instance_configuration_human_size_cell(size_limits[:snippet_size_limit]) %tr - %td= s_('Import|Maximum import remote file size (MB)') + %td= s_('Import|Maximum import remote file size (MiB)') %td= instance_configuration_human_size_cell(size_limits[:max_import_remote_file_size]) %tr - %td= s_('BulkImport|Direct transfer maximum download file size (MB)') + %td= s_('BulkImport|Direct transfer maximum download file size (MiB)') %td= instance_configuration_human_size_cell(size_limits[:bulk_import_max_download_file_size]) diff --git a/app/views/import/bitbucket_server/new.html.haml b/app/views/import/bitbucket_server/new.html.haml index 292dd9d071c..de94f142a40 100644 --- a/app/views/import/bitbucket_server/new.html.haml +++ b/app/views/import/bitbucket_server/new.html.haml @@ -24,4 +24,5 @@ .col-md-4 = password_field_tag :personal_access_token, '', class: 'form-control gl-form-input gl-mr-3', placeholder: _('Personal Access Token'), size: 40 .form-actions - = submit_tag _('List your Bitbucket Server repositories'), class: 'gl-button btn btn-confirm' + = render Pajamas::ButtonComponent.new(type: 'submit', variant: :confirm) do + = _('List your Bitbucket Server repositories') diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 53ecad1b474..bbde5f2843b 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -4,7 +4,7 @@ %head{ omit_og ? { } : { prefix: "og: http://ogp.me/ns#" } } %meta{ charset: "utf-8" } %meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge' } - %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1' } + %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1' } %title= page_title(site_name) = Gon::Base.render_data(nonce: content_security_policy_nonce) = yield :project_javascripts @@ -48,6 +48,16 @@ = webpack_bundle_tag 'legacy_sentry' = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? + - if vite_enabled + %meta{ name: 'controller-path', content: controller_full_path } + - if Rails.env.development? + = vite_client_tag + = vite_javascript_tag "main" + - if Gitlab.ee? + = vite_javascript_tag "main_ee" + - if Gitlab.jh? + = vite_javascript_tag "main_jh" + = yield :page_specific_javascripts = webpack_bundle_tag 'super_sidebar' if show_super_sidebar? diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 95627c2884a..f52ea801eef 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -20,7 +20,6 @@ .mobile-overlay = dispensable_render_if_exists 'layouts/header/verification_reminder' .alert-wrapper.gl-force-block-formatting-context - = yield :code_suggestions_third_party_alert = dispensable_render 'shared/new_nav_announcement' = dispensable_render 'shared/outdated_browser' = dispensable_render_if_exists "layouts/header/licensed_user_count_threshold" @@ -37,6 +36,7 @@ = dispensable_render_if_exists "layouts/header/seat_count_alert" = dispensable_render_if_exists "shared/namespace_user_cap_reached_alert" = dispensable_render_if_exists "shared/new_user_signups_cap_reached_alert" + = dispensable_render_if_exists "shared/silent_mode_banner" = yield :page_level_alert = yield :group_invite_members_banner - unless @hide_top_bar diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml index 399a826d611..10b2002dfef 100644 --- a/app/views/layouts/_snowplow.html.haml +++ b/app/views/layouts/_snowplow.html.haml @@ -2,6 +2,8 @@ - namespace = @group || @project&.namespace || @namespace = webpack_bundle_tag 'tracker' +- if Gitlab.com? && Feature.enabled?(:browsersdk_tracking) + = webpack_bundle_tag 'analytics' = javascript_tag do :plain window.snowplowOptions = #{Gitlab::Tracking.options(@group).to_json} diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 28cbdf0a7a1..451c66b074b 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -12,13 +12,8 @@ = render 'peek/bar' = header_message - - if show_super_sidebar? # TODO: Move this CSS to a better place - - if current_user - :css - body { - --header-height: 0px; - } - - else + - if show_super_sidebar? + - if !current_user = render partial: "layouts/header/super_sidebar_logged_out" - else = render partial: "layouts/header/default", locals: { project: @project, group: @group } diff --git a/app/views/layouts/errors.html.haml b/app/views/layouts/errors.html.haml index 5ad20478f51..d07daf0aab9 100644 --- a/app/views/layouts/errors.html.haml +++ b/app/views/layouts/errors.html.haml @@ -1,7 +1,7 @@ !!! 5 %html{ lang: I18n.locale } %head - %meta{ :content => "width=device-width, initial-scale=1, maximum-scale=1", :name => "viewport" } + %meta{ :content => "width=device-width, initial-scale=1", :name => "viewport" } %title= yield(:title) %style = Rails.application.assets_manifest.find_sources('errors.css').first.to_s.html_safe diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml index 83641fbb184..1d67ac942fa 100644 --- a/app/views/layouts/group.html.haml +++ b/app/views/layouts/group.html.haml @@ -21,7 +21,6 @@ = render 'groups/invite_members_modal', group: @group = dispensable_render_if_exists "shared/web_hooks/group_web_hook_disabled_alert" -= dispensable_render_if_exists "shared/code_suggestions_third_party_alert", source: @group = dispensable_render_if_exists "shared/free_user_cap_alert", source: @group = dispensable_render_if_exists "shared/unlimited_members_during_trial_alert", resource: @group diff --git a/app/views/layouts/header/_current_user_dropdown.html.haml b/app/views/layouts/header/_current_user_dropdown.html.haml index 7ce914cf660..75de13d4862 100644 --- a/app/views/layouts/header/_current_user_dropdown.html.haml +++ b/app/views/layouts/header/_current_user_dropdown.html.haml @@ -43,7 +43,7 @@ = link_to _("Switch to GitLab Next"), Gitlab::Saas.canary_toggle_com_url, data: { track_action: "click_link", track_label: "switch_to_canary", track_property: "navigation_top" } %li.divider - .js-new-nav-toggle{ data: { enabled: show_super_sidebar?.to_s, endpoint: profile_preferences_url} } + .js-new-nav-toggle{ data: { enabled: show_super_sidebar?.to_s, endpoint: profile_preferences_path} } - if current_user_menu?(:sign_out) %li.divider diff --git a/app/views/layouts/header/_super_sidebar_logged_out.haml b/app/views/layouts/header/_super_sidebar_logged_out.haml index 67322aced74..31dfdfb2bb3 100644 --- a/app/views/layouts/header/_super_sidebar_logged_out.haml +++ b/app/views/layouts/header/_super_sidebar_logged_out.haml @@ -44,4 +44,4 @@ - if allow_signup? %li = render Pajamas::ButtonComponent.new(href: new_user_registration_path, variant: :confirm) do - = _('Register') + = Gitlab.com? ? _('Get free trial') : _('Register') diff --git a/app/views/layouts/minimal.html.haml b/app/views/layouts/minimal.html.haml index 5531c0ab23a..8b6a2a2f2a7 100644 --- a/app/views/layouts/minimal.html.haml +++ b/app/views/layouts/minimal.html.haml @@ -3,7 +3,7 @@ !!! 5 %html{ lang: I18n.locale, class: page_classes } = render "layouts/head" - %body{ data: body_data } + %body{ data: body_data, class: system_message_class } = header_message = render 'peek/bar' = render 'layouts/published_experiments' diff --git a/app/views/layouts/oauth_error.html.haml b/app/views/layouts/oauth_error.html.haml index d5e0e8e9c1d..697bd9b5864 100644 --- a/app/views/layouts/oauth_error.html.haml +++ b/app/views/layouts/oauth_error.html.haml @@ -1,7 +1,7 @@ !!! 5 %html{ lang: I18n.locale } %head - %meta{ :content => "width=device-width, initial-scale=1, maximum-scale=1", :name => "viewport" } + %meta{ :content => "width=device-width, initial-scale=1", :name => "viewport" } %title= yield(:title) = stylesheet_link_tag 'application_utilities' %style diff --git a/app/views/layouts/organization.html.haml b/app/views/layouts/organization.html.haml index 5a357c6f805..7e1bf228876 100644 --- a/app/views/layouts/organization.html.haml +++ b/app/views/layouts/organization.html.haml @@ -1,6 +1,6 @@ -- page_title @organization.name -- header_title @organization.name, organization_path(@organization) -- nav "organization" +- page_title @organization.name if @organization +- header_title @organization.name, organization_path(@organization) if @organization +- nav(%w[index new].include?(params[:action]) ? "your_work" : "organization") - @left_sidebar = true = render template: "layouts/application" diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 18ae3353f4d..1e85bb6cc3a 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -23,7 +23,6 @@ = render 'projects/invite_members_modal', project: @project = dispensable_render_if_exists "shared/web_hooks/web_hook_disabled_alert" -= dispensable_render_if_exists "projects/code_suggestions_third_party_alert", project: @project = dispensable_render_if_exists "projects/free_user_cap_alert", project: @project = dispensable_render_if_exists 'shared/unlimited_members_during_trial_alert', resource: @project diff --git a/app/views/layouts/service_desk.html.haml b/app/views/layouts/service_desk.html.haml index 13e9785317c..e9c5d51c674 100644 --- a/app/views/layouts/service_desk.html.haml +++ b/app/views/layouts/service_desk.html.haml @@ -24,11 +24,5 @@ %br = link_to "Unsubscribe", @unsubscribe_url - -# EE-specific start - - if Gitlab::CurrentSettings.email_additional_text.present? - %br - %br - = Gitlab::Utils.nlbr(Gitlab::CurrentSettings.email_additional_text) - -# EE-specific end - + = render_if_exists 'layouts/email_additional_text' = html_footer_message diff --git a/app/views/layouts/terms.html.haml b/app/views/layouts/terms.html.haml index 9a50e3e2eb2..29a561ae1a9 100644 --- a/app/views/layouts/terms.html.haml +++ b/app/views/layouts/terms.html.haml @@ -1,6 +1,7 @@ !!! 5 - add_page_specific_style 'page_bundles/terms' - @hide_top_bar = true +- @hide_top_bar_padding = true - body_classes = [user_application_theme] %html{ lang: I18n.locale, class: page_class } = render "layouts/head" diff --git a/app/views/notify/in_product_marketing_email.html.haml b/app/views/notify/in_product_marketing_email.html.haml deleted file mode 100644 index a88d581c5de..00000000000 --- a/app/views/notify/in_product_marketing_email.html.haml +++ /dev/null @@ -1,51 +0,0 @@ -- if @message.series? - %tr{ style: "background-color: #ffffff;" } - %td{ style: "color: #424242; padding: 10px 30px; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;font-size: 16px; line-height: 22px; border: 1px solid #dddddd" } - %p - = @message.progress.html_safe -%tr - %td{ bgcolor: "#ffffff", height: "auto", style: "max-width: 600px; width: 100%; text-align: center; height: 200px; padding: 25px 15px; mso-line-height-rule: exactly; min-height: 40px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;", valign: "middle", width: "100%" } - = inline_image_link(@message.logo_path, { width: '150', style: 'width: 150px;' }) - %h1{ style: "font-size: 40px; line-height: 46x; color: #000000; padding: 20px 0 0 0; font-weight: normal;" } - = @message.title - %h2{ style: "font-size: 28px; line-height: 34px; color: #000000; padding: 0; font-weight: 400;" } - = @message.subtitle -%tr - %td{ style: "padding: 10px 20px 30px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#000000; font-size: 18px; line-height: 24px;" } - %p{ style: "margin: 0 0 20px 0;" } - = @message.body_line1.html_safe - - @message.body_line2&.tap do |line| - %p{ style: "margin: 0 0 20px 0;" } - = line.html_safe -- if @message.cta_text - %tr - %td{ align: "center", style: "padding: 10px 20px 80px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;" } - .cta_link.cta_link_primary= @message.cta_link -- else - %tr - %td{ style: "padding: 10px 20px 10px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#000000; font-size: 16px; line-height: 20px;" } - %table{ border: "0", cellpadding: "0", cellspacing: "0", width: "100%", style: "width: 100%; min-width: 100%;" } - %tr - %td{ width: "50%", style: "width: 50%; min-width: 50%; color: #000000; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; font-size: 16px; line-height: 100%; padding-bottom: 16px; text-align: left;", align: "left" } - = @message.feedback_ratings(1) - %td{ width: "50%", style: "width: 50%; min-width: 50%; color: #000000; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; font-size: 16px; line-height: 100%; padding-bottom: 16px; text-align: right;", align: "right" } - = @message.feedback_ratings(5) - %tr - %td{ align: "center", style: "padding: 10px 1px 30px 1px;" } - %table{ align: "center", cellpadding: "5", cellspacing: "0", width: "100%", style: "width: 100%; min-width: 100%; border: 1px solid #dae0ea; border-radius: 0; min-width: 100%; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; font-size: 16px;" } - %tr - - (1..5).each do |rating| - %td{ height: "54", style: "border-left: 1px solid #dae0ea; padding-bottom: 0; width: 9% !important;", width: "9%" } - %a{ href: @message.feedback_link(rating), style: "color: #424242; display: block; text-decoration: none;" } - %span{ height: "54", style: "display: block; font-size: 18px; height: 22px; line-height: 22px; padding: 16px 0; width: 100%; text-decoration: none;" } - = rating - %tr - %td{ style: "padding: 10px 20px 30px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#000000; font-size: 18px; line-height: 24px;" } - %p{ style: "margin: 0 0 50px 0;" } - = @message.feedback_thanks -- if @message.invite_members? - %tr - %td{ align: "center", style: "padding: 0 20px 80px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;" } - = @message.invite_text - %br - = @message.invite_link diff --git a/app/views/notify/in_product_marketing_email.text.erb b/app/views/notify/in_product_marketing_email.text.erb deleted file mode 100644 index 79a366eb1cc..00000000000 --- a/app/views/notify/in_product_marketing_email.text.erb +++ /dev/null @@ -1,36 +0,0 @@ -<%= @message.tagline %> - -<%= @message.title %> -<%= @message.subtitle %> - - -<%= @message.body_line1 %> - -<%= @message.body_line2 %> - -<% if @message.cta_text %> -<%= @message.cta_link %> - - - -<% else %> -<% (1..5).each do |rating| %> -<%= "#{rating} - #{@message.feedback_ratings(rating).upcase} - #{@message.feedback_link(rating)}" %> -<% end %> - - -<%= @message.feedback_thanks %> -<% end %> -<% if @message.invite_members? %> -<%= @message.invite_text %> -<%= @message.invite_link %> -<% end %> - - - - -<%= @message.footer_links %> - -<%= @message.address %> - -<%= @message.unsubscribe %> diff --git a/app/views/notify/member_access_granted_email.html.haml b/app/views/notify/member_access_granted_email.html.haml index cce36f7b8a6..49a571f154e 100644 --- a/app/views/notify/member_access_granted_email.html.haml +++ b/app/views/notify/member_access_granted_email.html.haml @@ -8,11 +8,6 @@ %td.text-content %p = _('You have been granted %{access_level} access to the %{source_link} %{source_type}.').html_safe % { access_level: access_level, source_link: source_link, source_type: source_type } - - if member.tasks_to_be_done.present? - = s_("InviteEmail|You were assigned the following tasks:") - %ul.list-style-position-inside - - member.tasks_to_be_done.each do |task| - %li= localized_tasks_to_be_done_choices[task] %p - leave_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: leave_link } = _('If this was a mistake you can %{leave_link_start}leave the %{source_type}%{link_end}.').html_safe % { source_type: source_type, leave_link_start: leave_link_start, link_end: link_end } diff --git a/app/views/notify/member_invited_email.html.haml b/app/views/notify/member_invited_email.html.haml index 6d5207510da..21d0f8b9108 100644 --- a/app/views/notify/member_invited_email.html.haml +++ b/app/views/notify/member_invited_email.html.haml @@ -22,11 +22,6 @@ %p - if member.created_by = html_escape(s_("InviteEmail|%{inviter} invited you to join the %{strong_start}%{project_or_group_name}%{strong_end}%{br_tag}%{project_or_group} as a %{role}")) % placeholders.merge({ inviter: (link_to inviter_name, user_url(member.created_by)).html_safe }) - - if member.tasks_to_be_done.present? - = s_("InviteEmail|and has assigned you the following tasks:") - %ul.list-style-position-inside - - member.tasks_to_be_done.each do |task| - %li= localized_tasks_to_be_done_choices[task] - else = html_escape(s_("InviteEmail|You are invited to join the %{strong_start}%{project_or_group_name}%{strong_end}%{br_tag}%{project_or_group} as a %{role}")) % placeholders %p.invite-actions diff --git a/app/views/notify/new_email_address_added_email.haml b/app/views/notify/new_email_address_added_email.html.haml index 6d00aaedfd5..6d00aaedfd5 100644 --- a/app/views/notify/new_email_address_added_email.haml +++ b/app/views/notify/new_email_address_added_email.html.haml diff --git a/app/views/notify/new_email_address_added_email.erb b/app/views/notify/new_email_address_added_email.text.erb index 3af1953c902..3af1953c902 100644 --- a/app/views/notify/new_email_address_added_email.erb +++ b/app/views/notify/new_email_address_added_email.text.erb diff --git a/app/views/notify/resource_access_tokens_about_to_expire_email.html.haml b/app/views/notify/resource_access_tokens_about_to_expire_email.html.haml new file mode 100644 index 00000000000..e4e34f6c8ee --- /dev/null +++ b/app/views/notify/resource_access_tokens_about_to_expire_email.html.haml @@ -0,0 +1,13 @@ +%p + = _('Hi %{username}!') % { username: sanitize_name(@user.name) } +%p + = _('One or more of your resource access tokens will expire in %{days_to_expire} or less:') % { days_to_expire: pluralize(@days_to_expire, _('day')) } +%p + #{@resource.class.name.titleize}: #{@resource.full_path} +%p + %ul + - @token_names.each do |token| + %li= token +%p + - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url } + = html_escape(_('You can create a new one or check them in your %{link_start}access tokens%{link_end} settings.')) % { link_start: link_start, link_end: '</a>'.html_safe } diff --git a/app/views/notify/resource_access_tokens_about_to_expire_email.text.erb b/app/views/notify/resource_access_tokens_about_to_expire_email.text.erb new file mode 100644 index 00000000000..bea74f09129 --- /dev/null +++ b/app/views/notify/resource_access_tokens_about_to_expire_email.text.erb @@ -0,0 +1,11 @@ +<%= _('Hi %{username}!') % { username: sanitize_name(@user.name) } %> + +<%= _('One or more of your resource access tokens will expire in %{days_to_expire} or less:') % { days_to_expire: pluralize(@days_to_expire, _('day')) } %> + +<%= "#{@resource.class.name.titleize}: #{@resource.full_path}" %> + +<% @token_names.each do |token| %> + - <%= token %> +<% end %> + +<%= _('You can create a new one or check them in your access token settings: %{target_url}') % { target_url: @target_url } %> diff --git a/app/views/organizations/organizations/groups_and_projects.html.haml b/app/views/organizations/organizations/groups_and_projects.html.haml index 8890f4b1ce5..a993e1c9404 100644 --- a/app/views/organizations/organizations/groups_and_projects.html.haml +++ b/app/views/organizations/organizations/groups_and_projects.html.haml @@ -1,3 +1,3 @@ - page_title _('Groups and projects') -#js-organizations-groups-and-projects +#js-organizations-groups-and-projects{ data: { app_data: organization_groups_and_projects_app_data } } diff --git a/app/views/organizations/organizations/index.html.haml b/app/views/organizations/organizations/index.html.haml new file mode 100644 index 00000000000..04a90b7589f --- /dev/null +++ b/app/views/organizations/organizations/index.html.haml @@ -0,0 +1,2 @@ +- page_title s_('Organization|Organizations') +- header_title _("Your work"), root_path diff --git a/app/views/organizations/organizations/new.html.haml b/app/views/organizations/organizations/new.html.haml new file mode 100644 index 00000000000..4d7f552c87b --- /dev/null +++ b/app/views/organizations/organizations/new.html.haml @@ -0,0 +1,3 @@ +- page_title s_('Organization|New organization') +- header_title _("Your work"), root_path +- add_to_breadcrumbs s_('Organization|Organizations'), organizations_path diff --git a/app/views/organizations/organizations/show.html.haml b/app/views/organizations/organizations/show.html.haml index 8ba2a3d96ac..2ce4c0688ae 100644 --- a/app/views/organizations/organizations/show.html.haml +++ b/app/views/organizations/organizations/show.html.haml @@ -1,2 +1,4 @@ - page_title s_('Organization|Organization overview') - @skip_current_level_breadcrumb = true + +#js-organizations-show{ data: { app_data: organization_show_app_data(@organization) } } diff --git a/app/views/profiles/gpg_keys/index.html.haml b/app/views/profiles/gpg_keys/index.html.haml index 2714193d1d1..982199d3d6f 100644 --- a/app/views/profiles/gpg_keys/index.html.haml +++ b/app/views/profiles/gpg_keys/index.html.haml @@ -28,7 +28,7 @@ %h4.gl-mt-0 = _('Add a GPG key') %p - - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/repository/gpg_signed_commits/index.md') } + - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/repository/signed_commits/gpg.md') } = _('Add a GPG key for secure access to GitLab. %{help_link_start}Learn more%{help_link_end}.').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe } = render 'form' diff --git a/app/views/profiles/keys/_key_details.html.haml b/app/views/profiles/keys/_key_details.html.haml index d5193a424ef..1307c388041 100644 --- a/app/views/profiles/keys/_key_details.html.haml +++ b/app/views/profiles/keys/_key_details.html.haml @@ -46,7 +46,7 @@ .gl-display-flex %pre.well-pre.gl-pl-5.gl-mb-0.gl-border-0 = @key.key - = clipboard_button(title: s_('Profiles|Copy SSH key'), text: @key.key, class: 'gl-bg-gray-10 gl-px-3! gl-border-none! gl-rounded-top-left-none! gl-rounded-bottom-left-none!') + = deprecated_clipboard_button(title: s_('Profiles|Copy SSH key'), text: @key.key, class: 'gl-bg-gray-10 gl-px-3! gl-border-none! gl-rounded-top-left-none! gl-rounded-bottom-left-none!') = render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-0'}) do |c| - c.with_header do diff --git a/app/views/profiles/notifications/_email_settings.html.haml b/app/views/profiles/notifications/_email_settings.html.haml index 60f366f8878..6848426306b 100644 --- a/app/views/profiles/notifications/_email_settings.html.haml +++ b/app/views/profiles/notifications/_email_settings.html.haml @@ -1,6 +1,3 @@ -- form = local_assigns.fetch(:form) .js-notification-email-listbox-input.gl-mb-3{ data: { label: _('Global notification email'), name: 'user[notification_email]', emails: @user.public_verified_emails.to_json, empty_value_text: _('Use primary email (%{email})') % { email: @user.email }, value: @user.notification_email, disabled: local_assigns.fetch(:email_change_disabled, nil) } } .help-block = local_assigns.fetch(:help_text, nil) -.form-group - = form.gitlab_ui_checkbox_component :email_opted_in, _('Receive product marketing emails') diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index 2c7ef2b7e0e..87945f66ae7 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -19,8 +19,8 @@ = _('You can specify notification level per group or per project.') .gl-mt-0 - = gitlab_ui_form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications gl-mt-3' } do |f| - = render_if_exists 'profiles/notifications/email_settings', form: f + = gitlab_ui_form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications gl-mt-3 gl-mb-6' } do |f| + = render_if_exists 'profiles/notifications/email_settings' = label_tag :global_notification_level, _('Global notification level'), class: "label-bold gl-mb-0" .gl-text-secondary.gl-mb-3 diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 681d4e087f3..a6534a16e86 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -67,6 +67,13 @@ = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'behavior'), target: '_blank', rel: 'noopener noreferrer' .form-group = f.label :layout, class: 'label-bold' do + = s_('Preferences|Keyboard shortcuts') + - shortcuts_help_link = link_to('', help_page_path('user/shortcuts'), target: '_blank', rel: 'noopener noreferrer') + = f.gitlab_ui_checkbox_component :keyboard_shortcuts_enabled, + s_('Preferences|Enable keyboard shortcuts'), + help_text: safe_format(s_('Preferences|%{link_start}List of keyboard shortcuts%{link_end}'), tag_pair(shortcuts_help_link, :link_start, :link_end)) + .form-group + = f.label :layout, class: 'label-bold' do = s_('Preferences|Layout width') = f.gitlab_ui_radio_component :layout, layout_choices[0][1], layout_choices[0][0], help_text: fixed_help_text = f.gitlab_ui_radio_component :layout, layout_choices[1][1], layout_choices[1][0], help_text: fluid_help_text @@ -140,7 +147,7 @@ %p.gl-text-secondary = s_('Preferences|Configure how dates and times display for you.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'time-preferences'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'show-exact-times-instead-of-relative-times'), target: '_blank', rel: 'noopener noreferrer' .form-group = f.gitlab_ui_checkbox_component :time_display_relative, s_('Preferences|Use relative times'), diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 20fb2b43c63..58c760c54e8 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -9,8 +9,8 @@ - c.with_body do %p - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/import_export') } - = _('Export this project with all its related data in order to move it to a new GitLab instance. When the exported file is ready, you can download it from this page or from the download link in the email notification you will receive. You can then import it when creating a new project. %{link_start}Learn more.%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/import_export'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('Export this project with all its related data in order to move it to a new GitLab instance. When the exported file is ready, you can download it from this page or from the download link in the email notification you will receive. You can then import it when creating a new project. %{link_start}Learn more.%{link_end}'), tag_pair(link, :link_start, :link_end)) .gl-mb-0 %p.gl-font-weight-bold= _('The following items will be exported:') %ul diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 4ac30547ce3..759ec541af5 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -18,7 +18,7 @@ - if can?(current_user, :read_project, @project) %span.gl-display-inline-block.gl-vertical-align-middle = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } - = clipboard_button(title: s_('ProjectPage|Copy project ID'), text: @project.id) + = deprecated_clipboard_button(title: s_('ProjectPage|Copy project ID'), text: @project.id) - if current_user %span.gl-ml-3.gl-mb-3 = render 'shared/members/access_request_links', source: @project diff --git a/app/views/projects/_invite_members_empty_project.html.haml b/app/views/projects/_invite_members_empty_project.html.haml index 18d06c7d0bb..d6cab06f773 100644 --- a/app/views/projects/_invite_members_empty_project.html.haml +++ b/app/views/projects/_invite_members_empty_project.html.haml @@ -6,4 +6,4 @@ .js-invite-members-trigger{ data: { variant: 'confirm', classes: 'gl-mb-8 gl-xs-w-full', display_text: s_('InviteMember|Invite members'), - trigger_source: 'project-empty-page' } } + trigger_source: 'project_empty_page' } } diff --git a/app/views/projects/_merge_request_merge_checks_settings.html.haml b/app/views/projects/_merge_request_merge_checks_settings.html.haml deleted file mode 100644 index bb7a7731067..00000000000 --- a/app/views/projects/_merge_request_merge_checks_settings.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- form = local_assigns.fetch(:form) - -.form-group - %b= s_('ProjectSettings|Merge checks') - %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged.') - = render 'projects/merge_request_pipelines_and_threads_options', form: form, project: @project - = render_if_exists 'projects/merge_request_merge_checks_status_checks', form: form, project: @project - = render_if_exists 'projects/merge_request_merge_checks_jira_enforcement', form: form, project: @project diff --git a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml b/app/views/projects/_merge_request_merge_suggestions_settings.html.haml deleted file mode 100644 index eb2fc05686c..00000000000 --- a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -- form = local_assigns.fetch(:form) - -.form-group - %b= s_('ProjectSettings|Merge suggestions') - %p.text-secondary - = s_('ProjectSettings|The commit message used when applying merge request suggestions.') - .mb-2 - = form.text_field :suggestion_commit_message, class: 'form-control mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE - %p.form-text.text-muted - = s_('ProjectSettings|Leave empty to use default template.') - = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_SUGGESTIONS_TEMPLATE_LENGTH }) - - configure_the_commit_message_for_applied_suggestions_help_link_url = help_page_path('user/project/merge_requests/reviews/suggestions.md', anchor: 'configure-the-commit-message-for-applied-suggestions') - - configure_the_commit_message_for_applied_suggestions_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_commit_message_for_applied_suggestions_help_link_url } - = s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}').html_safe % { link_start: configure_the_commit_message_for_applied_suggestions_help_link_start, link_end: '</a>'.html_safe } diff --git a/app/views/projects/_merge_request_settings.html.haml b/app/views/projects/_merge_request_settings.html.haml deleted file mode 100644 index 728ff597860..00000000000 --- a/app/views/projects/_merge_request_settings.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -- form = local_assigns.fetch(:form) - -= render 'projects/merge_request_merge_method_settings', project: @project, form: form - -= render 'projects/merge_request_merge_options_settings', project: @project, form: form - -= render 'projects/merge_request_squash_options_settings', form: form - -= render 'projects/merge_request_merge_checks_settings', project: @project, form: form - -= render 'projects/merge_request_merge_suggestions_settings', project: @project, form: form - -= render 'projects/merge_request_merge_commit_template', project: @project, form: form - -= render 'projects/merge_request_squash_commit_template', project: @project, form: form - -- if @project.forked? - = render 'projects/merge_request_target_project_settings', project: @project, form: form diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index c2382a66132..3dbc4c0fad7 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -12,7 +12,7 @@ enabled: "#{@project.service_desk_enabled}", issue_tracker_enabled: "#{@project.project_feature.issues_enabled?}", incoming_email: (@project.service_desk_incoming_address if @project.service_desk_enabled), - service_desk_email: (@project.service_desk_custom_address if @project.service_desk_enabled), + service_desk_email: (@project.service_desk_alias_address if @project.service_desk_enabled), service_desk_email_enabled: "#{Gitlab::Email::ServiceDeskEmail.enabled?}", selected_template: "#{@project.service_desk_setting&.issue_template_key}", selected_file_template_project_id: "#{@project.service_desk_setting&.file_template_project_id}", diff --git a/app/views/projects/_transfer.html.haml b/app/views/projects/_transfer.html.haml index fe84a83c43c..cf0634ee411 100644 --- a/app/views/projects/_transfer.html.haml +++ b/app/views/projects/_transfer.html.haml @@ -8,15 +8,15 @@ .gl-new-card-title-wrapper %h4.gl-new-card-title.warning-title= _('Transfer project') %p.gl-new-card-description - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'transfer-a-project-to-another-namespace') } - = _("Transfer your project into another namespace. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/index', anchor: 'transfer-a-project-to-another-namespace'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("Transfer your project into another namespace. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) - c.with_body do = form_for @project, url: transfer_project_path(@project), method: :put, html: { class: 'js-project-transfer-form', id: form_id } do |f| .form-group.gl-mb-0 %p - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') } - = _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/index', anchor: 'rename-a-repository'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) %p= _('When you transfer your project to a group, you can easily manage multiple projects, view usage quotas for storage, pipeline minutes, and users, and start a trial or upgrade to a paid tier.') %p = _("Don't have a group?") diff --git a/app/views/projects/activity.html.haml b/app/views/projects/activity.html.haml index 674b21b66b9..6a4760c3954 100644 --- a/app/views/projects/activity.html.haml +++ b/app/views/projects/activity.html.haml @@ -1,6 +1,4 @@ - page_title _("Activity") -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - = render 'projects/last_push' = render 'projects/activity' diff --git a/app/views/projects/artifacts/_tree_directory.html.haml b/app/views/projects/artifacts/_tree_directory.html.haml index c68cc19f6c1..56105c4cac3 100644 --- a/app/views/projects/artifacts/_tree_directory.html.haml +++ b/app/views/projects/artifacts/_tree_directory.html.haml @@ -3,6 +3,6 @@ %tr.tree-item{ 'data-link' => path_to_directory } %td.tree-item-file-name = tree_icon('folder', '755', directory.name) - = link_to path_to_directory, class: 'str-truncated', data: { qa_selector: 'directory_name_link', qa_directory_name: directory.name } do + = link_to path_to_directory, class: 'str-truncated', data: { testid: 'directory-name-link', qa_directory_name: directory.name } do %span= directory.name %td diff --git a/app/views/projects/blob/_header_content.html.haml b/app/views/projects/blob/_header_content.html.haml index 9cd2f583fdd..8c132a16797 100644 --- a/app/views/projects/blob/_header_content.html.haml +++ b/app/views/projects/blob/_header_content.html.haml @@ -3,7 +3,7 @@ .js-table-contents = blob_icon blob.mode, blob.name - %strong.file-title-name.gl-word-break-all{ data: { qa_selector: 'file_name_content' } } + %strong.file-title-name.gl-word-break-all{ data: { testid: 'file-name-content' } } = blob.name = copy_file_path_button(blob.path) diff --git a/app/views/projects/blob/viewers/_markup.html.haml b/app/views/projects/blob/viewers/_markup.html.haml index 703ffa8896e..01f730db33e 100644 --- a/app/views/projects/blob/viewers/_markup.html.haml +++ b/app/views/projects/blob/viewers/_markup.html.haml @@ -1,3 +1,3 @@ - blob = viewer.blob -.file-content.md +.file-content.js-markup-content.md = markup(blob.name, blob.data, viewer.banzai_render_context) diff --git a/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml b/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml index 9c3f9b6c9fd..b7bc43d08d8 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml @@ -7,5 +7,3 @@ %ul - viewer.errors.each do |error| %li= error - -= link_to _('Learn more'), help_page_path('operations/metrics/dashboards/index.md') diff --git a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml index 5e355ecc4b8..1f5086dc3bd 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml @@ -1,4 +1,2 @@ = gl_loading_icon(inline: true, css_class: "mr-1") = _('Metrics Dashboard YAML definition') + '…' - -= link_to _('Learn more'), help_page_path('operations/metrics/dashboards/yaml.md') diff --git a/app/views/projects/branch_defaults/_branch_names_fields.html.haml b/app/views/projects/branch_defaults/_branch_names_fields.html.haml index 4e4a72c154f..3e77cb51a85 100644 --- a/app/views/projects/branch_defaults/_branch_names_fields.html.haml +++ b/app/views/projects/branch_defaults/_branch_names_fields.html.haml @@ -6,7 +6,7 @@ .form-group .gl-mb-2 - = f.text_field :issue_branch_template, class: 'form-control gl-mb-2', placeholder: "%{id}-%{title}" + = f.text_field :issue_branch_template, class: 'form-control gl-mb-2 gl-form-input-xl', placeholder: "%{id}-%{title}" %p.form-text.text-muted = s_('ProjectSettings|Leave empty to use default template.') = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Issue::MAX_BRANCH_TEMPLATE }) diff --git a/app/views/projects/branch_defaults/_default_branch_fields.html.haml b/app/views/projects/branch_defaults/_default_branch_fields.html.haml index e4f51725f1a..2c59e187d30 100644 --- a/app/views/projects/branch_defaults/_default_branch_fields.html.haml +++ b/app/views/projects/branch_defaults/_default_branch_fields.html.haml @@ -6,7 +6,8 @@ .form-group = f.label :default_branch, _("Default branch"), class: 'label-bold' %p= s_('ProjectSettings|All merge requests and commits are made against this branch unless you specify a different one.') - .js-select-default-branch{ data: { default_branch: @project.default_branch, project_id: @project.id } } + .gl-form-input-xl + .js-select-default-branch{ data: { default_branch: @project.default_branch, project_id: @project.id } } .form-group - help_text = _("When merge requests and commits in the default branch close, any issues they reference also close.") diff --git a/app/views/projects/buttons/_clone.html.haml b/app/views/projects/buttons/_clone.html.haml index db5d1ff5693..b5679bc512c 100644 --- a/app/views/projects/buttons/_clone.html.haml +++ b/app/views/projects/buttons/_clone.html.haml @@ -15,7 +15,7 @@ .input-group.btn-group = text_field_tag :ssh_project_clone, ssh_clone_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'ssh_clone_url_content' } .input-group-append - = clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") + = deprecated_clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' - if http_enabled? %li.pt-2{ class: 'gl-px-4!' } @@ -24,7 +24,7 @@ .input-group.btn-group = text_field_tag :http_project_clone, http_clone_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'http_clone_url_content' } .input-group-append - = clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") + = deprecated_clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' = render_if_exists 'projects/buttons/kerberos_clone_field' %li.divider.mt-2 diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 24d063d3b4d..e79a91eddaf 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -45,11 +45,12 @@ = gl_loading_icon(inline: true, css_class: 'gl-vertical-align-middle') - if can?(current_user, :read_pipeline, @last_pipeline) + - status = @last_pipeline.detailed_status(current_user) .well-segment.pipeline-info .js-commit-pipeline-status{ data: { full_path: @project.full_path, iid: @last_pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@last_pipeline) } } #{ _('Pipeline') } = link_to "##{@last_pipeline.id}", project_pipeline_path(@project, @last_pipeline.id) - = ci_label_for_status(@last_pipeline.status) + = status&.label - if @last_pipeline.stages_count.nonzero? #{ n_(s_('Pipeline|with stage'), s_('Pipeline|with stages'), @last_pipeline.stages_count) } .js-commit-pipeline-mini-graph{ data: { stages: @last_pipeline_stages.to_json.html_safe, full_path: @project.full_path, iid: @last_pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@last_pipeline) } } diff --git a/app/views/projects/commit/_signature_badge.html.haml b/app/views/projects/commit/_signature_badge.html.haml index 5b99a88f29e..6aefc2eaa8b 100644 --- a/app/views/projects/commit/_signature_badge.html.haml +++ b/app/views/projects/commit/_signature_badge.html.haml @@ -17,17 +17,17 @@ - if signature.x509? = render partial: "projects/commit/x509/certificate_details", locals: { signature: signature } - = link_to(_('Learn more about X.509 signed commits'), help_page_path('user/project/repository/x509_signed_commits/index.md'), class: 'gl-link gl-display-block') + = link_to(_('Learn more about X.509 signed commits'), help_page_path('user/project/repository/signed_commits/x509.md'), class: 'gl-link gl-display-block') - elsif signature.ssh? = _('SSH key fingerprint:') %span.gl-font-monospace= signature.key_fingerprint_sha256 || _('Unknown') - = link_to(_('Learn about signing commits with SSH keys.'), help_page_path('user/project/repository/ssh_signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3') + = link_to(_('Learn about signing commits with SSH keys.'), help_page_path('user/project/repository/signed_commits/ssh.md'), class: 'gl-link gl-display-block gl-mt-3') - else = _('GPG Key ID:') %span.gl-font-monospace= signature.gpg_key_primary_keyid - = link_to(_('Learn about signing commits'), help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3') + = link_to(_('Learn about signing commits'), help_page_path('user/project/repository/signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3') %a.signature-badge.gl-display-inline-block.gl-ml-4{ role: 'button', tabindex: 0, data: { toggle: 'popover', html: 'true', placement: 'top', title: title, content: content } } = gl_badge_tag label, variant: variant diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 13a406d442d..c42d0fe9931 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -76,5 +76,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 btn-icon", container: "body") + = clipboard_button(text: commit.id, category: :primary, size: :medium, title: _("Copy commit SHA")) = link_to_browse_code(project, commit) diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index 4a29402bfe7..38633c9e5f1 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -1,6 +1,6 @@ - breadcrumb_title s_("CompareRevisions|Compare revisions") -- page_title _("CompareRevisions|Compare revisions") +- page_title s_("CompareRevisions|Compare revisions") .prepend-top-20 #js-compare-selector{ data: project_compare_selector_data(@project, @merge_request, @compare_params) } diff --git a/app/views/projects/deployments/_commit.html.haml b/app/views/projects/deployments/_commit.html.haml deleted file mode 100644 index 509ed62b39d..00000000000 --- a/app/views/projects/deployments/_commit.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -.table-mobile-content - .branch-commit.cgray - - if deployment.ref - %span.icon-container.gl-display-inline-block - = deployment.tag? ? sprite_icon('tag', css_class: 'sprite') : sprite_icon('fork', css_class: 'sprite') - = link_to deployment.ref, project_ref_path(@project, deployment.ref), class: "ref-name" - .icon-container.commit-icon - = custom_icon("icon_commit") - = link_to deployment.short_sha, project_commit_path(@project, deployment.sha), class: "commit-sha mr-0" - - %p.commit-title.flex-truncate-parent - %span.flex-truncate-child - - if commit_title = deployment.commit_title - = author_avatar(deployment.commit, size: 20) - = link_to_markdown commit_title, project_commit_path(@project, deployment.sha), class: "commit-row-message cgray" - - else - = _("Can't find HEAD commit for this branch") diff --git a/app/views/projects/deployments/_deployment.html.haml b/app/views/projects/deployments/_deployment.html.haml deleted file mode 100644 index e3688c8d323..00000000000 --- a/app/views/projects/deployments/_deployment.html.haml +++ /dev/null @@ -1,49 +0,0 @@ -.gl-responsive-table-row.deployment{ role: 'row' } - .table-section.section-15{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Status") - .table-mobile-content - = render_deployment_status(deployment) - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("ID") - %strong.table-mobile-content{ data: { testid: 'deployment-id' } } ##{deployment.iid} - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Triggerer") - .table-mobile-content - - if deployment.deployed_by - = user_avatar(user: deployment.deployed_by, size: 26, css_class: "mr-0 float-none") - - .table-section.section-25{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Commit") - = render 'projects/deployments/commit', deployment: deployment - - .table-section.section-10.build-column{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Job") - - if deployment.deployable - .table-mobile-content - .flex-truncate-parent - .flex-truncate-child.has-tooltip.gl-white-space-normal.gl-md-white-space-nowrap{ :title => "#{deployment.deployable.name} (##{deployment.deployable.id})", data: { container: 'body' } } - = link_to deployment_path(deployment), class: 'build-link' do - #{deployment.deployable.name} (##{deployment.deployable.id}) - - else - = gl_badge_tag s_('Deployment|API'), { variant: :info }, { class: 'gl-cursor-help', data: { toggle: 'tooltip' }, title: s_('Deployment|This deployment was created using the API') } - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Created") - %span.table-mobile-content.flex-truncate-parent - %span.flex-truncate-child - = time_ago_with_tooltip(deployment.created_at) - - .table-section.section-10{ role: 'gridcell' } - .table-mobile-header{ role: 'rowheader' }= _("Deployed") - - if deployment.deployed_at - %span.table-mobile-content.flex-truncate-parent - %span.flex-truncate-child - = time_ago_with_tooltip(deployment.deployed_at) - - .table-section.section-10.table-button-footer{ role: 'gridcell' } - .btn-group.table-action-buttons - = render 'projects/deployments/actions', deployment: deployment - = render 'projects/deployments/rollback', deployment: deployment - = render_if_exists 'projects/deployments/approvals', deployment: deployment diff --git a/app/views/projects/deployments/_rollback.haml b/app/views/projects/deployments/_rollback.haml deleted file mode 100644 index e50fa1fa0f7..00000000000 --- a/app/views/projects/deployments/_rollback.haml +++ /dev/null @@ -1,4 +0,0 @@ -- if deployment.deployable && can?(current_user, :play_job, deployment.deployable) - - tooltip = deployment.last? ? s_('Environments|Re-deploy to environment') : s_('Environments|Rollback environment') - - icon = deployment.last? ? 'repeat' : 'redo' - = render Pajamas::ButtonComponent.new(icon: icon, button_options: { title: tooltip, class: 'js-confirm-rollback-modal-button has-tooltip', data: { environment_name: @environment.name, commit_short_sha: deployment.short_sha, commit_url: project_commit_path(@project, deployment.sha), is_last_deployment: deployment.last?.to_s, retry_path: retry_project_job_path(@environment.project, deployment.deployable) } }) diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml index afca27c5430..17e55699615 100644 --- a/app/views/projects/diffs/_file_header.html.haml +++ b/app/views/projects/diffs/_file_header.html.haml @@ -5,7 +5,7 @@ - if diff_file.submodule? %span - = sprite_icon('archive') + = sprite_icon('folder-git', file_icon: true) %strong.file-title-name = submodule_link(diff_file.blob, diff_file.content_sha, diff_file.repository) @@ -23,7 +23,7 @@ %strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.new_path, container: 'body' } } = new_path - else - %strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.file_path, container: 'body', qa_selector: 'file_name_content' } } + %strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.file_path, container: 'body', testid: 'file-name-content' } } = diff_file.file_path - if diff_file.deleted_file? diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 662f1bb158d..0158018ecc0 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -5,8 +5,6 @@ - reduce_visibility_form_id = 'reduce-visibility-form' - @force_desktop_expanded_sidebar = true -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - = render Pajamas::AlertComponent.new(title: _('GitLab Pages has moved'), alert_options: { class: 'gl-my-5', data: { feature_id: Users::CalloutsHelper::PAGES_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c| - c.with_body do @@ -91,8 +89,8 @@ .gl-new-card-title-wrapper %h4.gl-new-card-title.warning-title= _('Change path') %p.gl-new-card-description - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') } - = _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/settings/index', anchor: 'rename-a-repository'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}"), tag_pair(link, :link_start, :link_end)) - c.with_body do = render 'projects/errors' diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index e97cae911d9..46ec430cadb 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -8,33 +8,4 @@ #environments-detail-view{ data: { details: environments_detail_data_json(current_user, @project, @environment) } } #environments-detail-view-header - - if Feature.enabled?(:environment_details_vue, @project) - #environment_details_page - - else - .environments-container - - if @deployments.blank? - .empty-state - .text-content - %h4.state-title - = _("You don't have any deployments right now.") - %p - = html_escape(_("Define environments in the deploy stage(s) in %{code_open}.gitlab-ci.yml%{code_close} to track deployments here.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - .text-center - = render Pajamas::ButtonComponent.new(variant: :confirm, href: help_page_path("ci/environments/index.md")) do - = _('Read more') - - - else - .table-holder.gl-overflow-visible - .ci-table.environments{ role: 'grid' } - .gl-responsive-table-row.table-row-header{ role: 'row' } - .table-section.section-15{ role: 'columnheader' }= _('Status') - .table-section.section-10{ role: 'columnheader' }= _('ID') - .table-section.section-10{ role: 'columnheader' }= _('Triggerer') - .table-section.section-25{ role: 'columnheader' }= _('Commit') - .table-section.section-10{ role: 'columnheader' }= _('Job') - .table-section.section-10{ role: 'columnheader' }= _('Created') - .table-section.section-10{ role: 'columnheader' }= _('Deployed') - - = render @deployments - - = paginate @deployments, theme: 'gitlab' + #environment_details_page diff --git a/app/views/projects/hook_logs/show.html.haml b/app/views/projects/hook_logs/show.html.haml index 2eaf89be4ef..f8025f7c462 100644 --- a/app/views/projects/hook_logs/show.html.haml +++ b/app/views/projects/hook_logs/show.html.haml @@ -1,7 +1,7 @@ - add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path - page_title _('Webhook Logs') -%h1.page-title.gl-font-size-h-display +%h2.page-title.gl-font-size-h-display = _("Request details") %hr diff --git a/app/views/projects/incidents/show.html.haml b/app/views/projects/incidents/show.html.haml index 6d733dc46df..400c07835cd 100644 --- a/app/views/projects/incidents/show.html.haml +++ b/app/views/projects/incidents/show.html.haml @@ -1,9 +1,17 @@ -- @content_class = "limit-container-width" unless fluid_layout - add_to_breadcrumbs _("Incidents"), project_incidents_path(@project) - breadcrumb_title @issue.to_reference + - page_title "#{@issue.title} (#{@issue.to_reference})", _("Incidents") +- page_description @issue.description_html +- page_card_attributes @issue.card_attributes +- if @issue.relocation_target + - page_canonical_link @issue.relocation_target.present(current_user: current_user).web_url + - add_page_specific_style 'page_bundles/design_management' - add_page_specific_style 'page_bundles/incidents' +- add_page_specific_style 'page_bundles/issuable' - add_page_specific_style 'page_bundles/issues_show' -= render 'projects/issuable/show', issuable: @issue +- @content_class = "limit-container-width" unless fluid_layout + += render 'projects/issues/details_content', issuable: @issue diff --git a/app/views/projects/issuable/_show.html.haml b/app/views/projects/issuable/_show.html.haml deleted file mode 100644 index e502457808d..00000000000 --- a/app/views/projects/issuable/_show.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -- api_awards_path = local_assigns.fetch(:api_awards_path, nil) -- page_description issuable.description_html -- page_card_attributes issuable.card_attributes -- if issuable.relocation_target - - page_canonical_link issuable.relocation_target.present(current_user: current_user).web_url -- add_page_specific_style 'page_bundles/issuable' - -= render "projects/issues/service_desk/alert_moved_from_service_desk", issue: issuable - -= render 'shared/issue_type/details_content', issuable: issuable, api_awards_path: api_awards_path diff --git a/app/views/shared/issue_type/_details_content.html.haml b/app/views/projects/issues/_details_content.html.haml index 249e296b41a..51ffb68f4e5 100644 --- a/app/views/shared/issue_type/_details_content.html.haml +++ b/app/views/projects/issues/_details_content.html.haml @@ -1,14 +1,12 @@ - related_branches_path = related_branches_project_issue_path(@project, issuable) - api_awards_path = local_assigns.fetch(:api_awards_path, nil) += render "projects/issues/service_desk/alert_moved_from_service_desk", issue: issuable + .issue-details.issuable-details.js-issue-details .detail-page-description.content-block.js-detail-page-description.gl-pt-3.gl-pb-0.gl-border-none #js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, - header_actions_data: issue_header_actions_data(@project, issuable, current_user, @issuable_sidebar).to_json, - issuable_id: issuable.id, - full_path: @project.full_path, - register_path: new_user_registration_path(redirect_to_referer: 'yes'), - sign_in_path: new_session_path(:user, redirect_to_referer: 'yes') } } + header_actions_data: issue_header_actions_data(@project, issuable, current_user, @issuable_sidebar).to_json } } .title-container %h1.title.page-title.gl-font-size-h-display= markdown_field(issuable, :title) - if issuable.description.present? @@ -18,10 +16,10 @@ = edited_time_ago_with_tooltip(issuable, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago') .js-issue-widgets - = render 'shared/issue_type/emoji_block', issuable: issuable, api_awards_path: api_awards_path + = render 'projects/issues/emoji_block', issuable: issuable, api_awards_path: api_awards_path .js-issue-widgets - = render 'shared/issue_type/sentry_stack_trace', issuable: issuable + = render 'projects/issues/sentry_stack_trace', issuable: issuable = render 'projects/issues/design_management' @@ -29,7 +27,10 @@ = render_if_exists 'projects/issues/linked_resources' = render 'projects/issues/related_issues' - #js-related-merge-requests{ data: { endpoint: expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: issuable.iid)), project_namespace: @project.namespace.path, project_path: @project.path } } + #js-related-merge-requests{ data: { endpoint: expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: issuable.iid)), + has_closing_merge_request: (issuable.merge_requests_count(current_user) != 0).to_s, + project_namespace: @project.namespace.path, + project_path: @project.path } } - if can?(current_user, :read_code, @project) - add_page_startup_api_call related_branches_path diff --git a/app/views/shared/issue_type/_emoji_block.html.haml b/app/views/projects/issues/_emoji_block.html.haml index 7eb3c0f5c9f..7eb3c0f5c9f 100644 --- a/app/views/shared/issue_type/_emoji_block.html.haml +++ b/app/views/projects/issues/_emoji_block.html.haml diff --git a/app/views/projects/issues/_related_issues.html.haml b/app/views/projects/issues/_related_issues.html.haml index 2409c61fbf2..73a88e63a4e 100644 --- a/app/views/projects/issues/_related_issues.html.haml +++ b/app/views/projects/issues/_related_issues.html.haml @@ -4,6 +4,7 @@ full_path: @project.full_path, has_issue_weights_feature: @project.licensed_feature_available?(:issue_weights).to_s, help_path: help_page_path('user/project/issues/related_issues'), + issuable_type: @issue.issue_type, show_categorized_issues: @project.licensed_feature_available?(:blocked_issues).to_s, has_iterations_feature: @project.licensed_feature_available?(:iterations).to_s, report_abuse_path: add_category_abuse_reports_path } } diff --git a/app/views/shared/issue_type/_sentry_stack_trace.html.haml b/app/views/projects/issues/_sentry_stack_trace.html.haml index 40b29a74b53..40b29a74b53 100644 --- a/app/views/shared/issue_type/_sentry_stack_trace.html.haml +++ b/app/views/projects/issues/_sentry_stack_trace.html.haml diff --git a/app/views/projects/issues/service_desk.html.haml b/app/views/projects/issues/service_desk.html.haml index 2d17719a8c2..4453cb2e538 100644 --- a/app/views/projects/issues/service_desk.html.haml +++ b/app/views/projects/issues/service_desk.html.haml @@ -2,10 +2,11 @@ - page_title _("Service Desk") - add_page_specific_style 'page_bundles/issuable_list' +- add_page_specific_style 'page_bundles/issues_list' - content_for :breadcrumbs_extra do = render "projects/issues/service_desk/nav_btns", show_export_button: false, show_rss_button: false -- support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json +- support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(Users::Internal.support_bot) }.to_json .js-service-desk-issues.service-desk-issues{ data: { support_bot: support_bot_attrs } } - if ::Feature.enabled?(:service_desk_vue_list, @project) diff --git a/app/views/projects/issues/service_desk/_issue.html.haml b/app/views/projects/issues/service_desk/_issue.html.haml index 5b98712d3eb..66b2eabac9d 100644 --- a/app/views/projects/issues/service_desk/_issue.html.haml +++ b/app/views/projects/issues/service_desk/_issue.html.haml @@ -48,10 +48,10 @@ .issuable-meta %ul.controls - if issue.closed? && issue.moved? - %li.issuable-status + %li = render Pajamas::BadgeComponent.new(_('Closed (moved)'), size: 'sm', variant: 'info') - elsif issue.closed? - %li.issuable-status + %li = render Pajamas::BadgeComponent.new(_('Closed'), size: 'sm', variant: 'info') - if issue.assignees.any? %li.gl-display-flex diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 7e8bf4ae57f..457eaf5e194 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -1,10 +1,18 @@ -- @content_class = "limit-container-width" unless fluid_layout - add_to_breadcrumbs _("Issues"), project_issues_path(@project) - breadcrumb_title @issue.to_reference + - page_title "#{@issue.title} (#{@issue.to_reference})", _("Issues") +- page_description @issue.description_html +- page_card_attributes @issue.card_attributes +- if @issue.relocation_target + - page_canonical_link @issue.relocation_target.present(current_user: current_user).web_url + - add_page_specific_style 'page_bundles/design_management' - add_page_specific_style 'page_bundles/incidents' +- add_page_specific_style 'page_bundles/issuable' - add_page_specific_style 'page_bundles/issues_show' - add_page_specific_style 'page_bundles/work_items' -= render 'projects/issuable/show', issuable: @issue, api_awards_path: award_emoji_issue_api_path(@issue) +- @content_class = "limit-container-width" unless fluid_layout + += render 'projects/issues/details_content', issuable: @issue, api_awards_path: award_emoji_issue_api_path(@issue) diff --git a/app/views/projects/jobs/_table.html.haml b/app/views/projects/jobs/_table.html.haml deleted file mode 100644 index 0bb512b4035..00000000000 --- a/app/views/projects/jobs/_table.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -- admin = local_assigns.fetch(:admin, false) - -- if builds.blank? - - if @project - .row.empty-state - .col-12 - .svg-content.svg-250 - = image_tag('jobs-empty-state.svg') - .col-12 - .text-content.gl-text-center - %h4 - = s_('Jobs|Use jobs to automate your tasks') - %p - = s_('Jobs|Jobs are the building blocks of a GitLab CI/CD pipeline. Each job has a specific task, like testing code. To set up jobs in a CI/CD pipeline, add a CI/CD configuration file to your project.') - = link_button_to s_('Jobs|Create CI/CD configuration file'), project_ci_pipeline_editor_path(project), class: 'js-empty-state-button', variant: :confirm - - else - .nothing-here-block= s_('Jobs|No jobs to show') -- else - .table-holder - %table.table.ci-table.builds-page - %thead - %tr - %th= _('Status') - %th= _('Name') - %th= _('Job') - %th= _('Pipeline') - - if admin - %th= _('Project') - %th= _('Runner') - %th= _('Stage') - %th= _('Duration') - %th= _('Coverage') - %th - - = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, pipeline_link: true, stage: true, allow_retry: true, admin: admin } - - = paginate_collection(builds) diff --git a/app/views/projects/labels/edit.html.haml b/app/views/projects/labels/edit.html.haml index 4f4609e6016..ce8b3f70204 100644 --- a/app/views/projects/labels/edit.html.haml +++ b/app/views/projects/labels/edit.html.haml @@ -1,8 +1,9 @@ - add_to_breadcrumbs _("Labels"), project_labels_path(@project) - breadcrumb_title _("Edit") - page_title _("Edit"), @label.name, _("Labels") +- show_lock_on_merge = @project.supports_lock_on_merge? %h1.page-title.gl-font-size-h-display = _('Edit Label') -= render 'shared/labels/form', url: project_label_path(@project, @label), back_path: project_labels_path(@project) += render 'shared/labels/form', url: project_label_path(@project, @label), back_path: project_labels_path(@project), show_lock_on_merge: show_lock_on_merge diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index 8855e8024b3..4b27b344498 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -3,7 +3,6 @@ - search = params[:search] - subscribed = params[:subscribed] - labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present? -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - if labels_or_filters #js-promote-label-modal diff --git a/app/views/projects/merge_requests/_code_dropdown.html.haml b/app/views/projects/merge_requests/_code_dropdown.html.haml index 4cab6fac388..bfa33f26453 100644 --- a/app/views/projects/merge_requests/_code_dropdown.html.haml +++ b/app/views/projects/merge_requests/_code_dropdown.html.haml @@ -1,6 +1,6 @@ .gl-md-ml-3.dropdown.gl-dropdown{ class: "gl-display-none! gl-md-display-flex!" } #js-check-out-modal{ data: how_merge_modal_data(@merge_request) } - = button_tag type: 'button', class: "btn dropdown-toggle btn-confirm gl-button gl-dropdown-toggle", data: { toggle: 'dropdown', qa_selector: 'mr_code_dropdown' } do + = button_tag type: 'button', class: "btn dropdown-toggle btn-confirm gl-button gl-dropdown-toggle", data: { toggle: 'dropdown', testid: 'mr-code-dropdown' } do %span.gl-dropdown-button-text= _('Code') = sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon gl-ml-2 gl-mr-0!" .dropdown-menu.dropdown-menu-right @@ -16,7 +16,7 @@ = _('Check out branch') - if current_user %li.gl-dropdown-item - = link_to ide_merge_request_path(@merge_request), class: 'dropdown-item', target: '_blank', data: { qa_selector: 'open_in_web_ide_button' } do + = link_to ide_merge_request_path(@merge_request), class: 'dropdown-item', target: '_blank', data: { testid: 'open-in-web-ide-button' } do .gl-dropdown-item-text-wrapper = _('Open in Web IDE') - if Gitlab::CurrentSettings.gitpod_enabled && current_user&.gitpod_enabled @@ -30,10 +30,10 @@ %header.dropdown-header = _('Download') %li.gl-dropdown-item - = link_to merge_request_path(@merge_request, format: :patch), class: 'dropdown-item', download: '', data: { qa_selector: 'download_email_patches_menu_item' } do + = link_to merge_request_path(@merge_request, format: :patch), class: 'dropdown-item', download: '', data: { testid: 'download-email-patches-menu-item' } do .gl-dropdown-item-text-wrapper = _('Patches') %li.gl-dropdown-item - = link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', download: '', data: { qa_selector: 'download_plain_diff_menu_item' } do + = link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', download: '', data: { testid: 'download-plain-diff-menu-item' } do .gl-dropdown-item-text-wrapper = _('Plain diff') diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index 7b815d996e0..4a7aa9a86ab 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -45,8 +45,10 @@ .issuable-meta %ul.controls.d-flex.align-items-end - if merge_request.merged? + - merged_at = merge_request.merged_at ? l(merge_request.merged_at.to_time) : _("Merge date & time could not be determined") %li.d-none.d-sm-flex - = render Pajamas::BadgeComponent.new(_('Merged'), size: 'sm', variant: 'info') + %a.has-tooltip{ href: "#{merge_request_path(merge_request)}#widget-state", title: merged_at } + = render Pajamas::BadgeComponent.new(_('Merged'), size: 'sm', variant: 'info') - elsif merge_request.closed? %li.d-none.d-sm-flex = render Pajamas::BadgeComponent.new(_('Closed'), size: 'sm', variant: 'danger') diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index dfa582f4c60..f0e7df8a379 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -15,7 +15,7 @@ .detail-page-header.border-bottom-0.gl-display-block.gl-pt-5{ class: "gl-md-display-flex! #{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" } .detail-page-header-body .issuable-meta.gl-display-flex - #js-issuable-header-warnings{ data: { hidden: @merge_request.hidden?.to_s } } + .js-header-metadata-root{ data: { hidden: @merge_request.hidden?.to_s } } %h1.title.page-title.gl-font-size-h-display.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } } = markdown_field(@merge_request, :title) diff --git a/app/views/projects/merge_requests/_page.html.haml b/app/views/projects/merge_requests/_page.html.haml index 69e2487152e..dfb18b52021 100644 --- a/app/views/projects/merge_requests/_page.html.haml +++ b/app/views/projects/merge_requests/_page.html.haml @@ -28,12 +28,12 @@ .merge-request-tabs-holder{ class: "#{'js-tabs-affix' unless ENV['RAILS_ENV'] == 'test'} #{'gl-static' if moved_mr_sidebar_enabled?}" } .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between{ class: "#{'is-merge-request' if Feature.enabled?(:moved_mr_sidebar, @project) && !fluid_layout}" } %ul.merge-request-tabs.nav-tabs.nav.nav-links.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0{ class: "#{'gl-w-full gl-lg-w-auto!' if Feature.enabled?(:moved_mr_sidebar, @project)}" } - = render "projects/merge_requests/tabs/tab", class: "notes-tab", qa_selector: "notes_tab" do + = render "projects/merge_requests/tabs/tab", class: "notes-tab", testid: "notes-tab" do = tab_link_for @merge_request, :show, force_link: @commit.present? do = _("Overview") = gl_badge_tag @merge_request.related_notes.user.count, { size: :sm }, { class: 'js-discussions-count' } - if @merge_request.source_project - = render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab", qa_selector: "commits_tab" do + = render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab", testid: "commits-tab" do = tab_link_for @merge_request, :commits do = _("Commits") = gl_badge_tag tab_count_display(@merge_request, @commits_count), { size: :sm }, { class: 'js-commits-count' } @@ -42,7 +42,7 @@ = tab_link_for @merge_request, :pipelines do = _("Pipelines") = gl_badge_tag @number_of_pipelines, { size: :sm }, { class: 'js-pipelines-mr-count' } - = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab js-diffs-tab", id: "diffs-tab", qa_selector: "diffs_tab" do + = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab js-diffs-tab", id: "diffs-tab", testid: "diffs-tab" do = tab_link_for @merge_request, :diffs do = _("Changes") = gl_badge_tag tab_count_display(@merge_request, @diffs_count), { size: :sm } @@ -61,6 +61,7 @@ = render "projects/merge_requests/tabs/pane", id: "notes", class: "notes voting_notes" do %div{ class: "#{'merge-request-overview' if moved_mr_sidebar_enabled?}" } %section + = render_if_exists "projects/merge_requests/diff_summary" .issuable-discussion.js-vue-notes-event - if @merge_request.description.present? .detail-page-description.gl-pb-0 diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index 07bae4d2396..e6bd0b05f00 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -14,7 +14,7 @@ = gitlab_ui_form_for [@project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form js-requires-input" } do |f| - if params[:nav_source].present? = hidden_field_tag(:nav_source, params[:nav_source]) - .js-merge-request-new-compare.row{ 'data-source-branch-url': project_new_merge_request_branch_from_path(@source_project), 'data-target-branch-url': project_new_merge_request_branch_to_path(@source_project) } + .js-merge-request-new-compare.row{ data: mr_compare_form_data(current_user, @merge_request) } .col-lg-6 .card-new-merge-request %h2.gl-font-size-h2 @@ -31,4 +31,4 @@ = form_errors(@merge_request) .row .col-12 - = f.submit _('Compare branches and continue'), data: { qa_selector: 'compare_branches_button' }, pajamas_button: true + = f.submit _('Compare branches and continue'), data: { testid: 'compare-branches-button' }, pajamas_button: true diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index a7151421acb..996928ba377 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -50,7 +50,7 @@ = _("Pipelines") = gl_badge_tag @pipelines.size, { size: :sm }, { class: 'gl-tab-counter-badge' } %li.diffs-tab - = link_to url_for(safe_params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tabvue', qa_selector: 'diffs_tab'} do + = link_to url_for(safe_params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tabvue', testid: 'diffs-tab'} do = _("Changes") = gl_badge_tag @merge_request.diff_size, { size: :sm }, { class: 'gl-tab-counter-badge' } diff --git a/app/views/projects/merge_requests/tabs/_tab.html.haml b/app/views/projects/merge_requests/tabs/_tab.html.haml index 9d942da8098..f6c8f4cd87b 100644 --- a/app/views/projects/merge_requests/tabs/_tab.html.haml +++ b/app/views/projects/merge_requests/tabs/_tab.html.haml @@ -1,8 +1,8 @@ - tab_name = local_assigns.fetch(:name, nil) - tab_class = local_assigns.fetch(:class, nil) -- qa_selector = local_assigns.fetch(:qa_selector, nil) +- testid = local_assigns.fetch(:testid, nil) - id = local_assigns.fetch(:id, nil) -- attrs = { class: [tab_class, ("active" if params[:tab] == tab_name)], data: { qa_selector: qa_selector } } +- attrs = { class: [tab_class, ("active" if params[:tab] == tab_name)], data: { testid: testid } } - attrs[:id] = id if id.present? %li{ attrs } diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index a592062a17d..abf2949938c 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -15,7 +15,7 @@ - @gfm_form = true .js-markdown-editor{ data: { render_markdown_path: preview_markdown_path(@project), markdown_docs_path: help_page_path('user/markdown'), - qa_selector: 'milestone_description_field', + testid: 'milestone-description-field', form_field_placeholder: _('Write milestone description...'), supports_quick_actions: 'false', enable_autocomplete: 'true', diff --git a/app/views/projects/mirrors/_authentication_method.html.haml b/app/views/projects/mirrors/_authentication_method.html.haml index 54e1f1a8b20..c4cf128a62a 100644 --- a/app/views/projects/mirrors/_authentication_method.html.haml +++ b/app/views/projects/mirrors/_authentication_method.html.haml @@ -1,14 +1,17 @@ - mirror = f.object -- auth_options = [[_('Password'), 'password'], [_('SSH public key'), 'ssh_public_key']] +- auth_options = [[_('Username and Password'), 'password'], [_('SSH public key'), 'ssh_public_key']] .form-group = f.label :auth_method, _('Authentication method'), class: 'label-bold' = f.select :auth_method, options_for_select(auth_options, mirror.auth_method), - {}, { class: "custom-select gl-form-select js-mirror-auth-type", data: { qa_selector: 'authentication_method_field' } } + {}, { class: "custom-select gl-form-select js-mirror-auth-type gl-max-w-34 gl-display-block", data: { qa_selector: 'authentication_method_field' } } = f.hidden_field :auth_method, value: "password", class: "js-hidden-mirror-auth-type" .form-group - .well-password-auth.collapse.js-well-password-auth + = f.label :user, _('Username'), class: 'label-bold' + = f.text_field :user, class: 'form-control gl-form-input gl-form-input-xl', value: nil, autocomplete: 'off', required: false, autocorrect: 'off', autocapitalize: 'off', spellcheck: false, data: { testid: 'username-field' } +.well-password-auth.collapse.js-well-password-auth + .form-group = f.label :password, _("Password"), class: "label-bold" - = f.password_field :password, class: 'form-control gl-form-input js-mirror-password-field', autocomplete: 'off', data: { qa_selector: 'password_field' } + = f.password_field :password, class: 'form-control gl-form-input js-mirror-password-field gl-form-input-xl', autocomplete: 'off', data: { testid: 'password-field' } diff --git a/app/views/projects/mirrors/_instructions.html.haml b/app/views/projects/mirrors/_instructions.html.haml index 2bd2c7cac44..5a8710a64b0 100644 --- a/app/views/projects/mirrors/_instructions.html.haml +++ b/app/views/projects/mirrors/_instructions.html.haml @@ -4,7 +4,7 @@ = html_escape(_('The repository must be accessible over %{code_open}http://%{code_close}, %{code_open}https://%{code_close}, %{code_open}ssh://%{code_close} or %{code_open}git://%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - %li= html_escape(_('Include the username in the URL if required: %{code_open}https://username@gitlab.company.com/group/project.git%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } + %li= html_escape(_('Do not include the username in the URL, use the username field below if required: %{code_open}https://gitlab.company.com/group/project.git%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li - minutes = Gitlab.config.gitlab_shell.git_timeout / 60 = _("The update action will time out after %{number_of_minutes} minutes. For big repositories, use a clone/push combination.") % { number_of_minutes: minutes } diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index a1c89a9dd30..00837ce1c73 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -35,7 +35,7 @@ %div= form_errors(@project) .form-group.has-feedback = label_tag :url, _('Git repository URL'), class: 'label-light' - = text_field_tag :url, nil, class: 'form-control gl-form-input js-mirror-url js-repo-url', placeholder: _('Input the remote repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password', data: { qa_selector: 'mirror_repository_url_field' } + = text_field_tag :url, nil, class: 'form-control gl-form-input js-mirror-url js-repo-url gl-form-input-xl', placeholder: _('Input the remote repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password', data: { qa_selector: 'mirror_repository_url_field' } = render 'projects/mirrors/instructions' diff --git a/app/views/projects/mirrors/_mirror_repos_form.html.haml b/app/views/projects/mirrors/_mirror_repos_form.html.haml index 1322e677d5a..8378a74311f 100644 --- a/app/views/projects/mirrors/_mirror_repos_form.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_form.html.haml @@ -1,7 +1,7 @@ .form-group = label_tag :mirror_direction, _('Mirror direction'), class: 'label-light' .select-wrapper - = select_tag :mirror_direction, options_for_select([[_('Push'), 'push']]), class: 'form-control gl-form-select select-control js-mirror-direction', disabled: true, data: { qa_selector: 'mirror_direction_field' } + = select_tag :mirror_direction, options_for_select([[_('Push'), 'push']]), class: 'form-control gl-form-select select-control js-mirror-direction gl-max-w-34 gl-display-block', disabled: true, data: { qa_selector: 'mirror_direction_field' } = sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200") = render partial: "projects/mirrors/mirror_repos_push", locals: { f: f } diff --git a/app/views/projects/mirrors/_mirror_repos_list.html.haml b/app/views/projects/mirrors/_mirror_repos_list.html.haml index 0debd13709d..59611db941f 100644 --- a/app/views/projects/mirrors/_mirror_repos_list.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_list.html.haml @@ -34,7 +34,7 @@ - if mirror_settings_enabled .btn-group.mirror-actions-group{ role: 'group' } - if mirror.ssh_key_auth? - = clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default btn-icon', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button') + = clipboard_button(text: mirror.ssh_public_key, variant: :default, category: :primary, size: :medium, title: _('Copy SSH public key'), testid: 'copy_public_key_button') = render 'shared/remote_mirror_update_button', remote_mirror: mirror = render Pajamas::ButtonComponent.new(variant: :danger, icon: 'remove', diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 59a21cecd39..bf288d3601b 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -29,9 +29,8 @@ = render Pajamas::CardComponent.new(card_options: { class: 'gl-my-5' }) do |c| - c.with_body do %div - - contributing_templates_url = 'https://gitlab.com/gitlab-org/project-templates/contributing' - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contributing_templates_url } - = _('Learn how to %{link_start}contribute to the built-in templates%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', 'https://gitlab.com/gitlab-org/project-templates/contributing', target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('Learn how to %{link_start}contribute to the built-in templates%{link_end}'), tag_pair(link, :link_start, :link_end)) = gitlab_ui_form_for @project, html: { class: 'new_project' } do |f| .project-template .form-group diff --git a/app/views/projects/notes/_more_actions_dropdown.html.haml b/app/views/projects/notes/_more_actions_dropdown.html.haml index e3cc9199352..54d1bf012f3 100644 --- a/app/views/projects/notes/_more_actions_dropdown.html.haml +++ b/app/views/projects/notes/_more_actions_dropdown.html.haml @@ -5,7 +5,7 @@ = render Pajamas::ButtonComponent.new(icon: 'ellipsis_v', category: :tertiary, button_options: { class: 'note-action-button more-actions-toggle has-tooltip', data: { title: 'More actions', toggle: 'dropdown', container: 'body', qa_selector: 'more_actions_dropdown' }}) %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left %li - = clipboard_button(text: noteable_note_url(note), title: _('Copy reference'), button_text: _('Copy link'), class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true) + = deprecated_clipboard_button(text: noteable_note_url(note), title: _('Copy reference'), button_text: _('Copy link'), class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true) - unless is_current_user .gl-ml-n2 .js-report-abuse-dropdown-item{ data: { report_abuse_path: add_category_abuse_reports_path, reported_user_id: note.author.id, reported_from_url: noteable_note_url(note) } } diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml index b1ec7a362b7..1aa8148dfed 100644 --- a/app/views/projects/pages/_pages_settings.html.haml +++ b/app/views/projects/pages/_pages_settings.html.haml @@ -1,11 +1,7 @@ -- can_edit_max_page_size = can?(current_user, :update_max_pages_size) -- can_enforce_https_only = Gitlab.config.pages.external_http || Gitlab.config.pages.external_https - = gitlab_ui_form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f| - - if can_edit_max_page_size - = render_if_exists 'shared/pages/max_pages_size_input', form: f + = render_if_exists 'shared/pages/max_pages_size_input', form: f - - if can_enforce_https_only + - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https .form-group = f.gitlab_ui_checkbox_component :pages_https_only, s_('GitLabPages|Force HTTPS (requires valid certificates)'), @@ -24,5 +20,14 @@ %p.gl-pl-6 = s_("GitLabPages|When enabled, a unique domain is generated to access pages.").html_safe + - if can?(current_user, :pages_multiple_versions, @project) + .form-group + = f.fields_for :project_setting do |settings| + = settings.gitlab_ui_checkbox_component :pages_multiple_versions_enabled, + s_('GitLabPages|Use multiple versions'), + label_options: { class: 'label-bold' } + %p.gl-pl-6 + = s_("GitLabPages|When enabled, you can create multiple versions of your pages site.").html_safe + .gl-mt-3 = f.submit s_('GitLabPages|Save changes'), pajamas_button: true diff --git a/app/views/projects/pages_domains/_dns.html.haml b/app/views/projects/pages_domains/_dns.html.haml index 0edce28bb9d..9ca9360199d 100644 --- a/app/views/projects/pages_domains/_dns.html.haml +++ b/app/views/projects/pages_domains/_dns.html.haml @@ -9,7 +9,7 @@ .input-group = text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true .input-group-append - = clipboard_button(target: '#domain_dns', class: 'btn-default input-group-text d-none d-sm-block') + = deprecated_clipboard_button(target: '#domain_dns', class: 'btn-default input-group-text d-none d-sm-block') %p.form-text.text-muted = _("To access this domain create a new DNS record") - if verification_enabled @@ -25,7 +25,7 @@ .input-group = text_field_tag :domain_verification, domain_presenter.verification_record, class: "monospace js-select-on-focus form-control", readonly: true .input-group-append - = clipboard_button(target: '#domain_verification', class: 'btn-default d-none d-sm-block') + = deprecated_clipboard_button(target: '#domain_verification', class: 'btn-default d-none d-sm-block') %p.form-text.text-muted - link_to_help = link_to(_('verify ownership'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index.md', anchor: '4-verify-the-domains-ownership')) = _("To %{link_to_help} of your domain, add the above key to a TXT record within your DNS configuration within seven days.").html_safe % { link_to_help: link_to_help } diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml deleted file mode 100644 index df85963218d..00000000000 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ /dev/null @@ -1,43 +0,0 @@ -= gitlab_ui_form_for [@project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f| - = form_errors(@schedule) - .form-group.row - .col-md-9 - = f.label :description, _('Description'), class: 'label-bold' - = f.text_field :description, class: 'form-control gl-form-input', required: true, autofocus: true, placeholder: s_('PipelineSchedules|Provide a short description for this pipeline') - .form-group.row - .col-md-9 - = f.label :cron, _('Interval Pattern'), class: 'label-bold' - #interval-pattern-input{ data: { initial_interval: @schedule.cron, daily_limit: @schedule.daily_limit } } - .form-group.row - .col-md-9{ data: { testid: 'schedule-timezone' } } - = f.label :cron_timezone, _("Cron Timezone") - .js-timezone-dropdown{ data: { timezone_data: timezone_data.to_json, initial_value: @schedule.cron_timezone, name: 'schedule[cron_timezone]' } } - - .form-group.row - .col-md-9 - = f.label :ref, _('Target branch or tag'), class: 'label-bold' - %div{ data: { testid: 'schedule-target-ref' } } - .js-target-ref-dropdown{ data: { project_id: @project.id, default_branch: @project.default_branch } } - = f.text_field :ref, value: @schedule.ref, id: 'schedule_ref', class: 'hidden', name: 'schedule[ref]', required: true - .form-group.row.js-ci-variable-list-section - .col-md-9 - %label.label-bold - #{ s_('PipelineSchedules|Variables') } - %ul.ci-variable-list - - @schedule.variables.each do |variable| - = render 'ci/variables/variable_row', form_field: 'schedule', variable: variable - = render 'ci/variables/variable_row', form_field: 'schedule' - - if @schedule.variables.size > 0 - = render Pajamas::ButtonComponent.new(category: :secondary, variant: :confirm, button_options: { class: 'gl-mt-3 js-secret-value-reveal-button', data: { secret_reveal_status: "#{@schedule.variables.size == 0}" }}) do - - if @schedule.variables.size == 0 - = n_('Hide value', 'Hide values', @schedule.variables.size) - - else - = n_('Reveal value', 'Reveal values', @schedule.variables.size) - .form-group.row - .col-md-9 - = f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold' - %div - = f.gitlab_ui_checkbox_component :active, _('Active'), checkbox_options: { value: @schedule.active, required: false } - .footer-block - = f.submit _('Save pipeline schedule'), pajamas_button: true - = link_button_to _('Cancel'), pipeline_schedules_path(@project) diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml deleted file mode 100644 index a050808f13c..00000000000 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ /dev/null @@ -1,45 +0,0 @@ -- if pipeline_schedule - %tr.pipeline-schedule-table-row - %td{ role: 'cell', data: { label: _('Description') } } - %div - = pipeline_schedule.description - %td.branch-name-cell.gl-text-truncate{ role: 'cell', data: { label: s_("PipelineSchedules|Target") } } - %div - - if pipeline_schedule.for_tag? - = sprite_icon('tag', size: 12, css_class: 'gl-vertical-align-middle!') - - else - = sprite_icon('fork', size: 12, css_class: 'gl-vertical-align-middle!') - - if pipeline_schedule.ref.present? - = link_to pipeline_schedule.ref_for_display, project_ref_path(@project, pipeline_schedule.ref_for_display), class: "ref-name" - %td{ role: 'cell', data: { label: _("Last Pipeline") } } - %div - - if pipeline_schedule.last_pipeline - .status-icon-container{ class: "ci-status-icon-#{pipeline_schedule.last_pipeline.status}" } - = link_to project_pipeline_path(@project, pipeline_schedule.last_pipeline.id) do - = ci_icon_for_status(pipeline_schedule.last_pipeline.status) - %span.gl-text-blue-500! ##{pipeline_schedule.last_pipeline.id} - - else - = s_("PipelineSchedules|None") - %td.gl-text-gray-500{ role: 'cell', data: { label: s_("PipelineSchedules|Next Run") }, 'data-testid': 'next-run-cell' } - %div - - if pipeline_schedule.active? && pipeline_schedule.next_run_at - = time_ago_with_tooltip(pipeline_schedule.real_next_run) - - else - = s_("PipelineSchedules|Inactive") - %td{ role: 'cell', data: { label: _("Owner") } } - %div - - if pipeline_schedule.owner - = render Pajamas::AvatarComponent.new(pipeline_schedule.owner, size: 24, class: "gl-mr-2") - = link_to user_path(pipeline_schedule.owner) do - = pipeline_schedule.owner&.name - %td{ role: 'cell', data: { label: _('Actions') } } - .float-right.btn-group - - if can?(current_user, :play_pipeline_schedule, pipeline_schedule) - = link_button_to nil, play_pipeline_schedule_path(pipeline_schedule), method: :post, title: _('Play'), icon: 'play' - - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) && pipeline_schedule.owner != current_user - = render Pajamas::ButtonComponent.new(button_options: { class: 'js-take-ownership-button has-tooltip', title: s_('PipelineSchedule|Take ownership to edit'), data: { url: take_ownership_pipeline_schedule_path(pipeline_schedule) } }) do - = s_('PipelineSchedules|Take ownership') - - if can?(current_user, :update_pipeline_schedule, pipeline_schedule) - = link_button_to nil, edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), icon: 'pencil' - - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) - = link_button_to nil, pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, aria: { label: _('Delete pipeline schedule') }, data: { confirm: _("Are you sure you want to delete this pipeline schedule?"), confirm_btn_variant: 'danger' }, variant: :danger, icon: 'remove' diff --git a/app/views/projects/pipeline_schedules/_table.html.haml b/app/views/projects/pipeline_schedules/_table.html.haml deleted file mode 100644 index 2f96ac6a534..00000000000 --- a/app/views/projects/pipeline_schedules/_table.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.table-holder - %table.table.ci-table.responsive-table.b-table.gl-table.b-table-stacked-md{ role: 'table' } - %thead{ role: 'rowgroup' } - %tr{ role: 'row' } - %th.table-th-transparent.border-bottom{ role: 'cell', style: 'width: 34%' }= _("Description") - %th.table-th-transparent.border-bottom{ role: 'cell' }= s_("PipelineSchedules|Target") - %th.table-th-transparent.border-bottom{ role: 'cell' }= _("Last Pipeline") - %th.table-th-transparent.border-bottom{ role: 'cell' }= s_("PipelineSchedules|Next Run") - %th.table-th-transparent.border-bottom{ role: 'cell' }= _("Owner") - %th.table-th-transparent.border-bottom{ role: 'cell' } - %tbody{ role: 'rowgroup' } - = render partial: "pipeline_schedule", collection: @schedules diff --git a/app/views/projects/pipeline_schedules/_tabs.html.haml b/app/views/projects/pipeline_schedules/_tabs.html.haml deleted file mode 100644 index f825ef35902..00000000000 --- a/app/views/projects/pipeline_schedules/_tabs.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -= gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-0' }) do - = gl_tab_link_to schedule_path_proc.call(nil), { item_active: active_when(scope.nil?) } do - = s_("PipelineSchedules|All") - = gl_tab_counter_badge(number_with_delimiter(all_schedules.count(:id)), { class: 'js-totalbuilds-count' }) - - = gl_tab_link_to schedule_path_proc.call('active'), { item_active: active_when(scope == 'active') } do - = s_("PipelineSchedules|Active") - = gl_tab_counter_badge(number_with_delimiter(all_schedules.active.count(:id))) - - = gl_tab_link_to schedule_path_proc.call('inactive'), { item_active: active_when(scope == 'inactive') } do - = s_("PipelineSchedules|Inactive") - = gl_tab_counter_badge(number_with_delimiter(all_schedules.inactive.count(:id))) diff --git a/app/views/projects/pipeline_schedules/edit.html.haml b/app/views/projects/pipeline_schedules/edit.html.haml index 4e1ae53a101..647c0272852 100644 --- a/app/views/projects/pipeline_schedules/edit.html.haml +++ b/app/views/projects/pipeline_schedules/edit.html.haml @@ -1,12 +1,8 @@ - add_to_breadcrumbs _("Schedules"), pipeline_schedules_path(@project) - breadcrumb_title "##{@schedule.id}" - page_title _("Edit"), @schedule.description, _("Pipeline Schedule") -- add_page_specific_style 'page_bundles/pipeline_schedules' %h1.page-title.gl-font-size-h-display = _("Edit Pipeline Schedule") -- if Feature.enabled?(:pipeline_schedules_vue, @project) - #pipeline-schedules-form-edit{ data: js_pipeline_schedules_form_data(@project, @schedule) } -- else - = render "form" +#pipeline-schedules-form-edit{ data: js_pipeline_schedules_form_data(@project, @schedule) } diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 5051fc6a5f5..15a80b6c7b1 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -1,28 +1,4 @@ - breadcrumb_title _("Schedules") - page_title _("Pipeline Schedules") -- add_page_specific_style 'page_bundles/pipeline_schedules' -- add_page_specific_style 'page_bundles/ci_status' -- add_page_specific_style 'page_bundles/merge_request' -#pipeline-schedules-callout{ data: { docs_url: help_page_path('ci/pipelines/schedules'), illustration_url: image_path('illustrations/pipeline_schedule_callout.svg') } } - -- if Feature.enabled?(:pipeline_schedules_vue, @project) - #pipeline-schedules-app{ data: { full_path: @project.full_path, pipelines_path: project_pipelines_path(@project), new_schedule_path: new_project_pipeline_schedule_path(@project) } } -- else - .top-area - - schedule_path_proc = ->(scope) { pipeline_schedules_path(@project, scope: scope) } - = render "tabs", schedule_path_proc: schedule_path_proc, all_schedules: @all_schedules, scope: @scope - - - if can?(current_user, :create_pipeline_schedule, @project) - .nav-controls - = link_button_to new_project_pipeline_schedule_path(@project), variant: :confirm do - = _('New schedule') - - - if @schedules.present? - %ul.content-list - = render partial: "table" - - else - .nothing-here-block - = _("No schedules") - - #pipeline-take-ownership-modal +#pipeline-schedules-app{ data: { full_path: @project.full_path, pipelines_path: project_pipelines_path(@project), new_schedule_path: new_project_pipeline_schedule_path(@project) } } diff --git a/app/views/projects/pipeline_schedules/new.html.haml b/app/views/projects/pipeline_schedules/new.html.haml index ef99a79b06f..2cd65521ae9 100644 --- a/app/views/projects/pipeline_schedules/new.html.haml +++ b/app/views/projects/pipeline_schedules/new.html.haml @@ -1,14 +1,10 @@ - breadcrumb_title _('Schedules') - @breadcrumb_link = namespace_project_pipeline_schedules_path(@project.namespace, @project) - page_title _("New Pipeline Schedule") -- add_page_specific_style 'page_bundles/pipeline_schedules' - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) %h1.page-title.gl-font-size-h-display = _("Schedule a new pipeline") -- if Feature.enabled?(:pipeline_schedules_vue, @project) - #pipeline-schedules-form-new{ data: js_pipeline_schedules_form_data(@project, @schedule) } -- else - = render "form" +#pipeline-schedules-form-new{ data: js_pipeline_schedules_form_data(@project, @schedule) } diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 6b6aaaad802..3eb24873daf 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,8 +1,6 @@ - add_page_specific_style 'page_bundles/members' - page_title _("Members") -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - .row.gl-mt-3 .col-lg-12 .gl-display-flex.gl-flex-wrap @@ -26,7 +24,7 @@ - if can_admin_project_member?(@project) .js-invite-members-trigger{ data: { variant: 'confirm', classes: 'gl-md-w-auto gl-w-full gl-md-ml-3 gl-md-mt-0 gl-mt-3', - trigger_source: 'project-members-page', + trigger_source: 'project_members_page', display_text: _('Invite members') } } - else - if project_can_be_shared? diff --git a/app/views/projects/protected_tags/_create_protected_tag.html.haml b/app/views/projects/protected_tags/_create_protected_tag.html.haml index ef3974b04b5..1dc31503db9 100644 --- a/app/views/projects/protected_tags/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/_create_protected_tag.html.haml @@ -1,9 +1,5 @@ - content_for :create_access_levels do .create_access_levels-container - = dropdown_tag('Select', - options: { toggle_class: 'js-allowed-to-create js-multiselect wide', - dropdown_class: 'dropdown-menu-selectable capitalize-header', - dropdown_qa_selector: 'access_levels_content', dropdown_testid: 'allowed-to-create-dropdown', - data: { field_name: 'protected_tag[create_access_levels_attributes][0][access_level]', input_id: 'create_access_levels_attributes', qa_selector: 'access_levels_dropdown' }}) + .js-allowed-to-create = render 'projects/protected_tags/shared/create_protected_tag' diff --git a/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml b/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml index 30b9e3e9005..389a88293a5 100644 --- a/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml +++ b/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml @@ -1,8 +1,5 @@ - protected_tag = local_assigns.fetch(:protected_tag) - create_access_level = local_assigns.fetch(:create_access_level) -- dropdown_label = create_access_level.first&.humanize || 'Select' = hidden_field_tag "allowed_to_create_#{protected_tag.id}", create_access_level.first&.access_level -= dropdown_tag(dropdown_label, - options: { toggle_class: 'js-allowed-to-create js-multiselect', dropdown_class: 'dropdown-menu-selectable capitalize-header js-allowed-to-create-container', - data: { field_name: "allowed_to_create_#{protected_tag.id}", preselected_items: access_levels_data(create_access_level) }}) +.js-allowed-to-create{ data: { preselected_items: access_levels_data(create_access_level).to_json } } diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index b81c3bc9704..ea3ad370fb5 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -18,9 +18,8 @@ = _('Project access token creation is disabled in this group.') - root_group = @project.group.root_ancestor - if current_user.can?(:admin_group, root_group) - - group_settings_link = edit_group_path(root_group) - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_settings_link } - = _('You can enable project access token creation in %{link_start}group settings%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', edit_group_path(root_group), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('You can enable project access token creation in %{link_start}group settings%{link_end}.'), tag_pair(link, :link_start, :link_end)) = html_escape(_('You can still use and manage existing tokens. %{link_start}Learn more.%{link_end}')) % { link_start: help_link_start, link_end: '</a>'.html_safe } #js-new-access-token-app{ data: { access_token_type: type } } diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 6de39058455..17953e3bc14 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -25,9 +25,9 @@ %p.gl-text-secondary - auto_devops_url = help_page_path('topics/autodevops/index') - quickstart_url = help_page_path('topics/autodevops/cloud_deployments/auto_devops_with_gke') - - auto_devops_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: auto_devops_url } - - quickstart_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: quickstart_url } - = s_('AutoDevOps|%{auto_devops_start}Automate building, testing, and deploying%{auto_devops_end} your applications based on your continuous integration and delivery configuration. %{quickstart_start}How do I get started?%{quickstart_end}').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe, quickstart_start: quickstart_start, quickstart_end: '</a>'.html_safe } + - auto_devops_link = link_to('', auto_devops_url, target: '_blank', rel: 'noopener noreferrer') + - quickstart_link = link_to('', quickstart_url, target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('AutoDevOps|%{auto_devops_start}Automate building, testing, and deploying%{auto_devops_end} your applications based on your continuous integration and delivery configuration. %{quickstart_start}How do I get started?%{quickstart_end}'), tag_pair(auto_devops_link, :auto_devops_start, :auto_devops_end), tag_pair(quickstart_link, :quickstart_start, :quickstart_end)) .settings-content = render 'autodevops_form', auto_devops_enabled: @project.auto_devops_enabled? @@ -44,10 +44,7 @@ = _("Runners are processes that pick up and execute CI/CD jobs for GitLab.") = link_to s_('What is GitLab Runner?'), 'https://docs.gitlab.com/runner/', target: '_blank', rel: 'noopener noreferrer' .settings-content - - if Feature.enabled?(:project_runners_vue_ui, @project) - #js-project-runners{ data: { project_full_path: @project.full_path } } - - else - = render 'projects/runners/settings' + = render 'projects/runners/settings' - if Gitlab::CurrentSettings.current_application_settings.keep_latest_artifact? %section.settings.no-animate#js-artifacts-settings{ class: ('expanded' if expanded) } diff --git a/app/views/projects/settings/integrations/_form.html.haml b/app/views/projects/settings/integrations/_form.html.haml index 97c7729de44..d2df01c22bb 100644 --- a/app/views/projects/settings/integrations/_form.html.haml +++ b/app/views/projects/settings/integrations/_form.html.haml @@ -15,9 +15,12 @@ = render 'shared/integrations/slack_notifications_deprecation_alert' %h2.gl-mb-0.gl-display-flex.gl-align-items-center.gl-gap-3 + = render Pajamas::AvatarComponent.new(integration, size: 64, alt: '') = integration.title - if integration.operating? - = render Pajamas::BadgeComponent.new(s_('FeatureFlags|Active'), variant: 'success') + = render Pajamas::BadgeComponent.new(_('Active'), variant: 'success', icon: 'status-success') + - elsif integration.persisted? + = render Pajamas::BadgeComponent.new(_('Inactive'), variant: 'neutral', icon: 'status-paused') = render 'shared/integration_settings', integration: integration - if lookup_context.template_exists?('show', "shared/integrations/#{integration.to_param}", true) diff --git a/app/views/projects/settings/integrations/index.html.haml b/app/views/projects/settings/integrations/index.html.haml index 6c0c99543cc..dca028d6167 100644 --- a/app/views/projects/settings/integrations/index.html.haml +++ b/app/views/projects/settings/integrations/index.html.haml @@ -6,7 +6,7 @@ %section.js-search-settings-section %h3= _('Integrations') - - integrations_link_start = '<a href="%{url}">'.html_safe % { url: help_page_url('user/project/integrations/index') } - - webhooks_link_start = '<a href="%{url}">'.html_safe % { url: project_hooks_path(@project) } - %p.gl-text-secondary= _("%{integrations_link_start}Integrations%{link_end} enable you to make third-party applications part of your GitLab workflow. If the available integrations don't meet your needs, consider using a %{webhooks_link_start}webhook%{link_end}.").html_safe % { integrations_link_start: integrations_link_start, webhooks_link_start: webhooks_link_start, link_end: '</a>'.html_safe } + - integrations_link = link_to('', help_page_url('user/project/integrations/index')) + - webhooks_link = link_to('', project_hooks_path(@project)) + %p.gl-text-secondary= safe_format(_("%{integrations_link_start}Integrations%{link_end} enable you to make third-party applications part of your GitLab workflow. If the available integrations don't meet your needs, consider using a %{webhooks_link_start}webhook%{link_end}."), tag_pair(integrations_link, :integrations_link_start, :link_end), tag_pair(webhooks_link, :webhooks_link_start, :link_end)) = render 'shared/integrations/index', integrations: @integrations diff --git a/app/views/projects/settings/merge_requests/_merge_request_merge_checks_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_checks_settings.html.haml new file mode 100644 index 00000000000..fa9b39e0846 --- /dev/null +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_checks_settings.html.haml @@ -0,0 +1,8 @@ +- form = local_assigns.fetch(:form) + +.form-group + %b= s_('ProjectSettings|Merge checks') + %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged.') + = render 'projects/settings/merge_requests/merge_request_pipelines_and_threads_options', form: form, project: @project + = render_if_exists 'projects/settings/merge_requests/merge_request_merge_checks_status_checks', form: form, project: @project + = render_if_exists 'projects/settings/merge_requests/merge_request_merge_checks_jira_enforcement', form: form, project: @project diff --git a/app/views/projects/_merge_request_merge_commit_template.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_commit_template.html.haml index 502014b7279..da1965f549c 100644 --- a/app/views/projects/_merge_request_merge_commit_template.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_commit_template.html.haml @@ -9,6 +9,5 @@ %p.form-text.text-muted = s_('ProjectSettings|Leave empty to use default template.') = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_COMMIT_TEMPLATE_LENGTH }) - - configure_the_merge_commit_message_help_link_url = help_page_path('user/project/merge_requests/commit_templates.md') - - configure_the_merge_commit_message_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_merge_commit_message_help_link_url } - = s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}').html_safe % { link_start: configure_the_merge_commit_message_help_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/merge_requests/commit_templates.md'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}'), tag_pair(link, :link_start, :link_end)) diff --git a/app/views/projects/_merge_request_merge_method_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_method_settings.html.haml index dd32d3f9d92..dd32d3f9d92 100644 --- a/app/views/projects/_merge_request_merge_method_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_method_settings.html.haml diff --git a/app/views/projects/_merge_request_merge_options_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_options_settings.html.haml index e91c001ea3d..db7e59d6e2a 100644 --- a/app/views/projects/_merge_request_merge_options_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_options_settings.html.haml @@ -3,8 +3,8 @@ .form-group#project-merge-options{ data: { project_full_path: @project.full_path } } %b= s_('ProjectSettings|Merge options') %p.text-secondary= s_('ProjectSettings|Additional settings that influence how and when merges are done.') - = render_if_exists 'projects/merge_pipelines_settings', form: form - = render_if_exists 'projects/merge_trains_settings', form: form + = render_if_exists 'projects/settings/merge_requests/merge_pipelines_settings', form: form + = render_if_exists 'projects/settings/merge_requests/merge_trains_settings', form: form = form.gitlab_ui_checkbox_component :resolve_outdated_diff_discussions, s_('ProjectSettings|Automatically resolve merge request diff threads when they become outdated') = form.gitlab_ui_checkbox_component :printing_merge_request_link_enabled, diff --git a/app/views/projects/settings/merge_requests/_merge_request_merge_suggestions_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_merge_suggestions_settings.html.haml new file mode 100644 index 00000000000..501288f727b --- /dev/null +++ b/app/views/projects/settings/merge_requests/_merge_request_merge_suggestions_settings.html.haml @@ -0,0 +1,13 @@ +- form = local_assigns.fetch(:form) + +.form-group + %b= s_('ProjectSettings|Merge suggestions') + %p.text-secondary + = s_('ProjectSettings|The commit message used when applying merge request suggestions.') + .mb-2 + = form.text_field :suggestion_commit_message, class: 'form-control mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE + %p.form-text.text-muted + = s_('ProjectSettings|Leave empty to use default template.') + = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_SUGGESTIONS_TEMPLATE_LENGTH }) + - link = link_to('', help_page_path('user/project/merge_requests/reviews/suggestions.md', anchor: 'configure-the-commit-message-for-applied-suggestions'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}'), tag_pair(link, :link_start, :link_end)) diff --git a/app/views/projects/_merge_request_pipelines_and_threads_options.html.haml b/app/views/projects/settings/merge_requests/_merge_request_pipelines_and_threads_options.html.haml index a9609434f15..a9609434f15 100644 --- a/app/views/projects/_merge_request_pipelines_and_threads_options.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_pipelines_and_threads_options.html.haml diff --git a/app/views/projects/settings/merge_requests/_merge_request_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_settings.html.haml new file mode 100644 index 00000000000..9449fc7f4ae --- /dev/null +++ b/app/views/projects/settings/merge_requests/_merge_request_settings.html.haml @@ -0,0 +1,18 @@ +- form = local_assigns.fetch(:form) + += render 'projects/settings/merge_requests/merge_request_merge_method_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_merge_options_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_squash_options_settings', form: form + += render 'projects/settings/merge_requests/merge_request_merge_checks_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_merge_suggestions_settings', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_merge_commit_template', project: @project, form: form + += render 'projects/settings/merge_requests/merge_request_squash_commit_template', project: @project, form: form + +- if @project.forked? + = render 'projects/settings/merge_requests/merge_request_target_project_settings', project: @project, form: form diff --git a/app/views/projects/_merge_request_settings_description_text.html.haml b/app/views/projects/settings/merge_requests/_merge_request_settings_description_text.html.haml index 123520acad8..123520acad8 100644 --- a/app/views/projects/_merge_request_settings_description_text.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_settings_description_text.html.haml diff --git a/app/views/projects/_merge_request_squash_commit_template.html.haml b/app/views/projects/settings/merge_requests/_merge_request_squash_commit_template.html.haml index 4d1b89bea83..bc6530b927c 100644 --- a/app/views/projects/_merge_request_squash_commit_template.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_squash_commit_template.html.haml @@ -9,6 +9,5 @@ %p.form-text.text-muted = s_('ProjectSettings|Leave empty to use default template.') = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Project::MAX_COMMIT_TEMPLATE_LENGTH }) - - configure_the_squash_commit_message_help_link_url = help_page_path('user/project/merge_requests/commit_templates.md') - - configure_the_squash_commit_message_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_squash_commit_message_help_link_url } - = s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}').html_safe % { link_start: configure_the_squash_commit_message_help_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/merge_requests/commit_templates.md'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('ProjectSettings|%{link_start}What variables can I use?%{link_end}'), tag_pair(link, :link_start, :link_end)) diff --git a/app/views/projects/_merge_request_squash_options_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml index 372c0723600..372c0723600 100644 --- a/app/views/projects/_merge_request_squash_options_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_squash_options_settings.html.haml diff --git a/app/views/projects/_merge_request_target_project_settings.html.haml b/app/views/projects/settings/merge_requests/_merge_request_target_project_settings.html.haml index 6f2917f24e0..6f2917f24e0 100644 --- a/app/views/projects/_merge_request_target_project_settings.html.haml +++ b/app/views/projects/settings/merge_requests/_merge_request_target_project_settings.html.haml diff --git a/app/views/projects/settings/merge_requests/show.html.haml b/app/views/projects/settings/merge_requests/show.html.haml index ef528d17fc9..01af028f30c 100644 --- a/app/views/projects/settings/merge_requests/show.html.haml +++ b/app/views/projects/settings/merge_requests/show.html.haml @@ -5,15 +5,16 @@ %section.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings.expanded{ class: [('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)], data: { qa_selector: 'merge_request_settings_content' } } .settings-header %h4= _('Merge requests') - = render_if_exists 'projects/merge_request_settings_description_text' + = render_if_exists 'projects/settings/merge_requests/merge_request_settings_description_text' .settings-content = render_if_exists 'shared/promotions/promote_mr_features' = gitlab_ui_form_for @project, url: project_settings_merge_requests_path(@project), 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 + = render 'projects/settings/merge_requests/merge_request_settings', form: f = f.submit _('Save changes'), class: "rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' }, pajamas_button: true = render_if_exists 'projects/settings/merge_requests/merge_request_approvals_settings', expanded: true = render_if_exists 'projects/settings/merge_requests/suggested_reviewers_settings', expanded: true += render_if_exists 'projects/settings/merge_requests/target_branch_rules_settings' diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml index 398c7758d66..c29cedd8250 100644 --- a/app/views/projects/settings/operations/_alert_management.html.haml +++ b/app/views/projects/settings/operations/_alert_management.html.haml @@ -3,7 +3,7 @@ - add_page_specific_style 'page_bundles/alert_management_settings' - add_page_specific_style 'page_bundles/incident_management_list' -%section.settings.no-animate#js-alert-management-settings{ class: ('expanded' if expanded), data: { qa_selector: 'alerts_settings_content' } } +%section.settings.no-animate#js-alert-management-settings{ class: ('expanded' if expanded), data: { testid: 'alerts-settings-content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Alerts') diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 8a35db357ee..c76fa5e2220 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -6,7 +6,6 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project = render_if_exists 'shared/promotions/promote_mobile_devops', project: @project = render partial: 'flash_messages', locals: { project: @project } diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 53c3d16ee64..281eac6c773 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -11,9 +11,8 @@ = s_('TagsPage|New Tag') %p.gl-text-secondary - - link_start = '<a href="%{url}">'.html_safe % { url: new_namespace_project_release_path } - - link_end = '</a>'.html_safe - = s_('TagsPage|Do you want to create a release with the new tag? You can do that in the %{link_start}New release page%{link_end}.').html_safe % { link_start: link_start, link_end: link_end } + - link = link_to('', new_namespace_project_release_path) + = safe_format(s_('TagsPage|Do you want to create a release with the new tag? You can do that in the %{link_start}New release page%{link_end}.'), tag_pair(link, :link_start, :link_end)) = form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "common-note-form tag-form js-quick-submit js-requires-input" do .form-group.row diff --git a/app/views/projects/tracing/index.html.haml b/app/views/projects/tracing/index.html.haml deleted file mode 100644 index ae6608cf343..00000000000 --- a/app/views/projects/tracing/index.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- page_title _('Tracing') - -#js-tracing{ data: { view_model: observability_tracing_view_model(@project) } } - diff --git a/app/views/projects/tracing/show.html.haml b/app/views/projects/tracing/show.html.haml deleted file mode 100644 index 4ba316a0b5c..00000000000 --- a/app/views/projects/tracing/show.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- page_title _('Trace Details') -- add_to_breadcrumbs _('Tracing'), project_tracing_index_path(@project) - -#js-tracing-details{ data: { view_model: observability_tracing_details_model(@project, @trace_id) } } - diff --git a/app/views/projects/usage_quotas/index.html.haml b/app/views/projects/usage_quotas/index.html.haml index 616af3f3338..6f2a2aacf66 100644 --- a/app/views/projects/usage_quotas/index.html.haml +++ b/app/views/projects/usage_quotas/index.html.haml @@ -1,9 +1,6 @@ - page_title s_("UsageQuota|Usage") -- add_page_specific_style 'page_bundles/projects_usage_quotas' - @force_desktop_expanded_sidebar = true -= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project - = render Pajamas::AlertComponent.new(title: _('Repository usage recalculation started'), variant: :info, alert_options: { class: 'js-recalculation-started-alert gl-mt-4 gl-mb-5 gl-display-none' }) do |c| diff --git a/app/views/protected_branches/_create_protected_branch.html.haml b/app/views/protected_branches/_create_protected_branch.html.haml index 799f6aa6031..bc5da1653bf 100644 --- a/app/views/protected_branches/_create_protected_branch.html.haml +++ b/app/views/protected_branches/_create_protected_branch.html.haml @@ -1,14 +1,9 @@ - content_for :merge_access_levels do .merge_access_levels-container - = dropdown_tag(_('Select'), - options: { toggle_class: 'js-allowed-to-merge wide', - dropdown_class: 'dropdown-menu-selectable capitalize-header', dropdown_qa_selector: 'allowed_to_merge_dropdown_content', dropdown_testid: 'allowed-to-merge-dropdown', - data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes', qa_selector: 'select_allowed_to_merge_dropdown' }}) + .js-allowed-to-merge + - content_for :push_access_levels do .push_access_levels-container - = dropdown_tag(_('Select'), - options: { toggle_class: "js-allowed-to-push js-multiselect wide", - dropdown_class: 'dropdown-menu-selectable capitalize-header', dropdown_qa_selector: 'allowed_to_push_dropdown_content' , dropdown_testid: 'allowed-to-push-dropdown', - data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes', qa_selector: 'select_allowed_to_push_dropdown' }}) + .js-allowed-to-push = render 'protected_branches/shared/create_protected_branch', protected_branch_entity: protected_branch_entity diff --git a/app/views/protected_branches/shared/_index.html.haml b/app/views/protected_branches/shared/_index.html.haml index dccfefc1cb8..8e72563182c 100644 --- a/app/views/protected_branches/shared/_index.html.haml +++ b/app/views/protected_branches/shared/_index.html.haml @@ -13,6 +13,13 @@ .settings-content .js-alert-protected-branch-created-container.gl-mt-5 + = render Pajamas::AlertComponent.new(variant: :warning, + alert_options: { class: 'gl-mb-5' }, + dismissible: false) do |c| + - c.with_body do + = s_("ProtectedBranch|Giving merge rights to a protected branch also gives elevated permissions for certain CI/CD features.") + = link_to s_("ProtectedBranch|What are the security implications?"), help_page_path('ci/pipelines/index', anchor: 'pipeline-security-on-protected-branches'), target: '_blank', rel: 'noopener noreferrer' + = render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card js-toggle-container' }, header_options: { class: 'gl-new-card-header gl-flex-direction-column' }, body_options: { class: 'gl-new-card-body gl-px-0' }) do |c| - c.with_header do .gl-new-card-title-wrapper.gl-justify-content-space-between diff --git a/app/views/protected_branches/shared/_update_protected_branch.html.haml b/app/views/protected_branches/shared/_update_protected_branch.html.haml index ad61f557bb8..e4c8b779447 100644 --- a/app/views/protected_branches/shared/_update_protected_branch.html.haml +++ b/app/views/protected_branches/shared/_update_protected_branch.html.haml @@ -3,17 +3,13 @@ %td.merge_access_levels-container = hidden_field_tag "allowed_to_merge_#{protected_branch.id}", merge_access_levels.first&.access_level - = dropdown_tag((merge_access_levels.first&.humanize || 'Select') , - options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header', - data: { field_name: "allowed_to_merge_#{protected_branch.id}", preselected_items: access_levels_data(merge_access_levels) }}) + .js-allowed-to-merge{ data: { preselected_items: access_levels_data(merge_access_levels).to_json } } = render_if_exists 'protected_branches/shared/user_merge_access_levels', protected_branch: protected_branch = render_if_exists 'protected_branches/shared/group_merge_access_levels', protected_branch: protected_branch %td.push_access_levels-container = hidden_field_tag "allowed_to_push_#{protected_branch.id}", push_access_levels.first&.access_level - = dropdown_tag((push_access_levels.first&.humanize || 'Select') , - options: { toggle_class: "js-allowed-to-push js-multiselect", dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header', - data: { field_name: "allowed_to_push_#{protected_branch.id}", preselected_items: access_levels_data(push_access_levels) }}) + .js-allowed-to-push{ data: { preselected_items: access_levels_data(push_access_levels).to_json } } = render_if_exists 'protected_branches/shared/user_push_access_levels', protected_branch: protected_branch = render_if_exists 'protected_branches/shared/group_push_access_levels', protected_branch: protected_branch diff --git a/app/views/registrations/welcome/show.html.haml b/app/views/registrations/welcome/show.html.haml index caaa209a702..0f161855cdb 100644 --- a/app/views/registrations/welcome/show.html.haml +++ b/app/views/registrations/welcome/show.html.haml @@ -33,7 +33,7 @@ = render_if_exists "registrations/welcome/jobs_to_be_done", f: f = render_if_exists "registrations/welcome/setup_for_company", f: f = render_if_exists "registrations/welcome/joining_project" - = render 'devise/shared/email_opted_in', f: f + = render_if_exists "registrations/welcome/opt_in_to_email" .row .form-group.col-sm-12.gl-mb-0 - if partial_exists? "registrations/welcome/button" diff --git a/app/views/repository_check_mailer/notify.html.haml b/app/views/repository_check_mailer/notify.html.haml index dfcd1c6b19f..d6c57b98ea9 100644 --- a/app/views/repository_check_mailer/notify.html.haml +++ b/app/views/repository_check_mailer/notify.html.haml @@ -7,4 +7,4 @@ %p = _("You are receiving this message because you are a GitLab administrator for %{url}.") % { url: Gitlab.config.gitlab.url } -= render_if_exists 'repository_check_mailer/email_additional_text' += render_if_exists 'shared/additional_email_text' diff --git a/app/views/repository_check_mailer/notify.text.haml b/app/views/repository_check_mailer/notify.text.haml index a2e04fa710f..dc316d3e2be 100644 --- a/app/views/repository_check_mailer/notify.text.haml +++ b/app/views/repository_check_mailer/notify.text.haml @@ -4,4 +4,4 @@ = _("You are receiving this message because you are a GitLab administrator for %{url}.") % { url: Gitlab.config.gitlab.url } -= render_if_exists 'repository_check_mailer/email_additional_text' += render_if_exists 'shared/additional_email_text' diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml index 7399f51d7f8..a1839b3dd39 100644 --- a/app/views/search/_results.html.haml +++ b/app/views/search/_results.html.haml @@ -1,3 +1,3 @@ .gl-w-full.gl-flex-grow-1.gl-overflow-x-hidden - = render partial: 'search/results_status' unless @search_objects.to_a.empty? + = render partial: 'search/results_status' = render partial: 'search/results_list' diff --git a/app/views/search/_results_list.html.haml b/app/views/search/_results_list.html.haml index ff79f003e7d..fb96672cf99 100644 --- a/app/views/search/_results_list.html.haml +++ b/app/views/search/_results_list.html.haml @@ -8,7 +8,7 @@ - elsif @search_objects.blank? = render partial: "search/results/empty" - else - - statusBarClass = !show_super_sidebar? ? 'gl-md-pl-5' : '' + - statusBarClass = !show_super_sidebar? ? 'gl-lg-pl-5' : '' .section{ class: statusBarClass } - if @scope == 'commits' diff --git a/app/views/search/_results_status.html.haml b/app/views/search/_results_status.html.haml index 6fc07d35296..8417b66eb34 100644 --- a/app/views/search/_results_status.html.haml +++ b/app/views/search/_results_status.html.haml @@ -1,28 +1,33 @@ -- return unless @search_service_presenter.show_results_status? -- statusBarClass = !show_super_sidebar? ? 'gl-md-pl-5' : '' +- statusBarClass = !show_super_sidebar? ? 'gl-lg-pl-5' : '' +- statusBarClass = statusBarClass + ' gl-lg-display-none' if @search_objects.to_a.empty? .section{ class: statusBarClass } .search-results-status .gl-display-flex.gl-flex-direction-column - .gl-p-5.gl-display-flex - .gl-md-display-flex.gl-text-left.gl-align-items-center.gl-flex-grow-1.gl-white-space-nowrap.gl-max-w-full - - unless @search_service_presenter.without_count? - .gl-text-truncate - = search_entries_info(@search_objects, @scope, @search_term) - - unless @search_service_presenter.show_snippets? - - if @project - - link_to_project = link_to(@project.full_name, @project, class: 'ml-md-1 gl-text-truncate search-wrap-f-md-down') - - if @scope == 'blobs' - = _("in") - .mx-md-1 - #js-blob-ref-switcher{ data: { "project-id" => @project.id, "ref" => repository_ref(@project), "field-name": "repository_ref" } } - = s_('SearchCodeResults|of %{link_to_project}').html_safe % { link_to_project: link_to_project } - - else - = _("in project %{link_to_project}").html_safe % { link_to_project: link_to_project } - - elsif @group - - link_to_group = link_to(@group.name, @group, class: 'ml-md-1') - = _("in group %{link_to_group}").html_safe % { link_to_group: link_to_group } - - if @search_service_presenter.show_sort_dropdown? - .gl-md-display-flex.gl-flex-direction-column - #js-search-sort{ data: { "search-sort-options" => search_sort_options.to_json } } - %hr.gl-mb-5.gl-mt-0.gl-border-gray-100.gl-w-full + .gl-p-5.gl-display-flex.gl-flex-wrap + - unless @search_objects.to_a.empty? + .gl-display-flex.gl-text-left.gl-flex-grow-1.gl-flex-shrink-1.gl-white-space-nowrap.gl-flex-wrap.gl-sm-w-half + %p.gl-text-truncate.gl-my-auto + - unless @search_service_presenter.without_count? + = search_entries_info(@search_objects, @scope, @search_term) + - unless @search_service_presenter.show_snippets? + - if @project + - link_to_project = link_to(@project.full_name, @project, class: 'search-wrap-f-md-down') + - if @scope == 'blobs' + = _("in") + .mx-md-1.gl-my-auto + #js-blob-ref-switcher{ data: { "project-id" => @project.id, "ref" => repository_ref(@project), "field-name": "repository_ref" } } + %p.gl-text-truncate.gl-my-auto + = s_('SearchCodeResults|of %{link_to_project}').html_safe % { link_to_project: link_to_project } + - else + = _("in project %{link_to_project}").html_safe % { link_to_project: link_to_project } + - elsif @group + - link_to_group = link_to(@group.name, @group, class: 'ml-md-1') + = _("in group %{link_to_group}").html_safe % { link_to_group: link_to_group } + .gl-display-flex.gl-my-3.gl-flex-grow-1.gl-flex-shrink-1.gl-justify-content-end + = render Pajamas::ButtonComponent.new(category: 'primary', icon: 'filter', button_options: {id: 'js-open-mobile-filters', class: 'gl-lg-display-none'}) do + = s_('GlobalSearch|Filters') + - if @search_service_presenter.show_sort_dropdown? && !@search_objects.to_a.empty? + .gl-ml-3 + #js-search-sort{ data: { "search-sort-options" => search_sort_options.to_json } } + %hr.gl-mb-5.gl-mt-0.gl-border-gray-100.gl-w-full diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index 16ca829a6d4..2fd6e4a5ca5 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -22,7 +22,7 @@ = render_if_exists 'search/form_elasticsearch', attrs: { class: 'mb-2 mb-sm-0 align-self-center' } #js-search-topbar{ data: { "group-initial-json": group_attributes.to_json, "project-initial-json": project_attributes.to_json, "elasticsearch-enabled": @search_service_presenter.advanced_search_enabled?.to_s, "default-branch-name": @project&.default_branch } } -.results.gl-md-display-flex.gl-mt-0 - #js-search-sidebar{ class: search_bar_classes, data: { navigation_json: search_navigation_json } } +.results.gl-lg-display-flex.gl-mt-0 + #js-search-sidebar{ class: search_bar_classes, data: { navigation_json: search_navigation_json, search_type: search_service.search_type } } - if @search_term = render 'search/results' diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml index 48ae1f7eb1d..dde4ec3cf52 100644 --- a/app/views/shared/_clone_panel.html.haml +++ b/app/views/shared/_clone_panel.html.haml @@ -18,5 +18,5 @@ = text_field_tag :clone_url, default_url_to_repo(container), class: "js-select-on-focus btn gl-button", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'clone_url_content' } .input-group-append - = clipboard_button(target: '#clone_url', title: _("Copy URL"), class: "input-group-text gl-button btn-default btn-clipboard") + = clipboard_button(target: '#clone_url', title: _("Copy URL"), variant: :default, category: :primary, size: :medium) diff --git a/app/views/shared/_label_row.html.haml b/app/views/shared/_label_row.html.haml index 5058455dcd7..05b376003bc 100644 --- a/app/views/shared/_label_row.html.haml +++ b/app/views/shared/_label_row.html.haml @@ -15,6 +15,9 @@ .gl-my-1 = markdown_field(label, :description) %ul.label-links.gl-m-0.gl-p-0.gl-white-space-nowrap + - if label.lock_on_merge + %li.inline.gl-mr-3.gl-mt-1 + .label-badge.gl-bg-orange-50= _('Lock on merge') - if force_priority %li.js-priority-badge.inline.gl-mr-3.gl-mt-1 .label-badge.gl-bg-blue-50= _('Prioritized') diff --git a/app/views/shared/_logo.svg b/app/views/shared/_logo.svg index 83f6fe5c16c..dfc35856366 100644 --- a/app/views/shared/_logo.svg +++ b/app/views/shared/_logo.svg @@ -1,4 +1,4 @@ -<svg class="tanuki-logo" width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<svg role="img" class="tanuki-logo" width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path class="tanuki-shape tanuki" d="m24.507 9.5-.034-.09L21.082.562a.896.896 0 0 0-1.694.091l-2.29 7.01H7.825L5.535.653a.898.898 0 0 0-1.694-.09L.451 9.411.416 9.5a6.297 6.297 0 0 0 2.09 7.278l.012.01.03.022 5.16 3.867 2.56 1.935 1.554 1.176a1.051 1.051 0 0 0 1.268 0l1.555-1.176 2.56-1.935 5.197-3.89.014-.01A6.297 6.297 0 0 0 24.507 9.5Z" fill="#E24329"/> <path class="tanuki-shape right-cheek" d="m24.507 9.5-.034-.09a11.44 11.44 0 0 0-4.56 2.051l-7.447 5.632 4.742 3.584 5.197-3.89.014-.01A6.297 6.297 0 0 0 24.507 9.5Z" diff --git a/app/views/shared/_mobile_clone_panel.html.haml b/app/views/shared/_mobile_clone_panel.html.haml index aa3043b8fd6..c594cee326e 100644 --- a/app/views/shared/_mobile_clone_panel.html.haml +++ b/app/views/shared/_mobile_clone_panel.html.haml @@ -3,7 +3,7 @@ - http_copy_label = _('Copy %{http_label} clone URL') % { http_label: gitlab_config.protocol.upcase } .btn-group.mobile-git-clone.js-mobile-git-clone.btn-block - = clipboard_button(button_text: default_clone_label, text: default_url_to_repo(project), hide_button_icon: true, class: "gl-button btn-confirm flex-fill bold justify-content-center input-group-text clone-dropdown-btn js-clone-dropdown-label") + = clipboard_button(button_text: default_clone_label, size: :medium, category: :primary, variant: :confirm, text: default_url_to_repo(project), hide_button_icon: true, class: "clone-dropdown-btn js-clone-dropdown-label") %button.btn.gl-button.btn-confirm.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center.w-auto.ml-0{ type: "button", data: { toggle: "dropdown" } } = sprite_icon("chevron-down", css_class: "dropdown-btn-icon icon") %ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown{ data: { dropdown: true } } diff --git a/app/views/shared/_outdated_browser.html.haml b/app/views/shared/_outdated_browser.html.haml index 79d0231536b..e62e3bb4a6c 100644 --- a/app/views/shared/_outdated_browser.html.haml +++ b/app/views/shared/_outdated_browser.html.haml @@ -3,5 +3,5 @@ - c.with_body do = s_('OutdatedBrowser|GitLab may not work properly, because you are using an outdated web browser.') %br - - browser_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('install/requirements', anchor: 'supported-web-browsers') } - = s_('OutdatedBrowser|Please install a %{browser_link_start}supported web browser%{browser_link_end} for a better experience.').html_safe % { browser_link_start: browser_link_start, browser_link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('install/requirements', anchor: 'supported-web-browsers'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('OutdatedBrowser|Please install a %{browser_link_start}supported web browser%{browser_link_end} for a better experience.'), tag_pair(link, :browser_link_start, :browser_link_end)) diff --git a/app/views/shared/_silent_mode_banner.html.haml b/app/views/shared/_silent_mode_banner.html.haml new file mode 100644 index 00000000000..10e5d05fad2 --- /dev/null +++ b/app/views/shared/_silent_mode_banner.html.haml @@ -0,0 +1,9 @@ +- return unless ::Gitlab::SilentMode.enabled? + += content_for :page_level_alert do + %div{ class: [container_class, @content_class, 'gl-pt-5!'] } + = render Pajamas::AlertComponent.new(title: s_('SilentMode|Silent mode is enabled'), + dismissible: false, + variant: :warning) do |c| + - c.with_body do + = s_('SilentMode|All outbound communications are blocked. %{link_start}Learn more%{link_end}.').html_safe % { link_start: "<a href='#{help_page_path('administration/silent_mode/index')}' target='_blank' rel='noopener noreferrer'>".html_safe, link_end: '</a>'.html_safe } diff --git a/app/views/shared/_visibility_level.html.haml b/app/views/shared/_visibility_level.html.haml index 763ae5a498b..3cf13222f4e 100644 --- a/app/views/shared/_visibility_level.html.haml +++ b/app/views/shared/_visibility_level.html.haml @@ -5,9 +5,8 @@ = f.label :visibility_level, _('Visibility level'), class: 'label-bold gl-mb-0' %p = _('Who can see this group?') - - visibility_docs_path = help_page_path('user/public_access') - - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: visibility_docs_path } - = _('%{docs_link_start}Learn about visibility levels.%{docs_link_end}').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/public_access'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('%{docs_link_start}Learn about visibility levels.%{docs_link_end}'), tag_pair(link, :docs_link_start, :docs_link_end)) - if can_change_visibility_level = render('shared/visibility_radios', model_method: :visibility_level, form: f, selected_level: visibility_level, form_model: form_model) - else diff --git a/app/views/shared/builds/_build_output.html.haml b/app/views/shared/builds/_build_output.html.haml deleted file mode 100644 index a3b7d4926f8..00000000000 --- a/app/views/shared/builds/_build_output.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -%pre.build-log - %code.bash.js-build-output - .build-loader-animation.js-build-refresh - .dot - .dot - .dot diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml deleted file mode 100644 index 8f2b9fc06e3..00000000000 --- a/app/views/shared/builds/_tabs.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -- count_badge_classes = 'gl-display-none gl-sm-display-inline-flex' - -= gl_tabs_nav({class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-border-b-0', data: { testid: 'jobs-tabs' } }) do - = gl_tab_link_to build_path_proc.call(nil), { item_active: scope.nil? } do - = _('All') - = gl_tab_counter_badge(limited_counter_with_delimiter(all_builds), { class: count_badge_classes }) - = gl_tab_link_to build_path_proc.call('pending'), { item_active: scope == 'pending' } do - = _('Pending') - = gl_tab_counter_badge(limited_counter_with_delimiter(all_builds.pending), { class: count_badge_classes }) - = gl_tab_link_to build_path_proc.call('running'), { item_active: scope == 'running' } do - = _('Running') - = gl_tab_counter_badge(limited_counter_with_delimiter(all_builds.running), { class: count_badge_classes }) - = gl_tab_link_to build_path_proc.call('finished'), { item_active: scope == 'finished' } do - = _('Finished') - = gl_tab_counter_badge(limited_counter_with_delimiter(all_builds.finished), { class: count_badge_classes }) diff --git a/app/views/shared/deploy_keys/_index.html.haml b/app/views/shared/deploy_keys/_index.html.haml index 650e50e0312..5188c530672 100644 --- a/app/views/shared/deploy_keys/_index.html.haml +++ b/app/views/shared/deploy_keys/_index.html.haml @@ -5,8 +5,8 @@ = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p.gl-text-secondary - - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/deploy_keys/index') } - = _("Add deploy keys to grant read/write access to this repository. %{link_start}What are deploy keys?%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/deploy_keys/index'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_("Add deploy keys to grant read/write access to this repository. %{link_start}What are deploy keys?%{link_end}"), tag_pair(link, :link_start, :link_end)) .settings-content = render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card js-toggle-container' }, body_options: { class: 'gl-new-card-body gl-px-0' }) do |c| - c.with_body do diff --git a/app/views/shared/deploy_keys/_project_group_form.html.haml b/app/views/shared/deploy_keys/_project_group_form.html.haml index c633088b26a..bb4295779cd 100644 --- a/app/views/shared/deploy_keys/_project_group_form.html.haml +++ b/app/views/shared/deploy_keys/_project_group_form.html.haml @@ -1,30 +1,30 @@ -= gitlab_ui_form_for [@project.namespace, @project, @deploy_keys.new_key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input container" } do |f| += gitlab_ui_form_for [@project.namespace, @project, @deploy_keys.new_key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input" } do |f| = form_errors(@deploy_keys.new_key) - .form-group.row + .form-group %h4.gl-my-0= s_('DeployKeys|Add new deploy key') - .form-group.row + .form-group = f.label :title, class: "label-bold" - = f.text_field :title, class: 'form-control gl-form-input', required: true, data: { testid: 'deploy-key-title-field' } - .form-group.row + = f.text_field :title, class: 'form-control gl-form-input gl-form-input-xl', required: true, data: { testid: 'deploy-key-title-field' } + .form-group = f.label :key, class: "label-bold" - = f.text_area :key, class: 'form-control gl-form-input', rows: 5, required: true, data: { testid: 'deploy-key-field' } - .form-group.row - %p.light.gl-mb-0 + = f.text_area :key, class: 'form-control gl-form-input gl-form-input-xl gl-h-auto!', rows: 5, required: true, data: { testid: 'deploy-key-field' } + .form-text.text-muted = _('Paste a public key here.') = link_to _('How do I generate it?'), help_page_path("user/ssh") = f.fields_for :deploy_keys_projects do |deploy_keys_project_form| - .form-group.row + .form-group = deploy_keys_project_form.gitlab_ui_checkbox_component :can_push, _('Grant write permissions to this key'), help_text: _('Allow this key to push to this repository') - .form-group.row + .form-group = f.label :expires_at, _('Expiration date (optional)'), class: 'label-bold' - = f.gitlab_ui_datepicker :expires_at, data: { testid: 'deploy-key-expires-at-field' }, value: f.object.expires_at - %p.form-text.text-muted= ssh_key_expires_field_description + .gl-form-input-xl + = f.gitlab_ui_datepicker :expires_at, data: { testid: 'deploy-key-expires-at-field' }, value: f.object.expires_at + .form-text.text-muted= ssh_key_expires_field_description - .form-group.row.gl-mb-0 + .form-group.gl-mb-0 = f.submit _("Add key"), data: { testid: "add-deploy-key-button"}, pajamas_button: true = render Pajamas::ButtonComponent.new(button_options: { type: 'reset', class: 'gl-ml-3 js-toggle-button' }) do = _('Cancel') diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index 8821804ce6b..bb7e0d774cc 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -1,7 +1,6 @@ %p - - group_deploy_tokens_help_link_url = help_page_path('user/project/deploy_tokens/index.md') - - group_deploy_tokens_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_deploy_tokens_help_link_url } - = s_('DeployTokens|Create a new deploy token for all projects in this group. %{link_start}What are deploy tokens?%{link_end}').html_safe % { link_start: group_deploy_tokens_help_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/deploy_tokens/index.md'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('DeployTokens|Create a new deploy token for all projects in this group. %{link_start}What are deploy tokens?%{link_end}'), tag_pair(link, :link_start, :link_end)) = gitlab_ui_form_for token, url: create_deploy_token_path(group_or_project, anchor: 'js-deploy-tokens'), method: :post, remote: true do |f| diff --git a/app/views/shared/deploy_tokens/_new_deploy_token.html.haml b/app/views/shared/deploy_tokens/_new_deploy_token.html.haml index 9c82d5685f8..25c277ea0ea 100644 --- a/app/views/shared/deploy_tokens/_new_deploy_token.html.haml +++ b/app/views/shared/deploy_tokens/_new_deploy_token.html.haml @@ -7,7 +7,7 @@ .input-group = text_field_tag 'deploy-token-user', deploy_token.username, readonly: true, class: 'deploy-token-field form-control js-select-on-focus', data: { qa_selector: 'deploy_token_user_field' } .input-group-append - = clipboard_button(text: deploy_token.username, title: s_('DeployTokens|Copy username'), placement: 'left') + = deprecated_clipboard_button(text: deploy_token.username, title: s_('DeployTokens|Copy username'), placement: 'left') %span.deploy-token-help-block.gl-mt-2.text-success - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/deploy_tokens/index.md') } - link_end = "</a>".html_safe @@ -17,7 +17,7 @@ .input-group = text_field_tag 'deploy-token', deploy_token.token, readonly: true, class: 'deploy-token-field form-control js-select-on-focus', data: { qa_selector: 'deploy_token_field' } .input-group-append - = clipboard_button(text: deploy_token.token, title: s_('DeployTokens|Copy deploy token'), placement: 'left') + = deprecated_clipboard_button(text: deploy_token.token, title: s_('DeployTokens|Copy deploy token'), placement: 'left') %span.deploy-token-help-block.gl-mt-2.text-danger - i_start = "<i>".html_safe - i_end = "</i>".html_safe diff --git a/app/views/shared/doorkeeper/applications/_show.html.haml b/app/views/shared/doorkeeper/applications/_show.html.haml index 4101a456f32..d309a335166 100644 --- a/app/views/shared/doorkeeper/applications/_show.html.haml +++ b/app/views/shared/doorkeeper/applications/_show.html.haml @@ -10,7 +10,7 @@ .input-group %input.label.label-monospace.monospace{ id: "application_id", type: "text", autocomplete: 'off', value: @application.uid, readonly: true, data: { qa_selector: 'application_id_field' } } .input-group-append - = clipboard_button(target: '#application_id', title: _("Copy ID"), class: "gl-button btn btn-default") + = clipboard_button(target: "#application_id", title: _("Copy ID"), category: :primary, size: :medium) %tr %td = _('Secret') diff --git a/app/views/shared/form_elements/_description.html.haml b/app/views/shared/form_elements/_description.html.haml index 75f678dea5c..b05befce24e 100644 --- a/app/views/shared/form_elements/_description.html.haml +++ b/app/views/shared/form_elements/_description.html.haml @@ -21,7 +21,7 @@ .js-markdown-editor{ data: { render_markdown_path: preview_url, markdown_docs_path: help_page_path('user/markdown'), quick_actions_docs_path: help_page_path('user/project/quick_actions'), - qa_selector: 'issuable_form_description_field', + testid: 'issuable-form-description-field', form_field_placeholder: placeholder, autofocus: 'false', form_field_classes: 'js-gfm-input markdown-area note-textarea rspec-issuable-form-description' } } diff --git a/app/views/shared/groups/_empty_state.html.haml b/app/views/shared/groups/_empty_state.html.haml deleted file mode 100644 index aaba9697fea..00000000000 --- a/app/views/shared/groups/_empty_state.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -.row.gl-align-items-center.gl-justify-content-center - .order-md-2 - = custom_icon("icon_empty_groups") - - .text-content.order-md-1{ class: 'gl-m-0!' } - %h4= s_("GroupsEmptyState|A group is a collection of several projects.") - %p= s_("GroupsEmptyState|If you organize your projects under a group, it works like a folder.") - %p= s_("GroupsEmptyState|You can manage your group member’s permissions and access to each project in the group.") diff --git a/app/views/shared/hook_logs/_content.html.haml b/app/views/shared/hook_logs/_content.html.haml index 1971c2da913..e8cb93f8037 100644 --- a/app/views/shared/hook_logs/_content.html.haml +++ b/app/views/shared/hook_logs/_content.html.haml @@ -1,6 +1,6 @@ %span.gl-display-flex.gl-align-items-center - %h4 - POST + %h5 + = gl_badge_tag "POST", { size: :sm }, { variant: :info } = hook_log.url = gl_badge_tag hook_log.trigger.singularize.titleize, { size: :sm }, { class: 'gl-ml-3' } @@ -16,19 +16,28 @@ - c.with_body do = _('Error: %{error}') % { error: hook_log.internal_error_message } -%h4= _('Response') -= render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log } +%span.gl-display-flex.gl-align-items-center + %h3 + = _('Response') + = render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log } + %pre.gl-mt-3 - :escaped - #{hook_log.response_body} + - if hook_log.response_body.blank? + = s_('Webhooks|Response body is empty') + - else + :escaped + #{hook_log.response_body} -%h5= _('Headers') +%h4= _('Headers') %pre - - hook_log.response_headers.each do |k, v| - <span class="gl-font-weight-bold">#{k}:</span> #{v} - %br + - if hook_log.response_headers.blank? + = s_('Webhooks|Response headers data is empty') + - else + - hook_log.response_headers.each do |k, v| + <span class="gl-font-weight-bold">#{k}:</span> #{v} + %br -%h4.gl-mt-6= _('Request') +%h3.gl-mt-6= _('Request') %pre - if hook_log.oversize? = _('Request data is too large') @@ -36,7 +45,7 @@ :escaped #{Gitlab::Json.pretty_generate(hook_log.request_data)} -%h5= _('Headers') +%h4= _('Headers') %pre - hook_log.request_headers.each do |k, v| <span class="gl-font-weight-bold">#{k}:</span> #{v} diff --git a/app/views/shared/icons/_icon_empty_groups.svg b/app/views/shared/icons/_icon_empty_groups.svg deleted file mode 100644 index cf378145e59..00000000000 --- a/app/views/shared/icons/_icon_empty_groups.svg +++ /dev/null @@ -1 +0,0 @@ -<svg width="249" height="368" viewBox="891 156 249 368" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><rect id="a" width="131" height="162" rx="10"/><mask id="e" x="0" y="0" width="131" height="162" fill="#fff"><use xlink:href="#a"/></mask><path d="M223.616 127.958V108.96c0-4.416-3.584-8-8.005-8h-23.985c-2.778 0-5.98 2.014-7.18 4.5l-5.07 10.5h-49.763c-5.527 0-9.996 4.475-9.996 9.997v53.005c0 5.513 4.475 9.997 9.996 9.997h84.01c5.525 0 9.994-4.477 9.994-9.998v-51.004z" id="b"/><mask id="f" x="0" y="0" width="104" height="88" fill="#fff"><use xlink:href="#b"/></mask><path d="M47 25h.996C53.52 25 58 29.472 58 34.99v20.02C58 60.526 53.52 65 47.996 65H10.004C4.48 65 0 60.528 0 55.01V34.99C0 29.474 4.48 25 10.004 25H11v-7c0-9.94 8.06-18 18-18s18 8.06 18 18v7zm-6 0H17v-7c0-6.627 5.373-12 12-12s12 5.373 12 12v7z" id="c"/><mask id="g" x="0" y="0" width="58" height="65" fill="#fff"><use xlink:href="#c"/></mask><path d="M0 10.008C0 4.48 4.476 0 10 0h218c5.523 0 10 4.473 10 10.008v140.94c0 5.53-4.062 11.882-9.08 14.196l-100.84 46.5c-5.015 2.31-13.142 2.312-18.16 0l-100.84-46.5C4.064 162.832 0 156.484 0 150.95V10.007z" id="d"/><mask id="h" x="0" y="0" width="238" height="213.417" fill="#fff"><use xlink:href="#d"/></mask></defs><g fill="none" fill-rule="evenodd" transform="translate(891 156)"><g transform="rotate(8 -266.528 490.3)"><use stroke="#E5E5E5" mask="url(#e)" stroke-width="8" fill="#FFF" xlink:href="#a"/><rect fill="#FC8A51" x="20" y="31" width="12" height="4" rx="2"/><rect fill="#FC8A51" x="60" y="31" width="12" height="4" rx="2"/><rect fill="#FDE5D8" x="36" y="31" width="20" height="4" rx="2"/><rect fill="#6B4FBB" x="20" y="65" width="20" height="4" rx="2"/><rect fill="#FDE5D8" x="44" y="65" width="20" height="4" rx="2"/><rect fill="#FC8A51" x="36" y="80" width="20" height="4" rx="2"/><rect fill="#FDE5D8" x="20" y="80" width="12" height="4" rx="2"/><rect fill="#FDE5D8" x="20" y="48" width="12" height="4" rx="2"/><rect fill="#FC8A51" x="36" y="48" width="12" height="4" rx="2"/><rect fill="#FDE5D8" x="60" y="80" width="12" height="4" rx="2"/><rect fill="#6B4FBB" x="52" y="48" width="12" height="4" rx="2"/><rect fill="#FDE5D8" x="68" y="48" width="12" height="4" rx="2"/></g><use stroke="#B5A7DD" mask="url(#f)" stroke-width="8" fill="#FFF" transform="rotate(5 171.616 144.96)" xlink:href="#b"/><path d="M58 132c0-9.94 8.06-18 18-18s18 8.06 18 18-8.06 18-18 18-18-8.06-18-18z" fill="#C1E7D0"/><path d="M90.143 132c0-7.81-6.332-14.143-14.143-14.143-7.81 0-14.143 6.332-14.143 14.143 0 7.81 6.332 14.143 14.143 14.143 7.81 0 14.143-6.332 14.143-14.143z" fill="#FFF"/><path d="M74.686 133.875l-3.18-3.18c-.29-.29-.77-.296-1.06-.005l-1.55 1.55c-.287.287-.29.766.004 1.06l4.92 4.92c.504.504 1.32.504 1.823 0l.654-.653 7.804-7.804c.3-.3.29-.77-.005-1.067l-1.578-1.58c-.302-.3-.775-.298-1.068-.004l-6.764 6.763z" fill="#31AF64"/><path d="M4 66c0-9.94 8.06-18 18-18s18 8.06 18 18-8.06 18-18 18S4 75.94 4 66z" fill="#D5ECF7"/><path d="M36.143 66c0-7.81-6.332-14.143-14.143-14.143-7.81 0-14.143 6.332-14.143 14.143 0 7.81 6.332 14.143 14.143 14.143 7.81 0 14.143-6.332 14.143-14.143z" fill="#FFF"/><path d="M22 55.714c5.68 0 10.286 4.605 10.286 10.286 0 5.68-4.605 10.286-10.286 10.286-3.45 0-6.505-1.7-8.37-4.307L22 66V55.714z" fill="#2D9FD8"/><g transform="rotate(-8 748.533 18.147)"><use stroke="#FDE5D8" mask="url(#g)" stroke-width="8" fill="#FFF" xlink:href="#c"/><path d="M31 46.584c1.766-.772 3-2.534 3-4.584 0-2.76-2.24-5-5-5s-5 2.24-5 5c0 2.05 1.234 3.812 3 4.584v3.42c0 1.1.895 1.996 2 1.996 1.112 0 2-.894 2-1.997v-3.42z" fill="#FC8A51"/></g><g transform="translate(0 154)"><use stroke="#E5E5E5" mask="url(#h)" stroke-width="8" fill="#FFF" xlink:href="#d"/><g opacity=".3"><path d="M141.837 104.53l-2.56-7.993-5.074-15.843c-.26-.815-1.398-.815-1.66 0l-5.074 15.843h-16.85l-5.075-15.843c-.26-.815-1.398-.815-1.66 0l-5.073 15.843-2.56 7.993c-.234.73.022 1.528.633 1.98l22.16 16.33 22.16-16.33c.61-.452.866-1.25.632-1.98" fill="#A1A1A1"/><path fill="#5C5C5C" d="M119.044 122.84l8.425-26.303h-16.85l8.424 26.304"/><path fill="#787878" d="M119.044 122.84l-8.425-26.303H98.81l20.232 26.304"/><path fill="#787878" d="M119.044 122.84l8.425-26.303h11.807l-20.233 26.304"/><path d="M98.812 96.537l-2.56 7.993c-.234.73.022 1.528.633 1.98l22.16 16.33L98.81 96.538z" fill="#A1A1A1"/><path d="M98.812 96.537h11.807l-5.075-15.843c-.26-.815-1.398-.815-1.66 0l-5.073 15.843z" fill="#5C5C5C"/><path d="M139.277 96.537l2.56 7.993c.234.73-.022 1.528-.634 1.98l-22.16 16.33 20.234-26.303z" fill="#A1A1A1"/><path d="M139.277 96.537H127.47l5.074-15.843c.26-.815 1.398-.815 1.66 0l5.073 15.843z" fill="#5C5C5C"/></g><path d="M57 18.29c1.105 0 2-.818 2-1.828 0-1.01-.895-1.83-2-1.83H41c-1.105 0-2 .82-2 1.83 0 1.01.895 1.83 2 1.83h16zm36 0c1.105 0 2-.818 2-1.828 0-1.01-.895-1.83-2-1.83H77c-1.105 0-2 .82-2 1.83 0 1.01.895 1.83 2 1.83h16zm36 0c1.105 0 2-.818 2-1.828 0-1.01-.895-1.83-2-1.83h-16c-1.105 0-2 .82-2 1.83 0 1.01.895 1.83 2 1.83h16zm36 0c1.105 0 2-.818 2-1.828 0-1.01-.895-1.83-2-1.83h-16c-1.105 0-2 .82-2 1.83 0 1.01.895 1.83 2 1.83h16zm36 0c1.105 0 2-.818 2-1.828 0-1.01-.895-1.83-2-1.83h-16c-1.105 0-2 .82-2 1.83 0 1.01.895 1.83 2 1.83h16zm17 24.693c0 1.01.895 1.83 2 1.83s2-.82 2-1.83V28.35c0-1.01-.895-1.83-2-1.83s-2 .82-2 1.83v14.633zm-202 0c0 1.01.895 1.83 2 1.83s2-.82 2-1.83V28.35c0-1.01-.895-1.83-2-1.83s-2 .82-2 1.83v14.633zm202 32.923c0 1.01.895 1.83 2 1.83s2-.82 2-1.83V61.274c0-1.01-.895-1.83-2-1.83s-2 .82-2 1.83v14.632zm-202 0c0 1.01.895 1.83 2 1.83s2-.82 2-1.83V61.274c0-1.01-.895-1.83-2-1.83s-2 .82-2 1.83v14.632zm202 32.923c0 1.01.895 1.828 2 1.828s2-.82 2-1.83V94.2c0-1.012-.895-1.83-2-1.83s-2 .818-2 1.83v14.63zm-202 0c0 1.01.895 1.828 2 1.828s2-.82 2-1.83V94.2c0-1.012-.895-1.83-2-1.83s-2 .818-2 1.83v14.63zm202 32.922c0 1.01.895 1.83 2 1.83s2-.82 2-1.83V127.12c0-1.01-.895-1.83-2-1.83s-2 .82-2 1.83v14.632zm-202 0c0 1.01.895 1.83 2 1.83s2-.82 2-1.83V127.12c0-1.01-.895-1.83-2-1.83s-2 .82-2 1.83v14.632zm179.023 19.555c-.988.452-1.388 1.55-.894 2.454.493.904 1.694 1.27 2.682.82l14.31-6.545c.99-.452 1.39-1.55.896-2.454-.494-.902-1.696-1.27-2.684-.817l-14.31 6.544zm-32.2 14.723c-.987.452-1.388 1.55-.894 2.454.493.904 1.695 1.27 2.683.818l14.31-6.544c.99-.45 1.39-1.55.895-2.454-.494-.903-1.695-1.27-2.683-.818l-14.31 6.544zm-32.2 14.724c-.987.45-1.387 1.55-.893 2.454.494.903 1.695 1.27 2.683.818l14.31-6.544c.99-.452 1.39-1.55.896-2.454-.495-.904-1.697-1.27-2.685-.818l-14.31 6.544zm-23.67-2.023l-12.186-5.57c-.987-.452-2.19-.086-2.683.817-.494.904-.093 2.003.895 2.454l12.185 5.573c.754.345 1.57.645 2.438.898 1.052.307 2.177-.224 2.513-1.187.335-.962-.246-1.99-1.298-2.298-.677-.197-1.302-.426-1.864-.684zM62.57 168.437c-.988-.452-2.19-.086-2.683.818-.494.903-.094 2.002.894 2.454l14.31 6.544c.988.45 2.19.085 2.683-.818.494-.904.094-2.003-.894-2.454l-14.312-6.544zm-32.2-14.723c-.988-.452-2.19-.086-2.683.818-.494.904-.093 2.003.895 2.454l14.31 6.544c.988.452 2.19.086 2.684-.818.494-.903.093-2.002-.895-2.454l-14.312-6.543z" fill="#EEE"/></g><g><path d="M104 18c0-9.94 8.06-18 18-18s18 8.06 18 18-8.06 18-18 18-18-8.06-18-18z" fill="#FADFD9"/><path d="M136.143 18c0-7.81-6.332-14.143-14.143-14.143-7.81 0-14.143 6.332-14.143 14.143 0 7.81 6.332 14.143 14.143 14.143 7.81 0 14.143-6.332 14.143-14.143z" fill="#FFF"/><path d="M119.43 8.994c0-.707.57-1.28 1.283-1.28h2.574c.71 0 1.284.57 1.284 1.28v10.298c0 .706-.57 1.28-1.283 1.28h-2.574c-.71 0-1.284-.57-1.284-1.28V8.994zm0 15.433c0-.71.57-1.284 1.283-1.284h2.574c.71 0 1.284.57 1.284 1.284V27c0 .71-.57 1.286-1.283 1.286h-2.574c-.71 0-1.284-.57-1.284-1.285v-2.573z" fill="#E75E40"/></g><g><path d="M213 89c0-9.94 8.06-18 18-18s18 8.06 18 18-8.06 18-18 18-18-8.06-18-18z" fill="#F6D4DC"/><path d="M245.143 89c0-7.81-6.332-14.143-14.143-14.143-7.81 0-14.143 6.332-14.143 14.143 0 7.81 6.332 14.143 14.143 14.143 7.81 0 14.143-6.332 14.143-14.143z" fill="#FFF"/><path d="M231 86.348l-3.603-3.602c-.288-.29-.766-.286-1.063.01l-1.578 1.578c-.3.302-.3.773-.01 1.063L228.348 89l-3.602 3.603c-.29.288-.286.766.01 1.063l1.578 1.578c.302.3.773.3 1.063.01L231 91.652l3.603 3.602c.288.29.766.286 1.063-.01l1.578-1.578c.3-.302.3-.773.01-1.063L233.652 89l3.602-3.603c.29-.288.286-.766-.01-1.063l-1.578-1.578c-.302-.3-.773-.3-1.063-.01L231 86.348z" fill="#D22852"/></g></g></svg> diff --git a/app/views/shared/integrations/mattermost_slash_commands/_detailed_help.html.haml b/app/views/shared/integrations/mattermost_slash_commands/_detailed_help.html.haml index db1754c1864..5aaae5eb4ec 100644 --- a/app/views/shared/integrations/mattermost_slash_commands/_detailed_help.html.haml +++ b/app/views/shared/integrations/mattermost_slash_commands/_detailed_help.html.haml @@ -1,30 +1,21 @@ - pretty_name = @project&.full_name ? html_escape(@project&.full_name) : '<' + _('project name') + '>' - run_actions_text = html_escape(s_("ProjectService|Perform common operations on GitLab project: %{project_name}")) % { project_name: pretty_name } +- external_link_icon = sprite_icon('external-link') %p= s_("ProjectService|To configure this integration, you should:") -%ul.list-unstyled.indent-list +%ol.indent-list %li - 1. - = link_to help_page_url('user/project/integrations/mattermost_slash_commands', anchor: 'enable-custom-slash-commands-in-mattermost'), target: '_blank', rel: 'noopener noreferrer nofollow' do - Enable custom slash commands - = sprite_icon('external-link') - on your Mattermost installation. + - enable_slash_commands_link_url = help_page_url('user/project/integrations/mattermost_slash_commands', anchor: 'enable-custom-slash-commands-in-mattermost') + - enable_slash_commands_link = link_to '', enable_slash_commands_link_url, target: '_blank', rel: 'noopener noreferrer' + = safe_format(s_('MattermostService|%{link_start}Enable custom slash commands %{icon}%{link_end} on your Mattermost installation.'), tag_pair(enable_slash_commands_link, :link_start, :link_end), icon: external_link_icon) %li - 2. - = link_to help_page_url('user/project/integrations/mattermost_slash_commands', anchor: 'create-a-slash-command-in-mattermost'), target: '_blank', rel: 'noopener noreferrer nofollow' do - Add a slash command - = sprite_icon('external-link') - in your Mattermost team with the options listed below. + - create_slash_commands_link_url = help_page_url('user/project/integrations/mattermost_slash_commands', anchor: 'create-a-slash-command-in-mattermost') + - create_slash_commands_link = link_to '', create_slash_commands_link_url, target: '_blank', rel: 'noopener noreferrer' + = safe_format(s_('MattermostService|%{link_start}Add a slash command %{icon}%{link_end} in your Mattermost team with the options listed below.'), tag_pair(create_slash_commands_link, :link_start, :link_end), icon: external_link_icon) %li - 3. Paste the token into the - %strong Token - field. + = safe_format(s_('MattermostService|Paste the token into the %{strong_start}Token%{strong_end} field.'), tag_pair(tag.strong, :strong_start, :strong_end)) %li - 4. Select the - %strong Active - check box, then select - %strong Save changes - to start using GitLab inside Mattermost! + = safe_format(s_('MattermostService|Select the %{strong_start}Active%{strong_end} check box, then select %{strong_start}Save changes%{strong_end} to start using GitLab inside Mattermost!'), tag_pair(tag.strong, :strong_start, :strong_end)) %hr @@ -34,14 +25,14 @@ .col-12.input-group = text_field_tag :display_name, "GitLab / #{pretty_name}".html_safe, class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#display_name', class: 'gl-button btn-default btn-icon input-group-text') + = clipboard_button(target: '#display_name', category: :primary, size: :medium) .form-group = label_tag :description, _('Description'), class: 'col-12 col-form-label label-bold' .col-12.input-group = text_field_tag :description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#description', class: 'gl-button btn-default btn-icon input-group-text') + = clipboard_button(target: '#description', category: :primary, size: :medium) .form-group = label_tag nil, s_('MattermostService|Command trigger word'), class: 'col-12 col-form-label label-bold' @@ -59,7 +50,7 @@ .col-12.input-group = text_field_tag :request_url, service_trigger_url(integration), class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#request_url', class: 'gl-button btn-default btn-icon input-group-text') + = clipboard_button(target: '#request_url', category: :primary, size: :medium) .form-group = label_tag nil, s_('MattermostService|Request method'), class: 'col-12 col-form-label label-bold' @@ -70,14 +61,14 @@ .col-12.input-group = text_field_tag :response_username, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#response_username', class: 'gl-button btn-default btn-icon input-group-text') + = clipboard_button(target: '#response_username', category: :primary, size: :medium) .form-group = label_tag :response_icon, s_('MattermostService|Response icon'), class: 'col-12 col-form-label label-bold' .col-12.input-group = text_field_tag :response_icon, asset_url('gitlab_logo.png'), class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#response_icon', class: 'gl-button btn-default btn-icon input-group-text') + = clipboard_button(target: '#response_icon', category: :primary, size: :medium) .form-group = label_tag nil, _('Autocomplete'), class: 'col-12 col-form-label label-bold' @@ -88,11 +79,11 @@ .col-12.input-group = text_field_tag :autocomplete_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#autocomplete_hint', class: 'gl-button btn-default btn-icon input-group-text') + = clipboard_button(target: '#autocomplete_hint', category: :primary, size: :medium) .form-group = label_tag :autocomplete_description, _('Autocomplete description'), class: 'col-12 col-form-label label-bold' .col-12.input-group = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#autocomplete_description', class: 'gl-button btn-default btn-icon input-group-text') + = clipboard_button(target: '#autocomplete_description', category: :primary, size: :medium) diff --git a/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml b/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml index 38adc69dd5e..ac14e1a6cd7 100644 --- a/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml +++ b/app/views/shared/integrations/mattermost_slash_commands/_installation_info.html.haml @@ -1,7 +1,5 @@ .services-installation-info - unless integration.activated? - .row - .col-sm-9.offset-sm-3 - = link_to new_project_mattermost_path(@project), class: 'btn gl-button btn-lg' do - = custom_icon('mattermost_logo', size: 15) - = s_("MattermostService|Add to Mattermost") + = render Pajamas::ButtonComponent.new(href: new_project_mattermost_path(@project), button_text_classes: 'gl-display-flex gl-gap-2') do + = custom_icon('mattermost_logo') + = s_("MattermostService|Add to Mattermost") diff --git a/app/views/shared/integrations/prometheus/_custom_metrics.html.haml b/app/views/shared/integrations/prometheus/_custom_metrics.html.haml index a7a650aa95d..080d4b37354 100644 --- a/app/views/shared/integrations/prometheus/_custom_metrics.html.haml +++ b/app/views/shared/integrations/prometheus/_custom_metrics.html.haml @@ -3,7 +3,6 @@ .col-lg-3 %p = s_('PrometheusService|Custom metrics require Prometheus installed on a cluster with environment scope "*" OR a manually configured Prometheus to be available.') - = link_to s_('PrometheusService|More information'), help_page_path('operations/metrics/index.md'), target: '_blank', rel: "noopener noreferrer" .col-lg-9 = render Pajamas::CardComponent.new(header_options: { class: 'gl-display-flex gl-align-items-center' }, body_options: { class: 'gl-p-0' }, card_options: { class: 'gl-mb-5 custom-monitored-metrics js-panel-custom-monitored-metrics', data: { active_custom_metrics: project_prometheus_metrics_path(project), environments_data: environments_list_data, service_active: "#{integration.active}" } }) do |c| diff --git a/app/views/shared/integrations/prometheus/_metrics.html.haml b/app/views/shared/integrations/prometheus/_metrics.html.haml index cb78faa383a..36e4c0d4b13 100644 --- a/app/views/shared/integrations/prometheus/_metrics.html.haml +++ b/app/views/shared/integrations/prometheus/_metrics.html.haml @@ -5,10 +5,9 @@ .col-lg-3 %p = s_('PrometheusService|Common metrics are automatically monitored based on a library of metrics from popular exporters.') - = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: "noopener noreferrer" .col-lg-9 - = render Pajamas::CardComponent.new(body_options: { class: 'gl-p-0' }, card_options: { class: 'gl-mb-5 js-panel-monitored-metrics', data: { active_metrics: active_common_project_prometheus_metrics_path(project, :json), metrics_help_path: help_page_path('user/project/integrations/prometheus_library/index') }}) do |c| + = render Pajamas::CardComponent.new(body_options: { class: 'gl-p-0' }, card_options: { class: 'gl-mb-5 js-panel-monitored-metrics', data: { active_metrics: active_common_project_prometheus_metrics_path(project, :json) }}) do |c| - c.with_header do %strong = s_('PrometheusService|Common metrics') @@ -34,5 +33,4 @@ .flash-notice .flash-text = html_escape(s_("PrometheusService|To set up automatic monitoring, add the environment variable %{variable} to exporter's queries.")) % { variable: "<code>$CI_ENVIRONMENT_SLUG</code>".html_safe } - = link_to s_('PrometheusService|More information'), help_page_path('operations/metrics/index.md') %ul.list-unstyled.metrics-list.js-missing-var-metrics-list diff --git a/app/views/shared/integrations/slack_slash_commands/_help.html.haml b/app/views/shared/integrations/slack_slash_commands/_help.html.haml index 43a240fa6fe..defaf50efea 100644 --- a/app/views/shared/integrations/slack_slash_commands/_help.html.haml +++ b/app/views/shared/integrations/slack_slash_commands/_help.html.haml @@ -40,7 +40,7 @@ .col-12.input-group = text_field_tag :url, service_trigger_url(integration), class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#url', class: 'input-group-text') + = deprecated_clipboard_button(target: '#url', class: 'input-group-text') .form-group = label_tag nil, _('Method'), class: 'col-12 col-form-label label-bold' @@ -51,7 +51,7 @@ .col-12.input-group = text_field_tag :customize_name, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#customize_name', class: 'input-group-text') + = deprecated_clipboard_button(target: '#customize_name', class: 'input-group-text') .form-group = label_tag nil, _('Customize icon'), class: 'col-12 col-form-label label-bold' @@ -68,21 +68,21 @@ .col-12.input-group = text_field_tag :autocomplete_description, run_actions_text.html_safe, class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#autocomplete_description', class: 'input-group-text') + = deprecated_clipboard_button(target: '#autocomplete_description', class: 'input-group-text') .form-group = label_tag :autocomplete_usage_hint, _('Autocomplete usage hint'), class: 'col-12 col-form-label label-bold' .col-12.input-group = text_field_tag :autocomplete_usage_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#autocomplete_usage_hint', class: 'input-group-text') + = deprecated_clipboard_button(target: '#autocomplete_usage_hint', class: 'input-group-text') .form-group = label_tag :descriptive_label, _('Descriptive label'), class: 'col-12 col-form-label label-bold' .col-12.input-group = text_field_tag :descriptive_label, _('Perform common operations on GitLab project'), class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append - = clipboard_button(target: '#descriptive_label', class: 'input-group-text') + = deprecated_clipboard_button(target: '#descriptive_label', class: 'input-group-text') %hr diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 42f035b99aa..f8d07a2f6de 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -51,12 +51,11 @@ .gl-mt-5{ class: (is_footer ? "footer-block" : "middle-block") } - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = issuable.project.present.contribution_guide_path) .gl-mb-5 - - contribution_guidelines_start = '<strong><a href="%{url}">'.html_safe % {url: strip_tags(guide_url)} - - contribution_guidelines_end = '</a></strong>'.html_safe - = sanitize(html_escape(_('Please review the %{linkStart}contribution guidelines%{linkEnd} for this project.')) % { linkStart: contribution_guidelines_start, linkEnd: contribution_guidelines_end }) + - contribution_guidelines = link_to('', strip_tags(guide_url)) + = safe_format(_('Please review the %{strong_start}%{contribution_guidelines_start}contribution guidelines%{contribution_guidelines_end}%{strong_end} for this project.'), tag_pair('<strong></strong>'.html_safe, :strong_start, :strong_end), tag_pair(contribution_guidelines, :contribution_guidelines_start, :contribution_guidelines_end)) - if issuable.new_record? - = form.submit "#{_('Create')} #{issuable.class.model_name.human.downcase}", pajamas_button: true, class: 'gl-mr-2 js-issuable-submit-button js-reset-autosave', data: { qa_selector: 'issuable_create_button', track_action: 'click_button', track_label: 'submit_mr', track_value: 0 } + = form.submit "#{_('Create')} #{issuable.class.model_name.human.downcase}", pajamas_button: true, class: 'gl-mr-2 js-issuable-submit-button js-reset-autosave', data: { testid: 'issuable-create-button', track_action: 'click_button', track_label: 'submit_mr', track_value: 0 } - else = form.submit _('Save changes'), pajamas_button: true, class: 'gl-mr-2 js-issuable-submit-button js-reset-autosave', data: { track_action: 'click_button', track_label: 'submit_mr', track_value: 0 } diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index d590c859945..86aaa5128a8 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -1,7 +1,7 @@ - type = local_assigns.fetch(:type) - show_sorting_dropdown = local_assigns.fetch(:show_sorting_dropdown, true) - disable_target_branch = local_assigns.fetch(:disable_target_branch, false) -- placeholder = local_assigns[:placeholder] || _('Search or filter results...') +- placeholder = local_assigns[:placeholder] || _('Search or filter results…') - block_css_class = type != :productivity_analytics ? 'row-content-block second-block' : '' .issues-filters diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 46710081307..93e1a53ccb4 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -46,7 +46,7 @@ .js-sidebar-milestone-widget-root{ data: { can_edit: can_edit_issuable.to_s, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid] } } - if in_group_context_with_iterations - .block.gl-collapse-empty{ data: { testid: 'iteration_container' } }< + .block.gl-collapse-empty{ data: { testid: 'iteration-container' } }< = render_if_exists 'shared/issuable/iteration_select', can_edit: can_edit_issuable.to_s, group_path: @project.group.full_path, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid], issuable_type: issuable_type - if issuable_sidebar[:show_crm_contacts] @@ -88,11 +88,11 @@ - if is_merge_request && !moved_sidebar_enabled .sub-block.js-sidebar-source-branch .sidebar-collapsed-icon.js-dont-change-state - = clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport', class: 'btn-clipboard gl-button btn-default-tertiary btn-icon btn-sm js-source-branch-copy') + = deprecated_clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport', class: 'btn-clipboard gl-button btn-default-tertiary btn-icon btn-sm js-source-branch-copy') .gl-display-flex.gl-align-items-center.gl-justify-content-space-between.gl-mb-2.hide-collapsed %span.gl-overflow-hidden.gl-text-overflow-ellipsis.gl-white-space-nowrap = _('Source branch: %{source_branch_open}%{source_branch}%{source_branch_close}').html_safe % { source_branch_open: "<span class='gl-font-monospace' data-testid='ref-name' title='#{html_escape(source_branch)}'>".html_safe, source_branch_close: "</span>".html_safe, source_branch: html_escape(source_branch) } - = clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport', class: 'btn-clipboard gl-button btn-default-tertiary btn-icon btn-sm js-source-branch-copy') + = deprecated_clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport', class: 'btn-clipboard gl-button btn-default-tertiary btn-icon btn-sm js-source-branch-copy') - if show_forwarding_email && !moved_sidebar_enabled .block diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index a27bb506c87..0ffce0ac571 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -45,4 +45,4 @@ options: options, wrapper_class: 'js-sidebar-assignee-dropdown', track_label: 'edit_assignee', - trigger_source: "#{issuable_type}-assignee-dropdown" + trigger_source: "#{issuable_type}_assignee_dropdown" diff --git a/app/views/shared/issuable/_sidebar_reviewers.html.haml b/app/views/shared/issuable/_sidebar_reviewers.html.haml index b360fac0a55..4b07d8d0850 100644 --- a/app/views/shared/issuable/_sidebar_reviewers.html.haml +++ b/app/views/shared/issuable/_sidebar_reviewers.html.haml @@ -42,4 +42,4 @@ options: options, wrapper_class: 'js-sidebar-reviewer-dropdown', track_label: 'edit_reviewer', - trigger_source: "#{issuable_type}-reviewer-dropdown" + trigger_source: "#{issuable_type}_reviewer_dropdown" diff --git a/app/views/shared/issuable/_status_box.html.haml b/app/views/shared/issuable/_status_box.html.haml index cca51b48322..f2e4e22788a 100644 --- a/app/views/shared/issuable/_status_box.html.haml +++ b/app/views/shared/issuable/_status_box.html.haml @@ -1,8 +1,7 @@ - badge_text = state_name_with_icon(issuable)[0] - badge_icon = state_name_with_icon(issuable)[1] - badge_variant = issuable.open? ? :success : issuable.merged? ? :info : :danger -- badge_status_class = issuable.open? ? 'issuable-status-badge-open' : issuable.merged? ? 'issuable-status-badge-merged' : 'issuable-status-badge-closed' -- badge_classes = "js-mr-status-box issuable-status-badge gl-mr-3 gl-align-self-center #{badge_status_class} #{'gl-vertical-align-bottom' if issuable.is_a?(MergeRequest)}" +- badge_classes = "js-mr-status-box gl-mr-3 gl-align-self-center" = gl_badge_tag({ variant: badge_variant, icon: badge_icon, icon_classes: 'gl-mr-0!' }, { class: badge_classes, data: { project_path: issuable.project.path_with_namespace, iid: issuable.iid, issuable_type: 'merge_request', state: issuable.state } }) do %span.gl-display-none.gl-sm-display-block.gl-ml-2 diff --git a/app/views/shared/issuable/form/_default_templates.html.haml b/app/views/shared/issuable/form/_default_templates.html.haml index 2dda0049c09..be6ca475f5c 100644 --- a/app/views/shared/issuable/form/_default_templates.html.haml +++ b/app/views/shared/issuable/form/_default_templates.html.haml @@ -1,5 +1,4 @@ .gl-mt-3.gl-text-secondary - - template_link_url = help_page_path('user/project/description_templates') - - template_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: template_link_url } - = s_('Promotions|Add %{link_start} description templates %{link_end} to help your contributors to communicate effectively!').html_safe % { link_start: template_link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('user/project/description_templates'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(s_('Promotions|Add %{link_start} description templates %{link_end} to help your contributors to communicate effectively!'), tag_pair(link, :link_start, :link_end)) diff --git a/app/views/shared/issuable/form/_title.html.haml b/app/views/shared/issuable/form/_title.html.haml index 36000f3cc67..242342d365e 100644 --- a/app/views/shared/issuable/form/_title.html.haml +++ b/app/views/shared/issuable/form/_title.html.haml @@ -3,7 +3,7 @@ %div{ data: { testid: 'issue-title-input-field' } } = form.text_field :title, required: true, aria: { required: true }, maxlength: 255, autofocus: true, - autocomplete: 'off', class: 'form-control pad', dir: 'auto', data: { qa_selector: 'issuable_form_title_field' } + autocomplete: 'off', class: 'form-control pad', dir: 'auto', data: { testid: 'issuable-form-title-field' } - if issuable.respond_to?(:draft?) .gl-pt-3 diff --git a/app/views/shared/issue_type/_details_header.html.haml b/app/views/shared/issue_type/_details_header.html.haml deleted file mode 100644 index 558287480e1..00000000000 --- a/app/views/shared/issue_type/_details_header.html.haml +++ /dev/null @@ -1,21 +0,0 @@ -- link = issue_closed_link(@issue, current_user, css_class: 'text-underline gl-reset-color!') -- badge_classes = 'issuable-status-badge gl-mr-3' - -.detail-page-header - .detail-page-header-body.gl-flex-wrap - = gl_badge_tag({ variant: :info, icon: 'issue-closed', icon_classes: 'gl-mr-0!' }, { class: "#{issue_status_visibility(issuable, status_box: :closed)} #{badge_classes} issuable-status-badge-closed" }) do - .gl-display-none.gl-sm-display-block.gl-ml-2 - = issue_closed_text(issuable, current_user) - - if link - %span.gl-pl-2.gl-sm-display-none - = "(#{link})" - = gl_badge_tag({ variant: :success, icon: 'issues', icon_classes: 'gl-mr-0!' }, { class: "#{issue_status_visibility(issuable, status_box: :open)} #{badge_classes} issuable-status-badge-open" }) do - %span.gl-display-none.gl-sm-display-block.gl-ml-2 - = _('Open') - - #js-issuable-header-warnings{ data: { hidden: issue_hidden?(issuable).to_s } } - = issuable_meta(issuable, @project) - - = render Pajamas::ButtonComponent.new(href: '#', icon: 'chevron-double-lg-left', button_options: { class: 'gl-ml-auto gl-display-block gl-sm-display-none! js-sidebar-toggle' }) - - .js-issue-header-actions{ data: issue_header_actions_data(@project, issuable, current_user, @issuable_sidebar) } diff --git a/app/views/shared/labels/_form.html.haml b/app/views/shared/labels/_form.html.haml index 899b2ed832e..53fbe3dac03 100644 --- a/app/views/shared/labels/_form.html.haml +++ b/app/views/shared/labels/_form.html.haml @@ -1,3 +1,5 @@ +- show_lock_on_merge = local_assigns.fetch(:show_lock_on_merge, false) + = gitlab_ui_form_for @label, as: :label, url: url, html: { class: 'label-form js-quick-submit js-requires-input' } do |f| = form_errors(@label) @@ -21,6 +23,13 @@ .form-text.text-muted = _('Select a color from the color picker or from the presets below.') = render_suggested_colors + - if show_lock_on_merge + .form-group.row + .col-12 + = f.gitlab_ui_checkbox_component :lock_on_merge, + _('Lock label after a merge request is merged'), + help_text: label_lock_on_merge_help_text, + checkbox_options: { disabled: @label.lock_on_merge } .gl-display-flex.gl-justify-content-space-between %div - if @label.persisted? diff --git a/app/views/shared/members/_access_request_links.html.haml b/app/views/shared/members/_access_request_links.html.haml index 94086636d5a..0d692ee753a 100644 --- a/app/views/shared/members/_access_request_links.html.haml +++ b/app/views/shared/members/_access_request_links.html.haml @@ -15,4 +15,4 @@ - elsif source.request_access_enabled && can?(current_user, :request_access, source) = link_to _('Request Access'), polymorphic_path([:request_access, source, :members]), method: :post, - data: { qa_selector: 'request_access_link' } + data: { testid: 'request-access-link' } diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index 1b0eeb424c2..9387d8d3ad1 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -162,10 +162,10 @@ - if milestone_ref.present? .block.reference .sidebar-collapsed-icon.js-dont-change-state - = clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport') + = deprecated_clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport') .gl-display-flex.gl-align-items-center.gl-justify-content-space-between.gl-mb-2.hide-collapsed %span.gl-overflow-hidden.gl-text-overflow-ellipsis.gl-white-space-nowrap = s_('MilestoneSidebar|Reference:') %span{ title: milestone_ref } = milestone_ref - = clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport') + = deprecated_clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport') diff --git a/app/views/shared/packages/_no_packages.html.haml b/app/views/shared/packages/_no_packages.html.haml index 7cc8110fb6b..9f165a198d6 100644 --- a/app/views/shared/packages/_no_packages.html.haml +++ b/app/views/shared/packages/_no_packages.html.haml @@ -3,6 +3,5 @@ .text-content %h4.text-center= _('There are no packages yet') %p - - no_packages_url = help_page_path('administration/packages/index') - - no_packages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: no_packages_url } - = _('Learn how to %{no_packages_link_start}publish and share your packages%{no_packages_link_end} with GitLab.').html_safe % { no_packages_link_start: no_packages_link_start, no_packages_link_end: '</a>'.html_safe } + - link = link_to('', help_page_path('administration/packages/index'), target: '_blank', rel: 'noopener noreferrer') + = safe_format(_('Learn how to %{no_packages_link_start}publish and share your packages%{no_packages_link_end} with GitLab.'), tag_pair(link, :no_packages_link_start, :no_packages_link_end)) diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 95188cefdd1..ac5e65747d5 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -26,8 +26,8 @@ .project-cell{ class: css_class } .project-details.gl-pr-9.gl-sm-pr-0.gl-w-full.gl-display-flex.gl-flex-direction-column{ data: { qa_selector: 'project_content', qa_project_name: project.name } } .gl-display-flex.gl-align-items-center.gl-flex-wrap - %h2.gl-font-base.gl-line-height-20.gl-my-0 - = link_to project_path(project), class: 'text-plain gl-mr-3 js-prefetch-document' do + %h2.gl-font-base.gl-line-height-20.gl-my-0.gl-overflow-wrap-anywhere + = link_to project_path(project), class: 'text-plain gl-mr-3 js-prefetch-document', title: project.name do %span.namespace-name.gl-font-weight-normal - if project.namespace && !skip_namespace = project.namespace.human_name diff --git a/app/views/shared/web_hooks/_hook_errors.html.haml b/app/views/shared/web_hooks/_hook_errors.html.haml index 0e5f6d844cd..bac2f1d7cb0 100644 --- a/app/views/shared/web_hooks/_hook_errors.html.haml +++ b/app/views/shared/web_hooks/_hook_errors.html.haml @@ -1,8 +1,5 @@ -- strong_start = '<strong>'.html_safe -- strong_end = '</strong>'.html_safe -- link_start = '<a href="%{url}">'.html_safe -- link_end = '</a>'.html_safe - +- strong = { strong_start: '<strong>'.html_safe, + strong_end: '</strong>'.html_safe } - if hook.rate_limited? - placeholders = { limit: number_with_delimiter(hook.rate_limit), root_namespace: hook.parent.root_namespace.path } @@ -14,15 +11,11 @@ = render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook failed to connect'), variant: :danger) do |c| - c.with_body do - = s_('Webhooks|The webhook failed to connect, and is disabled. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.').html_safe % { strong_start: strong_start, strong_end: strong_end } + = safe_format(s_('Webhooks|The webhook failed to connect, and is disabled. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.'), strong) - elsif hook.temporarily_disabled? - - help_path = help_page_path('user/project/integrations/webhooks', anchor: 'webhook-fails-or-multiple-webhook-requests-are-triggered') - - placeholders = { strong_start: strong_start, - strong_end: strong_end, - retry_time: time_interval_in_words(hook.disabled_until - Time.now), - help_link_start: link_start % { url: help_path }, - help_link_end: link_end } + - help_link = link_to('', help_page_path('user/project/integrations/webhooks', anchor: 'webhook-fails-or-multiple-webhook-requests-are-triggered'), target: '_blank', rel: 'noopener noreferrer') + - retry_time = { retry_time: time_interval_in_words(hook.disabled_until - Time.now) } = render Pajamas::AlertComponent.new(title: s_('Webhooks|Webhook fails to connect'), variant: :warning) do |c| - c.with_body do - = s_('Webhooks|The webhook %{help_link_start}failed to connect%{help_link_end}, and will retry in %{retry_time}. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.').html_safe % placeholders + = safe_format(s_('Webhooks|The webhook %{help_link_start}failed to connect%{help_link_end}, and will retry in %{retry_time}. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below.'), retry_time, strong, tag_pair(help_link, :help_link_start, :help_link_end)) diff --git a/app/views/shared/web_hooks/_title_and_docs.html.haml b/app/views/shared/web_hooks/_title_and_docs.html.haml index ae32dcea7cb..8ff41b6a1ca 100644 --- a/app/views/shared/web_hooks/_title_and_docs.html.haml +++ b/app/views/shared/web_hooks/_title_and_docs.html.haml @@ -1,4 +1,4 @@ -- webhooks_link_start = '<a href="%{url}">'.html_safe % { url: help_page_path(hook.help_path) } +- webhooks_link = tag_pair(link_to('', help_page_path(hook.help_path), target: '_blank', rel: 'noopener noreferrer'), :webhooks_link_start, :webhooks_link_end) .settings-sticky-header .settings-sticky-header-inner @@ -6,7 +6,7 @@ = page_title - if @project - - integrations_link_start = '<a href="%{url}">'.html_safe % { url: scoped_integrations_path(project: @project) } - %p.gl-text-secondary= _("%{webhooks_link_start}%{webhook_type}%{link_end} enable you to send notifications to web applications in response to events in a group or project. We recommend using an %{integrations_link_start}integration%{link_end} in preference to a webhook.").html_safe % { webhooks_link_start: webhooks_link_start, webhook_type: hook.pluralized_name, integrations_link_start: integrations_link_start, link_end: '</a>'.html_safe } + - integrations_link = tag_pair(link_to('', scoped_integrations_path(project: @project)), :integrations_link_start, :integrations_link_end) + %p.gl-text-secondary= safe_format(_("%{webhooks_link_start}%{webhook_type}%{webhooks_link_end} enable you to send notifications to web applications in response to events in a group or project. We recommend using an %{integrations_link_start}integration%{integrations_link_end} in preference to a webhook."), webhooks_link, integrations_link, webhook_type: hook.pluralized_name) - else - %p.gl-text-secondary= _("%{webhooks_link_start}%{webhook_type}%{link_end} enable you to send notifications to web applications in response to events in a group or project.").html_safe % { webhooks_link_start: webhooks_link_start, webhook_type: hook.pluralized_name, link_end: '</a>'.html_safe } + %p.gl-text-secondary= safe_format(_("%{webhooks_link_start}%{webhook_type}%{webhooks_link_end} enable you to send notifications to web applications in response to events in a group or project."), webhooks_link, webhook_type: hook.pluralized_name) diff --git a/app/views/users/_deletion_guidance.html.haml b/app/views/users/_deletion_guidance.html.haml index 507fe126acb..64b4a8e1ae2 100644 --- a/app/views/users/_deletion_guidance.html.haml +++ b/app/views/users/_deletion_guidance.html.haml @@ -3,8 +3,8 @@ %ul %li %p - - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path("user/profile/account/delete_account", anchor: "associated-records") } - = _('Certain user content will be moved to a system-wide "Ghost User" in order to maintain content for posterity. For further information, please refer to the %{link_start}user account deletion documentation.%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + - link = link_to('', help_page_path("user/profile/account/delete_account", anchor: "associated-records")) + = safe_format(_('Certain user content will be moved to a system-wide "Ghost User" in order to maintain content for posterity. For further information, please refer to the %{link_start}user account deletion documentation.%{link_end}'), tag_pair(link, :link_start, :link_end)) - personal_projects_count = user.personal_projects.count - unless personal_projects_count == 0 %li diff --git a/app/views/users/_profile_basic_info.html.haml b/app/views/users/_profile_basic_info.html.haml index 6de9e80008e..fb9721028d5 100644 --- a/app/views/users/_profile_basic_info.html.haml +++ b/app/views/users/_profile_basic_info.html.haml @@ -5,6 +5,6 @@ - unless Feature.enabled?(:user_profile_overflow_menu_vue) = render 'middle_dot_divider', stacking: true do = s_('UserProfile|User ID: %{id}') % { id: @user.id } - = clipboard_button(title: s_('UserProfile|Copy user ID'), text: @user.id) + = deprecated_clipboard_button(title: s_('UserProfile|Copy user ID'), text: @user.id) = render 'middle_dot_divider', stacking: true do = s_('Member since %{date}') % { date: l(@user.created_at.to_date, format: :long) } diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index e2ddbb90213..a2f6b3da746 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -71,7 +71,7 @@ %p.gl-mb-4.gl-text-gray-500= s_("UserProfile|Pronounced as: %{pronunciation}") % { pronunciation: @user.pronunciation } - if @user.status&.customized? - .cover-status.gl-display-inline-flex.gl-align-items-center.gl-mb-3 + .cover-status.gl-display-inline-flex.gl-align-items-baseline.gl-mb-3 = emoji_icon(@user.status.emoji, class: 'gl-mr-2') = markdown_field(@user.status, :message) = render "users/profile_basic_info" |