diff options
Diffstat (limited to 'app/views/shared')
74 files changed, 239 insertions, 231 deletions
diff --git a/app/views/shared/_broadcast_message.html.haml b/app/views/shared/_broadcast_message.html.haml index 3e889900981..e313946a968 100644 --- a/app/views/shared/_broadcast_message.html.haml +++ b/app/views/shared/_broadcast_message.html.haml @@ -3,7 +3,7 @@ %div{ class: "broadcast-message #{'alert-warning' if is_banner} broadcast-#{message.broadcast_type}-message #{opts[:preview] && 'preview'} js-broadcast-notification-#{message.id} gl-display-flex", style: broadcast_message_style(message), dir: 'auto' } .flex-grow-1.text-right.pr-2 - = sprite_icon('bullhorn', size: 16, css_class: 'vertical-align-text-top') + = sprite_icon('bullhorn', css_class: 'vertical-align-text-top') %div{ class: !fluid_layout && 'container-limited' } = render_broadcast_message(message) .flex-grow-1.text-right{ style: 'flex-basis: 0' } diff --git a/app/views/shared/_check_recovery_settings.html.haml b/app/views/shared/_check_recovery_settings.html.haml index e3de34a5ab9..7ac90e5af03 100644 --- a/app/views/shared/_check_recovery_settings.html.haml +++ b/app/views/shared/_check_recovery_settings.html.haml @@ -1,6 +1,6 @@ .gl-alert.gl-alert-warning.js-recovery-settings-callout{ role: 'alert', data: { feature_id: "account_recovery_regular_check", dismiss_endpoint: user_callouts_path, defer_links: "true" } } %button.js-close.gl-alert-dismiss.gl-cursor-pointer{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', size: 16, css_class: 'gl-icon') + = sprite_icon('close', css_class: 'gl-icon') .gl-alert-body - account_link_start = '<a class="deferred-link" href="%{url}">'.html_safe % { url: profile_account_path } = _("Please ensure your account's %{account_link_start}recovery settings%{account_link_end} are up to date.").html_safe % { account_link_start: account_link_start, account_link_end: '</a>'.html_safe } diff --git a/app/views/shared/_confirm_fork_modal.html.haml b/app/views/shared/_confirm_fork_modal.html.haml index db50ea41387..f2a193e0bbc 100644 --- a/app/views/shared/_confirm_fork_modal.html.haml +++ b/app/views/shared/_confirm_fork_modal.html.haml @@ -1,4 +1,4 @@ -#modal-confirm-fork.modal.qa-confirm-fork-modal +#modal-confirm-fork.modal{ data: { qa_selector: 'confirm_fork_modal' } } .modal-dialog .modal-content .modal-header @@ -9,4 +9,4 @@ %p= _("You're not allowed to %{tag_start}edit%{tag_end} files in this project directly. Please fork this project, make your changes there, and submit a merge request.") % { tag_start: '', tag_end: ''} .modal-footer = link_to _('Cancel'), '#', class: "btn btn-cancel", "data-dismiss" => "modal" - = link_to _('Fork project'), fork_path, class: 'btn btn-success', method: :post + = link_to _('Fork project'), fork_path, class: 'btn btn-success', data: { qa_selector: 'fork_project_button' }, method: :post diff --git a/app/views/shared/_confirm_modal.html.haml b/app/views/shared/_confirm_modal.html.haml index ecb462205b0..dc95bcdc756 100644 --- a/app/views/shared/_confirm_modal.html.haml +++ b/app/views/shared/_confirm_modal.html.haml @@ -17,5 +17,5 @@ .form-group = text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' - .form-actions + .form-actions.gl-display-flex.gl-justify-content-end = submit_tag _('Confirm'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button" diff --git a/app/views/shared/_delete_label_modal.html.haml b/app/views/shared/_delete_label_modal.html.haml index 25c841d2344..ffc34ff34c3 100644 --- a/app/views/shared/_delete_label_modal.html.haml +++ b/app/views/shared/_delete_label_modal.html.haml @@ -8,7 +8,7 @@ .modal-body %p - = _('<strong>%{label_name}</strong> <span>will be permanently deleted from %{subject_name}. This cannot be undone.</span>').html_safe % { label_name: label.name, subject_name: label.subject_name } + = html_escape(_('%{label_name} %{span_open}will be permanently deleted from %{subject_name}. This cannot be undone.%{span_close}')) % { label_name: tag.strong(label.name), subject_name: label.subject_name, span_open: '<span>'.html_safe, span_close: '</span>'.html_safe } .modal-footer %a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= _('Cancel') diff --git a/app/views/shared/_field.html.haml b/app/views/shared/_field.html.haml deleted file mode 100644 index 076c87400e0..00000000000 --- a/app/views/shared/_field.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -- name = field[:name] -- title = field[:title] || name.humanize -- value = @service.send(name) -- type = field[:type] -- placeholder = field[:placeholder] -- autocomplete = field[:autocomplete] -- required = field[:required] -- choices = field[:choices] -- default_choice = field[:default_choice] -- help = field[:help] - -.form-group.row - - if type == "password" && value.present? - = form.label name, _("Enter new %{field_title}") % { field_title: title.downcase }, class: "col-form-label col-sm-2" - - else - = form.label name, title, class: "col-form-label col-sm-2" - .col-sm-10 - - if type == 'text' - = form.text_field name, class: "form-control", autocomplete: autocomplete, placeholder: placeholder, required: required, data: { qa_selector: "#{name.downcase.gsub('\s', '')}_field" } - - elsif type == 'textarea' - = form.text_area name, rows: 5, class: "form-control", placeholder: placeholder, required: required - - elsif type == 'checkbox' - = form.check_box name - - elsif type == 'select' - = form.select name, options_for_select(choices, value || default_choice), {}, { class: "form-control"} - - elsif type == 'password' - = form.password_field name, autocomplete: "new-password", placeholder: placeholder, class: "form-control", required: value.blank? && required, data: { qa_selector: "#{name.downcase.gsub('\s', '')}_field" } - - if help - %span.form-text.text-muted= help diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml index b9952d6832f..a99c992af49 100644 --- a/app/views/shared/_file_highlight.html.haml +++ b/app/views/shared/_file_highlight.html.haml @@ -1,7 +1,7 @@ .file-content.code.js-syntax-highlight .line-numbers - if blob.data.present? - - link_icon = icon('link') + - link_icon = sprite_icon('link', size: 12) - link = blob_link if defined?(blob_link) - blob.data.each_line.each_with_index do |_, index| - offset = defined?(first_line_number) ? first_line_number : 1 diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index 09b9cd448bb..d497937833a 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -31,11 +31,11 @@ = _('Group path is already taken. Suggestions: ') %span.gl-path-suggestions %p.validation-success.gl-field-success.field-validation.hide= _('Group path is available.') - %p.validation-pending.gl-field-error-ignore.field-validation.hide= _('Checking group path availability...') + %p.validation-pending.gl-field-error-ignore.field-validation.hide= _('Checking group URL availability...') - if @group.persisted? - .alert.alert-warning.prepend-top-10 - = _('Changing group path can have unintended side effects.') + .alert.alert-warning.gl-mt-3 + = _('Changing group URL can have unintended side effects.') = succeed '.' do = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank' diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index b2ea45d6f1a..36d8aab6d53 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -26,8 +26,8 @@ .well-segment %ul %li - = _('The repository must be accessible over <code>http://</code>, <code>https://</code> or <code>git://</code>.').html_safe - %li= _('When using the <code>http://</code> or <code>https://</code> protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.').html_safe + = html_escape(_('The repository must be accessible over %{code_open}http://%{code_close}, %{code_open}https://%{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 = _('If your HTTP repository is not publicly accessible, add your credentials.') %li diff --git a/app/views/shared/_issuable_meta_data.html.haml b/app/views/shared/_issuable_meta_data.html.haml index d704eae2090..3eb27f002ef 100644 --- a/app/views/shared/_issuable_meta_data.html.haml +++ b/app/views/shared/_issuable_meta_data.html.haml @@ -11,15 +11,15 @@ - if upvotes > 0 %li.issuable-upvotes.d-none.d-sm-block.has-tooltip{ title: _('Upvotes') } - = sprite_icon('thumb-up', size: 16, css_class: "vertical-align-middle") + = sprite_icon('thumb-up', css_class: "vertical-align-middle") = upvotes - if downvotes > 0 %li.issuable-downvotes.d-none.d-sm-block.has-tooltip{ title: _('Downvotes') } - = sprite_icon('thumb-down', size: 16, css_class: "vertical-align-middle") + = sprite_icon('thumb-down', css_class: "vertical-align-middle") = downvotes %li.issuable-comments.d-none.d-sm-block - = link_to issuable_path, class: ['has-tooltip', ('no-comments' if note_count.zero?)], title: _('Comments') do - = sprite_icon('comments', size: 16, css_class: 'gl-vertical-align-text-bottom') + = link_to issuable_path, class: ['has-tooltip', ('no-comments' if note_count == 0)], title: _('Comments') do + = sprite_icon('comments', css_class: 'gl-vertical-align-text-bottom') = note_count diff --git a/app/views/shared/_issues.html.haml b/app/views/shared/_issues.html.haml index a21dcabb485..0f38d0e3b39 100644 --- a/app/views/shared/_issues.html.haml +++ b/app/views/shared/_issues.html.haml @@ -1,5 +1,5 @@ - if @issues.to_a.any? - .card.card-small.card-without-border + .card.card-without-border %ul.content-list.issues-list.issuable-list{ class: ("manual-ordering" if @sort == 'relative_position'), data: { group_full_path: @group&.full_path } } = render partial: 'projects/issues/issue', collection: @issues = paginate @issues, theme: "gitlab" diff --git a/app/views/shared/_md_preview.html.haml b/app/views/shared/_md_preview.html.haml index c3818b9f7ae..c7c36d79fa0 100644 --- a/app/views/shared/_md_preview.html.haml +++ b/app/views/shared/_md_preview.html.haml @@ -2,7 +2,7 @@ - if defined?(@merge_request) && @merge_request.discussion_locked? .issuable-note-warning - = sprite_icon('lock', size: 16, css_class: 'icon') + = sprite_icon('lock', css_class: 'icon') %span = _('This merge request is locked.') = _('Only project members can comment.') diff --git a/app/views/shared/_merge_requests.html.haml b/app/views/shared/_merge_requests.html.haml index 700ec4b606f..d280df8b370 100644 --- a/app/views/shared/_merge_requests.html.haml +++ b/app/views/shared/_merge_requests.html.haml @@ -1,5 +1,5 @@ - if @merge_requests.to_a.any? - .card.card-small.card-without-border + .card.card-without-border %ul.content-list.mr-list.issuable-list = render partial: 'projects/merge_requests/merge_request', collection: @merge_requests diff --git a/app/views/shared/_new_project_item_select.html.haml b/app/views/shared/_new_project_item_select.html.haml index ffa61c9d1a9..47fb38d979d 100644 --- a/app/views/shared/_new_project_item_select.html.haml +++ b/app/views/shared/_new_project_item_select.html.haml @@ -1,7 +1,7 @@ - if any_projects?(@projects) .project-item-select-holder.btn-group %a.btn.btn-success.new-project-item-link.qa-new-project-item-link{ href: '', data: { label: local_assigns[:label], type: local_assigns[:type] } } - = icon('spinner spin') + = loading_icon(color: 'light') = project_select_tag :project_path, class: "project-item-select", data: { include_groups: local_assigns[:include_groups], order_by: 'last_activity_at', relative_path: local_assigns[:path], with_shared: local_assigns[:with_shared], include_projects_in_subgroups: local_assigns[:include_projects_in_subgroups] }, with_feature_enabled: local_assigns[:with_feature_enabled] - %button.btn.btn-success.new-project-item-select-button.qa-new-project-item-select-button - = icon('caret-down') + %button.btn.btn-success.new-project-item-select-button.qa-new-project-item-select-button.gl-p-0 + = sprite_icon('chevron-down') diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml index 2b04e3e1c98..abf39fdc644 100644 --- a/app/views/shared/_no_ssh.html.haml +++ b/app/views/shared/_no_ssh.html.haml @@ -1,8 +1,8 @@ - if show_no_ssh_key_message? %div{ class: 'no-ssh-key-message gl-alert gl-alert-warning', role: 'alert' } - = sprite_icon('warning', size: 16, css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title') + = sprite_icon('warning', css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title') %button{ class: 'gl-alert-dismiss hide-no-ssh-message', type: 'button', 'aria-label': _('Dismiss') } - = sprite_icon('close', size: 16, css_class: 'gl-icon s16') + = sprite_icon('close', css_class: 'gl-icon s16') .gl-alert-body = s_("MissingSSHKeyWarningLink|You won't be able to pull or push project code via SSH until you add an SSH key to your profile").html_safe .gl-alert-actions diff --git a/app/views/shared/_outdated_browser.html.haml b/app/views/shared/_outdated_browser.html.haml index 30255e18f04..624cc99440c 100644 --- a/app/views/shared/_outdated_browser.html.haml +++ b/app/views/shared/_outdated_browser.html.haml @@ -1,6 +1,6 @@ - if outdated_browser? .gl-alert.gl-alert-danger.outdated-browser{ :role => "alert" } - = sprite_icon('error', size: 16, css_class: "gl-alert-icon gl-alert-icon-no-title gl-icon") + = sprite_icon('error', css_class: "gl-alert-icon gl-alert-icon-no-title gl-icon") .gl-alert-body - if browser.ie? && browser.version.to_i == 11 - feedback_link_url = 'https://gitlab.com/gitlab-org/gitlab/issues/197987' diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 7d93dca22f5..2425bcf61d9 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -11,28 +11,3 @@ - if @admin_integration .js-vue-admin-integration-settings{ data: integration_form_data(@admin_integration) } .js-vue-integration-settings{ data: integration_form_data(integration) } - - - if show_service_trigger_events?(integration) - .form-group.row - %label.col-form-label.col-sm-2= _('Trigger') - - .col-sm-10 - - integration.configurable_events.each do |event| - .form-group - .form-check - = form.check_box service_event_field_name(event), class: 'form-check-input' - = form.label service_event_field_name(event), class: 'form-check-label' do - %strong - = event.humanize - - - field = integration.event_field(event) - - - if field - = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder] - - %p.text-muted - = integration.class.event_description(event) - - - unless integration_form_refactor? - - integration.global_fields.each do |field| - = render 'shared/field', form: form, field: field diff --git a/app/views/shared/_sidebar_toggle_button.html.haml b/app/views/shared/_sidebar_toggle_button.html.haml index 1431966c83d..9d1970093b8 100644 --- a/app/views/shared/_sidebar_toggle_button.html.haml +++ b/app/views/shared/_sidebar_toggle_button.html.haml @@ -4,5 +4,5 @@ %span.collapse-text= _("Collapse sidebar") = button_tag class: 'close-nav-button', type: 'button' do - = sprite_icon('close', size: 16) + = sprite_icon('close') %span.collapse-text= _("Close sidebar") diff --git a/app/views/shared/_zen.html.haml b/app/views/shared/_zen.html.haml index 914409d0e65..66e0ecadb65 100644 --- a/app/views/shared/_zen.html.haml +++ b/app/views/shared/_zen.html.haml @@ -15,5 +15,5 @@ qa_selector: qa_selector } - else = text_area_tag attr, current_text, data: { qa_selector: qa_selector }, class: classes, placeholder: placeholder - %a.zen-control.zen-control-leave.js-zen-leave.gl-text-gray-700{ href: "#" } - = sprite_icon('compress', size: 16) + %a.zen-control.zen-control-leave.js-zen-leave.gl-text-gray-500{ href: "#" } + = sprite_icon('compress') diff --git a/app/views/shared/access_tokens/_table.html.haml b/app/views/shared/access_tokens/_table.html.haml index 55231cb9429..ceac4d1820d 100644 --- a/app/views/shared/access_tokens/_table.html.haml +++ b/app/views/shared/access_tokens/_table.html.haml @@ -42,7 +42,7 @@ = _('In %{time_to_now}') % { time_to_now: distance_of_time_in_words_to_now(token.expires_at) } - else %span.token-never-expires-label= _('Never') - %td= token.scopes.present? ? token.scopes.join(', ') : _('<no scopes selected>') + %td= token.scopes.present? ? token.scopes.join(', ') : html_escape_once(_('<no scopes selected>')).html_safe %td= link_to _('Revoke'), revoke_route_helper.call(token), method: :put, class: 'btn btn-danger float-right qa-revoke-button', data: { confirm: _('Are you sure you want to revoke this %{type}? This action cannot be undone.') % { type: type } } - else .settings-message.text-center diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml index b68c7cd4d52..7a4c495e177 100644 --- a/app/views/shared/boards/_show.html.haml +++ b/app/views/shared/boards/_show.html.haml @@ -32,7 +32,7 @@ - else .boards-list.w-100.py-3.px-2.text-nowrap{ data: { qa_selector: "boards_list" } } .boards-app-loading.w-100.text-center{ "v-if" => "loading" } - = icon("spinner spin 2x") + = loading_icon(css_class: 'gl-mb-3') %board{ "v-cloak" => "true", "v-for" => "list in state.lists", "ref" => "board", diff --git a/app/views/shared/boards/components/sidebar/_due_date.html.haml b/app/views/shared/boards/components/sidebar/_due_date.html.haml index 117d56b30f5..d8ed3b13bf1 100644 --- a/app/views/shared/boards/components/sidebar/_due_date.html.haml +++ b/app/views/shared/boards/components/sidebar/_due_date.html.haml @@ -1,9 +1,9 @@ .block.due_date - .title + .title.gl-h-5.gl-display-flex.gl-align-items-center = _("Due date") - if can_admin_issue? - = icon("spinner spin", class: "block-loading") - = link_to _("Edit"), "#", class: "js-sidebar-dropdown-toggle edit-link float-right" + = loading_icon(css_class: 'gl-ml-2 block-loading') + = link_to _("Edit"), "#", class: "js-sidebar-dropdown-toggle edit-link gl-ml-auto" .value .value-content %span.no-value{ "v-if" => "!issue.dueDate" } diff --git a/app/views/shared/boards/components/sidebar/_labels.html.haml b/app/views/shared/boards/components/sidebar/_labels.html.haml index 58ffa3942ef..61f3ebcdba4 100644 --- a/app/views/shared/boards/components/sidebar/_labels.html.haml +++ b/app/views/shared/boards/components/sidebar/_labels.html.haml @@ -1,9 +1,9 @@ .block.labels - .title + .title.gl-h-5.gl-display-flex.gl-align-items-center = _("Labels") - if can_admin_issue? - = icon("spinner spin", class: "block-loading") - = link_to _("Edit"), "#", class: "js-sidebar-dropdown-toggle edit-link float-right" + = loading_icon(css_class: 'gl-ml-2 block-loading') + = link_to _("Edit"), "#", class: "js-sidebar-dropdown-toggle edit-link gl-ml-auto" .value.issuable-show-labels.dont-hide %span.no-value{ "v-if" => "issue.labels && issue.labels.length === 0" } = _("None") diff --git a/app/views/shared/boards/components/sidebar/_milestone.html.haml b/app/views/shared/boards/components/sidebar/_milestone.html.haml index b15d60002fc..510e05ce888 100644 --- a/app/views/shared/boards/components/sidebar/_milestone.html.haml +++ b/app/views/shared/boards/components/sidebar/_milestone.html.haml @@ -1,9 +1,9 @@ .block.milestone - .title + .title.gl-h-5.gl-display-flex.gl-align-items-center = _("Milestone") - if can_admin_issue? - = icon("spinner spin", class: "block-loading") - = link_to _("Edit"), "#", class: "js-sidebar-dropdown-toggle edit-link float-right" + = loading_icon(css_class: 'gl-ml-2 block-loading') + = link_to _("Edit"), "#", class: "js-sidebar-dropdown-toggle edit-link gl-ml-auto" .value %span.no-value{ "v-if" => "!issue.milestone" } = _("None") diff --git a/app/views/shared/buttons/_project_feature_toggle.html.haml b/app/views/shared/buttons/_project_feature_toggle.html.haml index 0f630786455..321fbee1b35 100644 --- a/app/views/shared/buttons/_project_feature_toggle.html.haml +++ b/app/views/shared/buttons/_project_feature_toggle.html.haml @@ -12,5 +12,5 @@ - if yield.present? = yield %span.toggle-icon - = sprite_icon('status_success_borderless', size: 16, css_class: 'toggle-icon-svg toggle-status-checked') - = sprite_icon('status_failed_borderless', size: 16, css_class: 'toggle-icon-svg toggle-status-unchecked') + = sprite_icon('status_success_borderless', size: 18, css_class: 'gl-text-blue-500 toggle-status-checked') + = sprite_icon('status_failed_borderless', size: 18, css_class: 'gl-text-gray-400 toggle-status-unchecked') diff --git a/app/views/shared/deploy_keys/_index.html.haml b/app/views/shared/deploy_keys/_index.html.haml index 358075b9e44..f2f577383f8 100644 --- a/app/views/shared/deploy_keys/_index.html.haml +++ b/app/views/shared/deploy_keys/_index.html.haml @@ -1,5 +1,5 @@ - expanded = expanded_by_default? -%section.qa-deploy-keys-settings.settings.no-animate#js-deploy-keys-settings{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_keys_settings' } } +%section.qa-deploy-keys-settings.settings.no-animate#js-deploy-keys-settings{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_keys_settings_content' } } .settings-header %h4= _('Deploy Keys') %button.btn.js-settings-toggle{ type: 'button' } 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 4e569050827..815967b0372 100644 --- a/app/views/shared/deploy_keys/_project_group_form.html.haml +++ b/app/views/shared/deploy_keys/_project_group_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @deploy_keys.new_key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input container" } do |f| += form_for [@project.namespace, @project, @deploy_keys.new_key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input container" } do |f| = form_errors(@deploy_keys.new_key) .form-group.row = f.label :title, class: "label-bold" @@ -20,5 +20,5 @@ %p.light.gl-mb-0 = _('Allow this key to push to repository as well? (Default only allows pull access.)') - .form-group.row - = f.submit "Add key", class: "btn-success btn" + .form-group.row.gl-display-flex.gl-justify-content-end + = f.submit _("Add key"), class: "btn-success btn" diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index 8d74e12e943..1eda439c9a5 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -45,5 +45,5 @@ = label_tag ("deploy_token_write_package_registry"), 'write_package_registry', class: 'label-bold form-check-label' .text-secondary= s_('DeployTokens|Allows write access to the package registry') - .gl-mt-3 + .gl-mt-3.gl-display-flex.gl-justify-content-end = f.submit s_('DeployTokens|Create deploy token'), class: 'btn btn-success qa-create-deploy-token' diff --git a/app/views/shared/deploy_tokens/_index.html.haml b/app/views/shared/deploy_tokens/_index.html.haml index 8203b378297..540b9b0054f 100644 --- a/app/views/shared/deploy_tokens/_index.html.haml +++ b/app/views/shared/deploy_tokens/_index.html.haml @@ -1,6 +1,6 @@ - expanded = expand_deploy_tokens_section?(@new_deploy_token) -%section.qa-deploy-tokens-settings.settings.no-animate#js-deploy-tokens{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_tokens_settings' } } +%section.qa-deploy-tokens-settings.settings.no-animate#js-deploy-tokens{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_tokens_settings_content' } } .settings-header %h4= s_('DeployTokens|Deploy Tokens') %button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } diff --git a/app/views/shared/deploy_tokens/_table.html.haml b/app/views/shared/deploy_tokens/_table.html.haml index d4e20805a2a..ad73442807e 100644 --- a/app/views/shared/deploy_tokens/_table.html.haml +++ b/app/views/shared/deploy_tokens/_table.html.haml @@ -23,7 +23,7 @@ In #{distance_of_time_in_words_to_now(token.expires_at)} - else %span.token-never-expires-label= _('Never') - %td= token.scopes.present? ? token.scopes.join(", ") : _('<no scopes selected>') + %td= token.scopes.present? ? token.scopes.join(", ") : html_escape_once(_('<no scopes selected>')).html_safe %td= link_to s_('DeployTokens|Revoke'), "#", class: "btn btn-danger float-right", data: { toggle: "modal", target: "#revoke-modal-#{token.id}"} = render 'shared/deploy_tokens/revoke_modal', token: token, group_or_project: group_or_project - else diff --git a/app/views/shared/empty_states/_deploy_keys.html.haml b/app/views/shared/empty_states/_deploy_keys.html.haml new file mode 100644 index 00000000000..da34b866aa6 --- /dev/null +++ b/app/views/shared/empty_states/_deploy_keys.html.haml @@ -0,0 +1,9 @@ +.empty-state.gl-display-flex.gl-flex-direction-column.gl-flex-wrap.gl-text-center + .gl-flex-grow-0.gl-flex-shrink-0 + .svg-250.svg-content + = image_tag 'illustrations/empty-state/empty-deploy-keys-lg.svg' + .gl-flex-grow-0.gl-flex-shrink-0 + .text-content.gl-mx-auto.gl-my-0.gl-p-5 + %h4.h4= _('Deploy keys allow read-only or read-write (if enabled) access to your repository') + %p= _('Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.') + = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-md gl-button' diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml index eb5637acca0..3fd64291fb2 100644 --- a/app/views/shared/empty_states/_issues.html.haml +++ b/app/views/shared/empty_states/_issues.html.haml @@ -20,7 +20,7 @@ = _("To widen your search, change or remove filters above") - if show_new_issue_link?(@project) .text-center - = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success", id: "new_issue_body_link" + = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success" - elsif is_opened_state && opened_issues_count == 0 && closed_issues_count > 0 %h4.text-center = _("There are no open issues") @@ -28,7 +28,7 @@ = _("To keep this project going, create a new issue") - if show_new_issue_link?(@project) .text-center - = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success", id: "new_issue_body_link" + = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success" - elsif is_closed_state && opened_issues_count > 0 && closed_issues_count == 0 %h4.text-center = _("There are no closed issues") @@ -46,6 +46,16 @@ - if show_import_button = render 'projects/issues/import_csv/button', type: :text + %hr + %p.gl-text-center.gl-mb-0 + %strong + = s_('JiraService|Using Jira for issue tracking?') + %p.gl-text-center.gl-mb-0 + - jira_docs_link_url = help_page_url('user/project/integrations/jira', anchor: 'view-jira-issues-premium') + - jira_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: jira_docs_link_url } + = html_escape(s_('JiraService|%{jira_docs_link_start}Enable the Jira integration%{jira_docs_link_end} to view your Jira issues in GitLab.')) % { jira_docs_link_start: jira_docs_link_start.html_safe, jira_docs_link_end: '</a>'.html_safe } + %p.gl-text-center.gl-mb-0.gl-text-gray-500 + = s_('JiraService|This feature requires a Premium plan.') - else %h4.text-center= _("There are no issues to show") diff --git a/app/views/shared/empty_states/_merge_requests.html.haml b/app/views/shared/empty_states/_merge_requests.html.haml index be5b1c6b6ce..837c3afc796 100644 --- a/app/views/shared/empty_states/_merge_requests.html.haml +++ b/app/views/shared/empty_states/_merge_requests.html.haml @@ -20,7 +20,7 @@ = _("To widen your search, change or remove filters above") .text-center - if can_create_merge_request - = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request"), id: "new_merge_request_body_link" + = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request") - elsif is_opened_state && opened_merged_count == 0 && closed_merged_count > 0 %h4.text-center = _("There are no open merge requests") @@ -28,7 +28,7 @@ = _("To keep this project going, create a new merge request") .text-center - if can_create_merge_request - = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request"), id: "new_merge_request_body_link" + = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request") - elsif is_closed_state && opened_merged_count > 0 && closed_merged_count == 0 %h4.text-center = _("There are no closed merge requests") diff --git a/app/views/shared/groups/_group.html.haml b/app/views/shared/groups/_group.html.haml index 5dac400bd5e..164773f9b60 100644 --- a/app/views/shared/groups/_group.html.haml +++ b/app/views/shared/groups/_group.html.haml @@ -16,14 +16,14 @@ .description = markdown_field(group, :description) - .stats.gl-text-gray-700.gl-flex-shrink-0 + .stats.gl-text-gray-500.gl-flex-shrink-0 %span.gl-ml-5 - = icon('bookmark') + = sprite_icon('bookmark', css_class: 'gl-vertical-align-text-bottom') = number_with_delimiter(group.projects.non_archived.count) %span.gl-ml-5 - = icon('users') + = sprite_icon('users', css_class: 'gl-vertical-align-text-bottom') = number_with_delimiter(group.users.count) %span.gl-ml-5.visibility-icon.has-tooltip{ data: { container: 'body', placement: 'left' }, title: visibility_icon_description(group) } - = visibility_level_icon(group.visibility_level, fw: false) + = visibility_level_icon(group.visibility_level) diff --git a/app/views/shared/integrations/_form.html.haml b/app/views/shared/integrations/_form.html.haml index 4ec7f286c7a..5826cb280bd 100644 --- a/app/views/shared/integrations/_form.html.haml +++ b/app/views/shared/integrations/_form.html.haml @@ -1,14 +1,15 @@ - integration = local_assigns.fetch(:integration) -%h3.page-title - = integration.title - -%p= integration.description - -= form_for integration, as: :service, url: scoped_integration_path(integration), method: :put, html: { class: 'gl-show-field-errors fieldset-form integration-settings-form js-integration-settings-form', data: { 'can-test' => integration.can_test?, 'test-url' => scoped_test_integration_path(integration) } } do |form| - = render 'shared/service_settings', form: form, integration: integration - - - if integration.editable? - .footer-block.row-content-block - = service_save_button - = link_to _('Cancel'), scoped_integration_path(integration), class: 'btn btn-cancel' +.row.gl-mt-3 + .col-lg-4 + %h3.page-title.gl-mt-0 + = integration.title + + .col-lg-8 + = form_for integration, as: :service, url: scoped_integration_path(integration), method: :put, html: { class: 'gl-show-field-errors integration-settings-form js-integration-settings-form', data: { 'can-test' => integration.can_test?, 'test-url' => scoped_test_integration_path(integration) } } do |form| + = render 'shared/service_settings', form: form, integration: integration + + - if integration.editable? + .footer-block.row-content-block + = service_save_button + = link_to _('Cancel'), scoped_integration_path(integration), class: 'btn btn-cancel' diff --git a/app/views/shared/issuable/_assignees.html.haml b/app/views/shared/issuable/_assignees.html.haml index cec865ec8de..8e46db6dea2 100644 --- a/app/views/shared/issuable/_assignees.html.haml +++ b/app/views/shared/issuable/_assignees.html.haml @@ -6,5 +6,5 @@ - issuable.assignees.take(render_count).each do |assignee| # rubocop: disable CodeReuse/ActiveRecord = link_to_member(@project, assignee, name: false, title: "Assigned to :name") -- if more_assignees_count.positive? - %span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', 'original-title' => "+#{more_assignees_count} more assignees", qa_selector: 'avatar_counter' } } +#{more_assignees_count} +- if more_assignees_count > 0 + %span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', 'original-title' => "+#{more_assignees_count} more assignees", qa_selector: 'avatar_counter_content' } } +#{more_assignees_count} diff --git a/app/views/shared/issuable/_bulk_update_sidebar.html.haml b/app/views/shared/issuable/_bulk_update_sidebar.html.haml index ec7ff127ed5..0c15d20bfe0 100644 --- a/app/views/shared/issuable/_bulk_update_sidebar.html.haml +++ b/app/views/shared/issuable/_bulk_update_sidebar.html.haml @@ -4,23 +4,24 @@ %aside.issues-bulk-update.js-right-sidebar.right-sidebar{ "aria-live" => "polite", data: { 'signed-in': current_user.present? } } .issuable-sidebar.hidden - = form_tag [:bulk_update, @project.namespace.becomes(Namespace), @project, type], method: :post, class: "bulk-update" do + = form_tag [:bulk_update, @project, type], method: :post, class: "bulk-update" do .block.issuable-sidebar-header .filter-item.inline.update-issues-btn.float-left = button_tag _('Update all'), class: "btn update-selected-issues btn-info", disabled: true = button_tag _('Cancel'), class: "btn btn-default js-bulk-update-menu-hide float-right" - .block - .title - = _('Status') - .filter-item - = dropdown_tag(_("Select status"), options: { toggle_class: "js-issue-status", title: _("Change status"), dropdown_class: "dropdown-menu-status dropdown-menu-selectable", data: { field_name: "update[state_event]", default_label: _("Status") } } ) do - %ul - %li - %a{ href: "#", data: { id: "reopen" } } - = _('Open') - %li - %a{ href: "#", data: { id: "close" } } - = _('Closed') + - if params[:state] != 'merged' + .block + .title + = _('Status') + .filter-item + = dropdown_tag(_("Select status"), options: { toggle_class: "js-issue-status", title: _("Change status"), dropdown_class: "dropdown-menu-status dropdown-menu-selectable", data: { field_name: "update[state_event]", default_label: _("Status") } } ) do + %ul + %li + %a{ href: "#", data: { id: "reopen" } } + = _('Open') + %li + %a{ href: "#", data: { id: "close" } } + = _('Closed') .block .title = _('Assignee') diff --git a/app/views/shared/issuable/_feed_buttons.html.haml b/app/views/shared/issuable/_feed_buttons.html.haml index 4fed95e2607..86c2e243718 100644 --- a/app/views/shared/issuable/_feed_buttons.html.haml +++ b/app/views/shared/issuable/_feed_buttons.html.haml @@ -1,4 +1,4 @@ -= link_to safe_params.merge(rss_url_options), class: 'btn has-tooltip js-rss-button', data: { container: 'body' }, title: _('Subscribe to RSS feed') do - = sprite_icon('rss') += link_to safe_params.merge(rss_url_options), class: 'btn btn-svg has-tooltip', data: { container: 'body', testid: 'rss-feed-link' }, title: _('Subscribe to RSS feed') do + = sprite_icon('rss', css_class: 'qa-rss-icon') = link_to safe_params.merge(calendar_url_options), class: 'btn has-tooltip', data: { container: 'body' }, title: _('Subscribe to calendar') do = sprite_icon('calendar') diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index f54457b8b33..86cd2923fac 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -9,7 +9,7 @@ .alert.alert-danger Someone edited the #{issuable.class.model_name.human.downcase} the same time you did. Please check out - = link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), target: "_blank", rel: 'noopener noreferrer' + = link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project, issuable]), target: "_blank", rel: 'noopener noreferrer' and make sure your changes will not unintentionally remove theirs = render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form @@ -63,11 +63,11 @@ .row-content-block{ class: (is_footer ? "footer-block" : "middle-block") } .float-right - if issuable.new_record? - = link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable.class]), class: 'btn btn-cancel' + = link_to 'Cancel', polymorphic_path([@project, issuable.class]), class: 'btn btn-cancel' - else - if can?(current_user, :"destroy_#{issuable.to_ability_name}", @project) - = link_to 'Delete', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable], params: { destroy_confirm: true }), data: { confirm: "#{issuable.human_class_name} will be removed! Are you sure?" }, method: :delete, class: 'btn btn-danger btn-grouped' - = link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), class: 'btn btn-grouped btn-cancel' + = link_to 'Delete', polymorphic_path([@project, issuable], params: { destroy_confirm: true }), data: { confirm: "#{issuable.human_class_name} will be removed! Are you sure?" }, method: :delete, class: 'btn btn-danger btn-grouped' + = link_to 'Cancel', polymorphic_path([@project, issuable]), class: 'btn btn-grouped btn-cancel' %span.gl-mr-3 - if issuable.new_record? @@ -76,11 +76,14 @@ = form.submit 'Save changes', class: 'btn btn-success' - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = issuable.project.present.contribution_guide_path) - .inline.prepend-top-10 + .inline.gl-mt-3 Please review the %strong= link_to('contribution guidelines', guide_url) for this project. = render_if_exists 'shared/issuable/remove_approver' +- if issuable.respond_to?(:issue_type) + = form.hidden_field :issue_type + = form.hidden_field :lock_version diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index 0b5700e5413..3f3b9146e71 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -20,7 +20,8 @@ .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row .filtered-search-box - if type != :boards_modal && type != :boards - = dropdown_tag(_('Recent searches'), + - text = tag.span(sprite_icon('history'), class: "d-md-none") + tag.span(_('Recent searches'), class: "d-none d-md-inline") + = dropdown_tag(text, options: { wrapper_class: "filtered-search-history-dropdown-wrapper", toggle_class: "btn filtered-search-history-dropdown-toggle-button", dropdown_class: "filtered-search-history-dropdown", @@ -173,7 +174,7 @@ = render 'shared/issuable/board_create_list_dropdown', board: board - if @project #js-add-issues-btn.gl-ml-3{ data: { can_admin_list: can?(current_user, :admin_list, @project) } } - - if Feature.enabled?(:boards_with_swimlanes, @group) + - if current_user && Feature.enabled?(:boards_with_swimlanes, @group) #js-board-epics-swimlanes-toggle #js-toggle-focus-btn - elsif is_not_boards_modal_or_productivity_analytics && show_sorting_dropdown diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 00113b2c2c0..6f31d7290b7 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -32,7 +32,7 @@ - milestone = issuable_sidebar[:milestone] || {} .block.milestone{ data: { qa_selector: 'milestone_block' } } .sidebar-collapsed-icon.has-tooltip{ title: sidebar_milestone_tooltip_label(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } } - = icon('clock-o', 'aria-hidden': 'true') + = sprite_icon('clock') %span.milestone-title.collapse-truncated-title - if milestone.present? = milestone[:title] diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 1823c5279e5..30a1f0febc3 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -9,7 +9,7 @@ .form-group.row.d-flex.gl-pl-3-deprecated-no-really-do-not-use-me.gl-pr-3-deprecated-no-really-do-not-use-me.branch-selector .align-self-center %span - = _('From <code>%{source_title}</code> into').html_safe % { source_title: source_title } + = html_escape(_('From %{code_open}%{source_title}%{code_close} into')) % { source_title: source_title, code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - if issuable.new_record? %code#js-target-branch-title= target_title @@ -17,7 +17,9 @@ = link_to _('Change branches'), mr_change_branches_path(issuable) - elsif issuable.for_fork? %code= issuable.target_project_path + ":" - - unless issuable.new_record? + - if issuable.merged? + %code= target_title + - unless issuable.new_record? || issuable.merged? %span.dropdown.gl-ml-2.d-inline-block = form.hidden_field(:target_branch, { class: 'target_branch js-target-branch-select ref-name mw-xl', diff --git a/app/views/shared/issuable/form/_merge_params.html.haml b/app/views/shared/issuable/form/_merge_params.html.haml index 6f1023474a1..5c5c8c816d3 100644 --- a/app/views/shared/issuable/form/_merge_params.html.haml +++ b/app/views/shared/issuable/form/_merge_params.html.haml @@ -27,5 +27,5 @@ Squash commits when merge request is accepted. = link_to icon('question-circle'), help_page_path('user/project/merge_requests/squash_and_merge'), target: '_blank' - if project.squash_always? - .gl-text-gray-600 + .gl-text-gray-400 = _('Required in this project.') diff --git a/app/views/shared/issuable/form/_title.html.haml b/app/views/shared/issuable/form/_title.html.haml index 355a6627b8f..98c9f73fa3a 100644 --- a/app/views/shared/issuable/form/_title.html.haml +++ b/app/views/shared/issuable/form/_title.html.haml @@ -3,6 +3,13 @@ - form = local_assigns.fetch(:form) - no_issuable_templates = issuable_templates(issuable).empty? - div_class = no_issuable_templates ? 'col-sm-10' : 'col-sm-7 col-lg-8' +- toggle_wip_link_start = '<a href="" class="js-toggle-wip">' +- toggle_wip_link_end = '</a>' +- draft_snippet = '<code>Draft:</code>'.html_safe +- wip_snippet = '<code>WIP:</code>'.html_safe +- draft_or_wip_snippet = '<code>Draft/WIP</code>'.html_safe +- add_wip_text = (_('%{link_start}Start the title with %{draft_snippet} or %{wip_snippet}%{link_end} to prevent a merge request that is a work in progress from being merged before it\'s ready.') % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: draft_snippet, wip_snippet: wip_snippet } ).html_safe +- remove_wip_text = (_('%{link_start}Remove the %{draft_or_wip_snippet} prefix%{link_end} from the title to allow this merge request to be merged when it\'s ready.' ) % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_or_wip_snippet: draft_or_wip_snippet } ).html_safe %div{ class: div_class } = form.text_field :title, required: true, maxlength: 255, autofocus: true, @@ -11,23 +18,12 @@ - if issuable.respond_to?(:work_in_progress?) .form-text.text-muted .js-wip-explanation - %a.js-toggle-wip{ href: '' } - Remove the - %code WIP: - prefix from the title - to allow this - %strong Work In Progress - merge request to be merged when it's ready. + = remove_wip_text .js-no-wip-explanation - if has_wip_commits - It looks like you have some WIP commits in this branch. + = _('It looks like you have some draft commits in this branch.') %br - %a.js-toggle-wip{ href: '' } - Start the title with - %code WIP: - to prevent a - %strong Work In Progress - merge request from being merged before it's ready. + = add_wip_text - if no_issuable_templates && can?(current_user, :push_code, issuable.project) = render 'shared/issuable/form/default_templates' diff --git a/app/views/shared/members/_filter_2fa_dropdown.html.haml b/app/views/shared/members/_filter_2fa_dropdown.html.haml index 44ea844028e..a2bc5e9ecdf 100644 --- a/app/views/shared/members/_filter_2fa_dropdown.html.haml +++ b/app/views/shared/members/_filter_2fa_dropdown.html.haml @@ -1,6 +1,6 @@ - filter = params[:two_factor] || 'everyone' - filter_options = { 'everyone' => _('Everyone'), 'enabled' => _('Enabled'), 'disabled' => _('Disabled') } -.dropdown.inline.member-filter-2fa-dropdown.pr-md-2 +.dropdown.inline.member-filter-2fa-dropdown = dropdown_toggle(filter_options[filter], { toggle: 'dropdown' }) %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %li.dropdown-header diff --git a/app/views/shared/members/_group.html.haml b/app/views/shared/members/_group.html.haml index 1d7d18d2ab6..f59e0f92c60 100644 --- a/app/views/shared/members/_group.html.haml +++ b/app/views/shared/members/_group.html.haml @@ -46,4 +46,4 @@ class: 'btn btn-remove m-0 ml-sm-2 align-self-center' do %span.d-block.d-sm-none = _("Delete") - = icon('trash', class: 'd-none d-sm-block') + = sprite_icon('remove', css_class: 'd-none d-sm-block') diff --git a/app/views/shared/members/_invite_group.html.haml b/app/views/shared/members/_invite_group.html.haml index 27c930bcbb5..a2fb33aa757 100644 --- a/app/views/shared/members/_invite_group.html.haml +++ b/app/views/shared/members/_invite_group.html.haml @@ -14,7 +14,7 @@ .select-wrapper = select_tag group_access_field, options_for_select(access_levels, default_access_level), data: { qa_selector: 'group_access_field' }, class: "form-control select-control" = icon('chevron-down') - .form-text.text-muted.append-bottom-10 + .form-text.text-muted.gl-mb-3 - permissions_docs_path = help_page_path('user/permissions') - link_start = %q{<a href="%{url}">}.html_safe % { url: permissions_docs_path } = _("%{link_start}Read more%{link_end} about role permissions").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } diff --git a/app/views/shared/members/_invite_member.html.haml b/app/views/shared/members/_invite_member.html.haml index d3a1c85e285..284d7fdb6da 100644 --- a/app/views/shared/members/_invite_member.html.haml +++ b/app/views/shared/members/_invite_member.html.haml @@ -14,7 +14,7 @@ .select-wrapper = select_tag :access_level, options_for_select(access_levels, default_access_level), class: "form-control project-access-select select-control" = icon('chevron-down') - .form-text.text-muted.append-bottom-10 + .form-text.text-muted.gl-mb-3 - permissions_docs_path = help_page_path('user/permissions') - link_start = %q{<a href="%{url}">}.html_safe % { url: permissions_docs_path } = _("%{link_start}Read more%{link_end} about role permissions").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index 79dc3043e8d..fa71f4dc9b9 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -33,7 +33,7 @@ - if source.instance_of?(Group) && source != @group · - = link_to source.full_name, source, class: "member-group-link" + = link_to source.full_name, source, class: "gl-display-inline-block inline-link" .cgray - if member.request? @@ -62,7 +62,7 @@ - if show_controls && member.source == current_resource - if member.can_resend_invite? - = link_to sprite_icon('paper-airplane', size: 16), polymorphic_path([:resend_invite, member]), + = link_to sprite_icon('paper-airplane'), polymorphic_path([:resend_invite, member]), method: :post, class: 'btn btn-default align-self-center mr-sm-2', title: _('Resend invite') @@ -113,18 +113,17 @@ - if member.can_remove? - if current_user == user - = link_to icon('sign-out', text: _('Leave')), polymorphic_path([:leave, member.source, :members]), - method: :delete, - data: { confirm: leave_confirmation_message(member.source) }, - class: "btn btn-remove align-self-center m-0 #{'ml-sm-2' unless force_mobile_view}" + = link_to polymorphic_path([:leave, member.source, :members]), method: :delete, data: { confirm: leave_confirmation_message(member.source) }, class: "btn gl-button btn-svg btn-danger align-self-center m-0 #{'ml-sm-2' unless force_mobile_view}" do + = sprite_icon('leave', css_class: 'gl-icon') + = _('Leave') - else %button{ data: { member_path: member_path(member.member), message: remove_member_message(member), is_access_request: member.request?.to_s, qa_selector: 'delete_member_button' }, - class: "js-remove-member-button btn btn-remove align-self-center m-0 #{'ml-sm-2' unless force_mobile_view}", + class: "js-remove-member-button btn gl-button btn-danger align-self-center m-0 #{'ml-sm-2 btn-icon' unless force_mobile_view}", title: remove_member_title(member) } %span{ class: ('d-block d-sm-none' unless force_mobile_view) } = _("Delete") - unless force_mobile_view - = icon('trash', class: 'd-none d-sm-block') + = sprite_icon('remove', css_class: 'd-none d-sm-block gl-icon') = render_if_exists 'shared/members/ee/override_member_buttons', group: @group, member: member, user: user, action: :edit, can_override: member.can_override? - else %span.member-access-text.user-access-role= member.human_access diff --git a/app/views/shared/members/_search_field.html.haml b/app/views/shared/members/_search_field.html.haml new file mode 100644 index 00000000000..e70cb063324 --- /dev/null +++ b/app/views/shared/members/_search_field.html.haml @@ -0,0 +1,6 @@ +- name = local_assigns.fetch(:name, :search) + +.search-control-wrap.gl-relative + = search_field_tag name, params[name], { placeholder: _('Search'), class: 'form-control', spellcheck: false } + %button.user-search-btn.border-left.gl-display-flex.gl-align-items-center.gl-justify-content-center{ type: 'submit', 'aria': { label: _('Submit search') } } + = sprite_icon('search') diff --git a/app/views/shared/members/_sort_dropdown.html.haml b/app/views/shared/members/_sort_dropdown.html.haml index 50a55565c3c..606d3bcdfa8 100644 --- a/app/views/shared/members/_sort_dropdown.html.haml +++ b/app/views/shared/members/_sort_dropdown.html.haml @@ -1,4 +1,3 @@ -= label_tag :sort_by, 'Sort by', class: 'col-form-label label-bold px-2' .dropdown.inline.qa-user-sort-dropdown = dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' }) %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable diff --git a/app/views/shared/milestones/_deprecation_message.html.haml b/app/views/shared/milestones/_deprecation_message.html.haml deleted file mode 100644 index 27cd6d75232..00000000000 --- a/app/views/shared/milestones/_deprecation_message.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -.banner-callout.compact.milestone-deprecation-message.js-milestone-deprecation-message.prepend-top-20 - .banner-graphic= image_tag 'illustrations/milestone_removing-page.svg' - .banner-body.gl-ml-3.gl-mr-3 - %h5.banner-title.gl-mt-0= _('This page will be removed in a future release.') - %p.milestone-banner-text= _('Use group milestones to manage issues from multiple projects in the same milestone.') - = button_tag _('Promote these project milestones into a group milestone.'), class: 'btn btn-link js-popover-link text-align-left milestone-banner-link' - .milestone-banner-buttons.prepend-top-20= link_to _('Learn more'), help_page_url('user/project/milestones/index', anchor: 'promoting-project-milestones-to-group-milestones'), class: 'btn btn-default', target: '_blank' - - %template.js-milestone-deprecation-message-template - .milestone-popover-body - %ol.milestone-popover-instructions-list.gl-mb-0 - %li= _('Click any <strong>project name</strong> in the project list below to navigate to the project milestone.').html_safe - %li= _('Click the <strong>Promote</strong> button in the top right corner to promote it to a group milestone.').html_safe - %hr.popover-hr - .milestone-popover-footer= link_to _('Learn more'), help_page_url('user/project/milestones/index', anchor: 'promoting-project-milestones-to-group-milestones'), class: 'btn btn-link prepend-left-0', target: '_blank' diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index ae5bf9572bd..4ef8a9dd842 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -15,7 +15,7 @@ .text-tertiary.gl-mb-2 = milestone_date_range(milestone) - recent_releases, total_count, more_count = recent_releases_with_counts(milestone) - - unless total_count.zero? + - unless total_count == 0 .text-tertiary.gl-mb-2.milestone-release-links = sprite_icon("rocket", size: 12) = n_('Release', 'Releases', total_count) diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index 7fd657ec2dd..bdacdb23141 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -140,11 +140,11 @@ .block.releases .sidebar-collapsed-icon.has-tooltip{ title: milestone_releases_tooltip_text(milestone), data: { container: 'body', placement: 'left', boundary: 'viewport' } } %strong - = sprite_icon("rocket", size: 16) + = sprite_icon("rocket") %span= total_count .title.hide-collapsed= n_('Release', 'Releases', total_count) .hide-collapsed - - if total_count.zero? + - if total_count == 0 .no-value= s_('MilestoneSidebar|None') - else .font-weight-bold diff --git a/app/views/shared/notes/_hints.html.haml b/app/views/shared/notes/_hints.html.haml index abd5d8cd9db..51c1ee0c4d1 100644 --- a/app/views/shared/notes/_hints.html.haml +++ b/app/views/shared/notes/_hints.html.haml @@ -12,7 +12,7 @@ %span.uploading-container %span.uploading-progress-container.hide - = sprite_icon('media', size: 16, css_class: 'gl-icon gl-vertical-align-text-bottom') + = sprite_icon('media', css_class: 'gl-icon gl-vertical-align-text-bottom') %span.attaching-file-message -# Populated by app/assets/javascripts/dropzone_input.js %span.uploading-progress 0% @@ -20,7 +20,7 @@ %span.uploading-error-container.hide %span.uploading-error-icon - = sprite_icon('media', size: 16, css_class: 'gl-icon gl-vertical-align-text-bottom') + = sprite_icon('media', css_class: 'gl-icon gl-vertical-align-text-bottom') %span.uploading-error-message -# Populated by app/assets/javascripts/dropzone_input.js %button.retry-uploading-link{ type: 'button' }= _("Try again") @@ -28,7 +28,7 @@ %button.attach-new-file.markdown-selector{ type: 'button' }= _("attach a new file") %button.btn.markdown-selector.button-attach-file.btn-link{ type: 'button', tabindex: '-1' } - = sprite_icon('media', size: 16) + = sprite_icon('media') %span.text-attach-file<> = _("Attach a file") diff --git a/app/views/shared/notes/_note.html.haml b/app/views/shared/notes/_note.html.haml index 95450a5df3c..da665f17975 100644 --- a/app/views/shared/notes/_note.html.haml +++ b/app/views/shared/notes/_note.html.haml @@ -63,7 +63,8 @@ - if note.system .system-note-commit-list-toggler.hide = _("Toggle commit list") - %i.fa.fa-angle-down + = sprite_icon('chevron-down', css_class: 'js-chevron-down gl-ml-1 gl-vertical-align-text-bottom') + = sprite_icon('chevron-up', css_class: 'js-chevron-up gl-ml-1 gl-vertical-align-text-bottom gl-display-none') - if note.attachment.url .note-attachment - if note.attachment.image? diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml index fa103ad447a..2e98b06ec4a 100644 --- a/app/views/shared/notes/_notes_with_form.html.haml +++ b/app/views/shared/notes/_notes_with_form.html.haml @@ -25,8 +25,8 @@ - elsif discussion_locked .disabled-comment.text-center.gl-mt-3 %span.issuable-note-warning - = sprite_icon('lock', size: 16, css_class: 'icon') + = sprite_icon('lock', css_class: 'icon') %span - = _("This %{issuable} is locked. Only <strong>project members</strong> can comment.").html_safe % { issuable: issuable.class.to_s.titleize.downcase } + = html_escape(_("This %{issuable} is locked. Only %{strong_open}project members%{strong_close} can comment.")) % { issuable: issuable.class.to_s.titleize.downcase, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } -# haml-lint:disable InlineJavaScript %script.js-notes-data{ type: "application/json" }= initial_notes_data(autocomplete).to_json.html_safe diff --git a/app/views/shared/notifications/_button.html.haml b/app/views/shared/notifications/_button.html.haml index 2b3e986a841..f2c7ab648c0 100644 --- a/app/views/shared/notifications/_button.html.haml +++ b/app/views/shared/notifications/_button.html.haml @@ -17,16 +17,16 @@ .js-notification-toggle-btns %div{ class: ("btn-group" if notification_setting.custom?) } - if notification_setting.custom? - %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn.text-left#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } - = icon("bell", class: "js-notification-loading") + %button.dropdown-new.btn.btn-defaul.btn-icon.gl-button.has-tooltip.notifications-btn.text-left#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } + = sprite_icon("notifications", css_class: "js-notification-loading") = notification_title(notification_setting.level) %button.btn.dropdown-toggle.d-flex{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } = icon('caret-down') .sr-only Toggle dropdown - else - %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } + %button.dropdown-new.btn.btn-default.btn-icon.gl-button.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } .float-left - = icon("bell", class: "js-notification-loading") + = sprite_icon("notifications", css_class: "js-notification-loading") = notification_title(notification_setting.level) .float-right = icon("caret-down") diff --git a/app/views/shared/notifications/_custom_notifications.html.haml b/app/views/shared/notifications/_custom_notifications.html.haml index 9bd08c2296f..51b7da7dee8 100644 --- a/app/views/shared/notifications/_custom_notifications.html.haml +++ b/app/views/shared/notifications/_custom_notifications.html.haml @@ -23,7 +23,6 @@ #{ paragraph.html_safe } .col-lg-8 - notification_setting.email_events.each_with_index do |event, index| - - next if notification_event_disabled?(event) - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]" .form-group .form-check{ class: ("gl-mt-0" if index == 0) } diff --git a/app/views/shared/packages/_no_packages.html.haml b/app/views/shared/packages/_no_packages.html.haml new file mode 100644 index 00000000000..ae5c2cfd378 --- /dev/null +++ b/app/views/shared/packages/_no_packages.html.haml @@ -0,0 +1,7 @@ +.svg-content= image_tag 'illustrations/no-packages.svg' +.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 } diff --git a/app/views/shared/projects/_archived.html.haml b/app/views/shared/projects/_archived.html.haml index fad93d14390..f24fe3a8b89 100644 --- a/app/views/shared/projects/_archived.html.haml +++ b/app/views/shared/projects/_archived.html.haml @@ -1,3 +1,3 @@ - if project.archived - %span.d-flex.badge.badge-warning + %span.d-flex.badge-pill.gl-badge.badge-warning.gl-ml-3 = _('archived') diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 626e94e0202..115d0c9a7c5 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -26,7 +26,7 @@ = image_tag avatar_icon_for_user(project.creator, 48), class: "avatar s48", alt:'' - else = project_icon(project, alt: '', class: 'avatar project-avatar s48', width: 48, height: 48) - .project-details.d-sm-flex.flex-sm-fill.align-items-center{ data: { qa_selector: 'project', qa_project_name: project.name } } + .project-details.d-sm-flex.flex-sm-fill.align-items-center{ data: { qa_selector: 'project_content', qa_project_name: project.name } } .flex-wrapper .d-flex.align-items-center.flex-wrap.project-title %h2.d-flex.gl-mt-3 @@ -40,7 +40,7 @@ = project.name %span.metadata-info.visibility-icon.gl-mr-3.gl-mt-3.text-secondary.has-tooltip{ data: { container: 'body', placement: 'top' }, title: visibility_icon_description(project) } - = visibility_level_icon(project.visibility_level, fw: true) + = visibility_level_icon(project.visibility_level) - if explore_projects_tab? && project_license_name(project) %span.metadata-info.d-inline-flex.align-items-center.gl-mr-3.gl-mt-3 @@ -51,7 +51,7 @@ -# haml-lint:disable UnnecessaryStringOutput = ' ' # prevent haml from eating the space between elements .metadata-info.gl-mt-3 - %span.user-access-role.d-block= Gitlab::Access.human_access(access) + %span.user-access-role.d-block{ data: { qa_selector: 'user_role_content' } }= Gitlab::Access.human_access(access) - if !explore_projects_tab? .metadata-info.gl-mt-3 @@ -64,6 +64,8 @@ .description.d-none.d-sm-block.gl-mr-3 = markdown_field(project, :description) + = render_if_exists 'shared/projects/removed', project: project + .controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class.join(" ") } .icon-container.d-flex.align-items-center - if show_pipeline_status_icon diff --git a/app/views/shared/projects/_search_bar.html.haml b/app/views/shared/projects/_search_bar.html.haml index c1f2eaba284..a745da32110 100644 --- a/app/views/shared/projects/_search_bar.html.haml +++ b/app/views/shared/projects/_search_bar.html.haml @@ -14,7 +14,7 @@ .filtered-search-box-input-container.pl-2 = render 'shared/projects/search_form', admin_view: false, search_form_placeholder: _("Search projects...") %button.btn.btn-secondary{ type: 'submit', form: 'project-filter-form' } - = sprite_icon('search', size: 16, css_class: 'search-icon ') + = sprite_icon('search', css_class: 'search-icon ') .filtered-search-dropdown.flex-row.align-items-center.mb-2.m-sm-0#filtered-search-visibility-dropdown{ class: flex_grow_and_shrink_xs } .filtered-search-dropdown-label.p-0.pl-sm-3.font-weight-bold %span @@ -25,4 +25,3 @@ %span = _("Sort by") = render 'shared/projects/sort_dropdown' - diff --git a/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml b/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml new file mode 100644 index 00000000000..eafc402f210 --- /dev/null +++ b/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml @@ -0,0 +1,35 @@ +- merge_access_levels = protected_branch.merge_access_levels.for_role +- push_access_levels = protected_branch.push_access_levels.for_role + +- user_merge_access_levels = protected_branch.merge_access_levels.for_user +- user_push_access_levels = protected_branch.push_access_levels.for_user + +- group_merge_access_levels = protected_branch.merge_access_levels.for_group +- group_push_access_levels = protected_branch.push_access_levels.for_group + +%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 qa-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) }}) + - if user_merge_access_levels.any? + %p.small + = _('The following %{user} can also merge into this branch: %{branch}') % { user: 'user'.pluralize(user_merge_access_levels.size), branch: user_merge_access_levels.map(&:humanize).to_sentence } + + - if group_merge_access_levels.any? + %p.small + = _('Members of %{group} can also merge into this branch: %{branch}') % { group: (group_merge_access_levels.size > 1 ? 'these groups' : 'this group'), branch: group_merge_access_levels.map(&:humanize).to_sentence } + +%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', 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) }}) + - if user_push_access_levels.any? + %p.small + = _('The following %{user} can also push to this branch: %{branch}') % { user: 'user'.pluralize(user_push_access_levels.size), branch: user_push_access_levels.map(&:humanize).to_sentence } + + - if group_push_access_levels.any? + %p.small + = _('Members of %{group} can also push to this branch: %{branch}') % { group: (group_push_access_levels.size > 1 ? 'these groups' : 'this group'), branch: group_push_access_levels.map(&:humanize).to_sentence } + diff --git a/app/views/shared/promotions/_promote_servicedesk.html.haml b/app/views/shared/promotions/_promote_servicedesk.html.haml index f7f65c34c75..fbac5ef0bbd 100644 --- a/app/views/shared/promotions/_promote_servicedesk.html.haml +++ b/app/views/shared/promotions/_promote_servicedesk.html.haml @@ -5,9 +5,9 @@ .svg-container = custom_icon('icon_service_desk') .user-callout-copy - -# haml-lint:disable NoPlainNodes %h4 - Improve customer support with GitLab Service Desk. + = _("Improve customer support with GitLab Service Desk.") %p - GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either through the GitLab interface or by email. End users will only see the thread through email. - = link_to 'Read more', help_page_path('user/project/service_desk.md'), target: '_blank' + = _("GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either through the GitLab interface or by email. End users will only see the thread through email.") + = link_to _('Read more'), help_page_path('user/project/service_desk.md'), target: '_blank' + diff --git a/app/views/shared/snippets/_embed.html.haml b/app/views/shared/snippets/_embed.html.haml index f1abd3a2ce4..f698e1a301b 100644 --- a/app/views/shared/snippets/_embed.html.haml +++ b/app/views/shared/snippets/_embed.html.haml @@ -5,17 +5,17 @@ %strong.file-title-name %a.gitlab-embedded-snippets-title{ href: url_for(only_path: false, overwrite_params: nil) } - = @blob.name + = blob.name %small - = number_to_human_size(@blob.raw_size) + = number_to_human_size(blob.size) %a.gitlab-logo-wrapper{ href: url_for(only_path: false, overwrite_params: nil), title: 'view on gitlab' } %img.gitlab-logo{ src: image_url('ext_snippet_icons/logo.svg'), alt: "GitLab logo" } .file-actions.d-none.d-sm-block .btn-group{ role: "group" }< - = embedded_raw_snippet_button + = embedded_raw_snippet_button(@snippet, blob) - = embedded_snippet_download_button + = embedded_snippet_download_button(@snippet, blob) %article.file-holder.snippet-file-content - = render 'projects/blob/viewer', viewer: @blob.simple_viewer, load_async: false, external_embed: true + = render 'projects/blob/viewer', viewer: blob.simple_viewer, load_async: false, external_embed: true diff --git a/app/views/shared/snippets/_form.html.haml b/app/views/shared/snippets/_form.html.haml index 7f307f33b51..81277b50d13 100644 --- a/app/views/shared/snippets/_form.html.haml +++ b/app/views/shared/snippets/_form.html.haml @@ -29,7 +29,8 @@ .js-file-title.file-title-flex-parent = f.text_field :file_name, placeholder: s_("Snippets|Give your file a name to add code highlighting, e.g. example.rb for Ruby"), class: 'form-control js-snippet-file-name', data: { qa_selector: 'file_name_field' } .file-content.code - %pre#editor{ data: { 'editor-loading': true } }= @snippet.content + #editor{ data: { 'editor-loading': true } }< + %pre.editor-loading-content= @snippet.content = f.hidden_field :content, class: 'snippet-file-content' .form-group diff --git a/app/views/shared/snippets/_header.html.haml b/app/views/shared/snippets/_header.html.haml index 36b6bfd061f..d6019e45b25 100644 --- a/app/views/shared/snippets/_header.html.haml +++ b/app/views/shared/snippets/_header.html.haml @@ -3,7 +3,7 @@ .snippet-box.has-tooltip.inline.gl-mr-2{ title: snippet_visibility_level_description(@snippet.visibility_level, @snippet), data: { container: "body" } } %span.sr-only = visibility_level_label(@snippet.visibility_level) - = visibility_level_icon(@snippet.visibility_level, fw: false) + = visibility_level_icon(@snippet.visibility_level) %span.creator Authored = time_ago_with_tooltip(@snippet.created_at, placement: 'bottom', html_class: 'snippet_updated_ago') diff --git a/app/views/shared/snippets/_snippet.html.haml b/app/views/shared/snippets/_snippet.html.haml index b2c9a74b177..25e31fd519b 100644 --- a/app/views/shared/snippets/_snippet.html.haml +++ b/app/views/shared/snippets/_snippet.html.haml @@ -10,13 +10,13 @@ %ul.controls %li - = link_to gitlab_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if notes_count.zero?) do - = sprite_icon('comments', size: 16, css_class: 'gl-vertical-align-text-bottom') + = link_to gitlab_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if notes_count == 0) do + = sprite_icon('comments', css_class: 'gl-vertical-align-text-bottom') = notes_count %li %span.sr-only = visibility_level_label(snippet.visibility_level) - = visibility_level_icon(snippet.visibility_level, fw: false) + = visibility_level_icon(snippet.visibility_level) .snippet-info #{snippet.to_reference} · diff --git a/app/views/shared/snippets/show.js.haml b/app/views/shared/snippets/show.js.haml index d552c1a723b..23cebc97f63 100644 --- a/app/views/shared/snippets/show.js.haml +++ b/app/views/shared/snippets/show.js.haml @@ -1,2 +1,2 @@ document.write('#{escape_javascript(stylesheet_link_tag("#{stylesheet_url 'snippets'}"))}'); -document.write('#{escape_javascript(render('shared/snippets/embed'))}'); +document.write('#{escape_javascript(render(partial: 'shared/snippets/embed', collection: @blobs, as: :blob))}'); diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml index ce85cbd7f07..0f6188fa334 100644 --- a/app/views/shared/web_hooks/_form.html.haml +++ b/app/views/shared/web_hooks/_form.html.haml @@ -72,6 +72,12 @@ %strong Wiki Page events %p.text-muted.ml-1 This URL will be triggered when a wiki page is created/updated + %li + = form.check_box :deployment_events, class: 'form-check-input' + = form.label :deployment_events, class: 'list-label form-check-label ml-1' do + %strong= s_('Webhooks|Deployment events') + %p.text-muted.ml-1 + = s_('Webhooks|This URL will be triggered when a deployment is finished/failed/canceled') .form-group = form.label :enable_ssl_verification, 'SSL verification', class: 'label-bold checkbox' .form-check diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml index 92b9207aaa4..4d64521f9b0 100644 --- a/app/views/shared/wikis/_form.html.haml +++ b/app/views/shared/wikis/_form.html.haml @@ -59,7 +59,7 @@ - link_example = '[[page-slug]]' - else - link_example = '[Link Title](page-slug)' - = (s_('WikiMarkdownTip|To link to a (new) page, simply type <code class="js-markup-link-example">%{link_example}</code>') % { link_example: link_example }).html_safe + = html_escape(s_('WikiMarkdownTip|To link to a (new) page, simply type %{link_example}')) % { link_example: tag.code(link_example, class: 'js-markup-link-example') } = succeed '.' do - markdown_link = link_to s_("WikiMarkdownDocs|documentation"), help_page_path('user/markdown', anchor: 'wiki-specific-markdown') = (s_("WikiMarkdownDocs|More examples are in the %{docs_link}") % { docs_link: markdown_link }).html_safe diff --git a/app/views/shared/wikis/_sidebar.html.haml b/app/views/shared/wikis/_sidebar.html.haml index cddf19fbc8e..54f285671a1 100644 --- a/app/views/shared/wikis/_sidebar.html.haml +++ b/app/views/shared/wikis/_sidebar.html.haml @@ -2,11 +2,11 @@ .sidebar-container .block.wiki-sidebar-header.gl-mb-3.w-100 %a.gutter-toggle.float-right.d-block.d-sm-block.d-md-none.js-sidebar-wiki-toggle{ href: "#" } - = sprite_icon('chevron-double-lg-right', size: 16, css_class: 'gl-icon') + = sprite_icon('chevron-double-lg-right', css_class: 'gl-icon') - git_access_url = wiki_path(@wiki, action: :git_access) = link_to git_access_url, class: active_nav_link?(path: 'wikis#git_access') ? 'active' : '', data: { qa_selector: 'clone_repository_link' } do - = sprite_icon('download', size: 16, css_class: 'gl-mr-2') + = sprite_icon('download', css_class: 'gl-mr-2') %span= _("Clone repository") .blocks-container diff --git a/app/views/shared/wikis/_wiki_directory.html.haml b/app/views/shared/wikis/_wiki_directory.html.haml index 0e5f32ed859..21e829d86a6 100644 --- a/app/views/shared/wikis/_wiki_directory.html.haml +++ b/app/views/shared/wikis/_wiki_directory.html.haml @@ -1,4 +1,4 @@ -%li +%li{ data: { qa_selector: 'wiki_directory_content' } } = wiki_directory.slug %ul = render wiki_directory.pages, context: context |