diff options
Diffstat (limited to 'app/views/shared')
42 files changed, 126 insertions, 232 deletions
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_content.html.haml b/app/views/shared/issue_type/_details_content.html.haml deleted file mode 100644 index 249e296b41a..00000000000 --- a/app/views/shared/issue_type/_details_content.html.haml +++ /dev/null @@ -1,46 +0,0 @@ -- related_branches_path = related_branches_project_issue_path(@project, issuable) -- api_awards_path = local_assigns.fetch(:api_awards_path, nil) - -.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') } } - .title-container - %h1.title.page-title.gl-font-size-h-display= markdown_field(issuable, :title) - - if issuable.description.present? - .description - .md= markdown_field(issuable, :description) - - = 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 - - .js-issue-widgets - = render 'shared/issue_type/sentry_stack_trace', issuable: issuable - - = render 'projects/issues/design_management' - - = render_if_exists 'projects/issues/work_item_links' - = 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 } } - - - if can?(current_user, :read_code, @project) - - add_page_startup_api_call related_branches_path - #related-branches{ data: { url: related_branches_path } } - -# This element is filled in using JavaScript. - - - if can?(current_user, :admin_feature_flags_issue_links, @project) - = render_if_exists 'projects/issues/related_feature_flags' - - .js-issue-widgets - - = render 'projects/issues/discussion' - -= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @issue.assignees 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/issue_type/_emoji_block.html.haml b/app/views/shared/issue_type/_emoji_block.html.haml deleted file mode 100644 index 7eb3c0f5c9f..00000000000 --- a/app/views/shared/issue_type/_emoji_block.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- api_awards_path = local_assigns.fetch(:api_awards_path, nil) - -.emoji-block.emoji-block-sticky - .row.gl-m-0.gl-justify-content-space-between - .js-noteable-awards - = render 'award_emoji/awards_block', awardable: issuable, inline: true, api_awards_path: api_awards_path - .new-branch-col.gl-font-size-0.gl-my-2 - = render 'new_branch' if show_new_branch_button? diff --git a/app/views/shared/issue_type/_sentry_stack_trace.html.haml b/app/views/shared/issue_type/_sentry_stack_trace.html.haml deleted file mode 100644 index 40b29a74b53..00000000000 --- a/app/views/shared/issue_type/_sentry_stack_trace.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- return unless issuable.sentry_issue.present? -- add_page_specific_style 'page_bundles/error_tracking_details' - -#js-sentry-error-stack-trace{ data: error_details_data(@project, issuable.sentry_issue.sentry_issue_identifier) } 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) |