diff options
Diffstat (limited to 'app/views/shared')
36 files changed, 74 insertions, 57 deletions
diff --git a/app/views/shared/_email_with_badge.html.haml b/app/views/shared/_email_with_badge.html.haml index 5d837657943..5013d8e439a 100644 --- a/app/views/shared/_email_with_badge.html.haml +++ b/app/views/shared/_email_with_badge.html.haml @@ -1,5 +1,6 @@ - variant = verified ? :success : :danger - text = verified ? _('Verified') : _('Unverified') -= email -= gl_badge_tag text, { variant: variant }, { class: 'gl-ml-3' } +%span.gl-mr-3 + = email += gl_badge_tag text, { variant: variant } diff --git a/app/views/shared/_file_highlight.html.haml b/app/views/shared/_file_highlight.html.haml index 130e73a069f..89be816fc76 100644 --- a/app/views/shared/_file_highlight.html.haml +++ b/app/views/shared/_file_highlight.html.haml @@ -1,6 +1,7 @@ #blob-content.file-content.code.js-syntax-highlight - offset = defined?(first_line_number) ? first_line_number : 1 - - blame_path = project_blame_path(@project, tree_join(@ref, blob.path)) + - if Feature.enabled?(:file_line_blame) + - blame_path = project_blame_path(@project, tree_join(@ref, blob.path)) .line-numbers{ class: "gl-px-0!", data: { blame_path: blame_path } } - if blob.data.present? - link = blob_link if defined?(blob_link) diff --git a/app/views/shared/_integration_settings.html.haml b/app/views/shared/_integration_settings.html.haml index d58be0f0f4a..84710b2ecc7 100644 --- a/app/views/shared/_integration_settings.html.haml +++ b/app/views/shared/_integration_settings.html.haml @@ -1,4 +1,4 @@ -= form_errors(integration, pajamas_alert: true) += form_errors(integration) %div{ data: { testid: "integration-settings-form" } } - if @default_integration diff --git a/app/views/shared/_md_preview.html.haml b/app/views/shared/_md_preview.html.haml index a49a0667d84..7314a7ddadc 100644 --- a/app/views/shared/_md_preview.html.haml +++ b/app/views/shared/_md_preview.html.haml @@ -11,13 +11,13 @@ .md-header = gl_tabs_nav({ class: 'clearfix nav-links'}) do %li.md-header-tab.active - %button.js-md-write-button + %button.js-md-write-button{ class: 'gl-py-3!' } = _("Write") %li.md-header-tab - %button.js-md-preview-button + %button.js-md-preview-button{ class: 'gl-py-3!' } = _("Preview") - %li.md-header-toolbar.active + %li.md-header-toolbar.active.gl-py-2 = render 'shared/blob/markdown_buttons', show_fullscreen_button: true .md-write-holder diff --git a/app/views/shared/access_tokens/_created_container.html.haml b/app/views/shared/access_tokens/_created_container.html.haml index c5a18d98b89..c0aaa46e761 100644 --- a/app/views/shared/access_tokens/_created_container.html.haml +++ b/app/views/shared/access_tokens/_created_container.html.haml @@ -3,7 +3,7 @@ = _('Your new %{type}') % { type: type } .form-group .input-group - = text_field_tag 'created-personal-access-token', new_token_value, readonly: true, class: 'qa-created-access-token form-control js-select-on-focus', 'aria-describedby' => 'created-token-help-block' + = text_field_tag 'created-personal-access-token', new_token_value, readonly: true, class: 'form-control js-select-on-focus', data: { qa_selector: 'created_access_token_field' }, 'aria-describedby' => 'created-token-help-block' %span.input-group-append = clipboard_button(text: new_token_value, title: _('Copy %{type}') % { type: type }, placement: 'left', class: 'input-group-text btn-default btn-clipboard') %span#created-token-help-block.form-text.text-muted.text-danger diff --git a/app/views/shared/access_tokens/_form.html.haml b/app/views/shared/access_tokens/_form.html.haml index dd4d2ab46c1..0c88ac66b8b 100644 --- a/app/views/shared/access_tokens/_form.html.haml +++ b/app/views/shared/access_tokens/_form.html.haml @@ -13,7 +13,7 @@ = gitlab_ui_form_for token, as: prefix, url: path, method: :post, html: { id: 'js-new-access-token-form', class: 'js-requires-input' }, remote: ajax do |f| - = form_errors(token, pajamas_alert: true) + = form_errors(token) .row .form-group.col diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml index c070baf02b1..c3835386d5a 100644 --- a/app/views/shared/boards/_show.html.haml +++ b/app/views/shared/boards/_show.html.haml @@ -1,7 +1,7 @@ - board = local_assigns.fetch(:board, nil) - @no_breadcrumb_container = true - @no_container = true -- @content_wrapper_class = "#{@content_wrapper_class} gl-relative" +- @content_wrapper_class = "#{@content_wrapper_class} gl-relative gl-pb-0" - @content_class = "issue-boards-content js-focus-mode-board" - is_epic_board = board.to_type == "EpicBoard" - if is_epic_board diff --git a/app/views/shared/deploy_keys/_form.html.haml b/app/views/shared/deploy_keys/_form.html.haml index 38985319ca5..93f31629ca7 100644 --- a/app/views/shared/deploy_keys/_form.html.haml +++ b/app/views/shared/deploy_keys/_form.html.haml @@ -2,7 +2,7 @@ - deploy_key = local_assigns.fetch(:deploy_key) - deploy_keys_project = deploy_key.deploy_keys_project_for(@project) -= form_errors(deploy_key, pajamas_alert: true) += form_errors(deploy_key) .form-group = form.label :title, class: 'col-form-label col-sm-2' 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 4bedce71c0f..d76ef8feb62 100644 --- a/app/views/shared/deploy_keys/_project_group_form.html.haml +++ b/app/views/shared/deploy_keys/_project_group_form.html.haml @@ -1,5 +1,5 @@ = 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| - = form_errors(@deploy_keys.new_key, pajamas_alert: true) + = form_errors(@deploy_keys.new_key) .form-group.row = f.label :title, class: "label-bold" = f.text_field :title, class: 'form-control gl-form-input', required: true, data: { qa_selector: 'deploy_key_title_field' } diff --git a/app/views/shared/deploy_tokens/_index.html.haml b/app/views/shared/deploy_tokens/_index.html.haml index aa4a3deaac4..79bf35e2726 100644 --- a/app/views/shared/deploy_tokens/_index.html.haml +++ b/app/views/shared/deploy_tokens/_index.html.haml @@ -1,4 +1,4 @@ -- expanded = expand_deploy_tokens_section?(@new_deploy_token) +- expanded = expand_deploy_tokens_section?(@new_deploy_token, @created_deploy_token) %section.settings.no-animate#js-deploy-tokens{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_tokens_settings_content' } } .settings-header @@ -8,11 +8,10 @@ %p = description .settings-content - - if @new_deploy_token.persisted? - = render 'shared/deploy_tokens/new_deploy_token', deploy_token: @new_deploy_token + - if @created_deploy_token + = render 'shared/deploy_tokens/new_deploy_token', deploy_token: @created_deploy_token %h5.gl-mt-0 = s_('DeployTokens|New deploy token') = render 'shared/deploy_tokens/form', group_or_project: group_or_project, token: @new_deploy_token, presenter: @deploy_tokens %hr = render 'shared/deploy_tokens/table', group_or_project: group_or_project, active_tokens: @deploy_tokens - diff --git a/app/views/shared/doorkeeper/applications/_form.html.haml b/app/views/shared/doorkeeper/applications/_form.html.haml index 9810754f52b..b40e2630011 100644 --- a/app/views/shared/doorkeeper/applications/_form.html.haml +++ b/app/views/shared/doorkeeper/applications/_form.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application, url: url, html: { role: 'form', class: 'doorkeeper-app-form' } do |f| - = form_errors(@application, pajamas_alert: true) + = form_errors(@application) .form-group = f.label :name, class: 'label-bold' diff --git a/app/views/shared/doorkeeper/applications/_show.html.haml b/app/views/shared/doorkeeper/applications/_show.html.haml index f533b5b5a4d..562b1aee4ca 100644 --- a/app/views/shared/doorkeeper/applications/_show.html.haml +++ b/app/views/shared/doorkeeper/applications/_show.html.haml @@ -15,7 +15,14 @@ %td = _('Secret') %td - = clipboard_button(clipboard_text: @application.secret, button_text: _('Copy'), title: _("Copy secret"), class: "btn btn-default btn-md gl-button") + - if Feature.enabled?('hash_oauth_secrets') + - if @application.plaintext_secret + = clipboard_button(clipboard_text: @application.plaintext_secret, button_text: _('Copy'), title: _("Copy secret"), class: "btn btn-default btn-md gl-button") + %span= _('This is the only time the secret is accessible. Copy the secret and store it securely.') + - else + = _('The secret is only available when you first create the application.') + - else + = clipboard_button(clipboard_text: @application.secret, button_text: _('Copy'), title: _("Copy secret"), class: "btn btn-default btn-md gl-button") %tr %td = _('Callback URL') diff --git a/app/views/shared/groups/_group.html.haml b/app/views/shared/groups/_group.html.haml index 164773f9b60..f8304d5e44e 100644 --- a/app/views/shared/groups/_group.html.haml +++ b/app/views/shared/groups/_group.html.haml @@ -1,7 +1,7 @@ - user = local_assigns.fetch(:user, current_user) - access = user&.max_member_access_for_group(group.id) -%li.group-row.py-3.gl-align-items-center{ class: "gl-display-flex!#{' no-description' if group.description.blank?}" } +%li.group-row.py-3.gl-align-items-center{ class: "gl-display-flex!" } .avatar-container.rect-avatar.s40.gl-flex-shrink-0 = link_to group do = group_icon(group, class: "avatar s40") diff --git a/app/views/shared/groups/_visibility_level.html.haml b/app/views/shared/groups/_visibility_level.html.haml deleted file mode 100644 index 1a13de9b76a..00000000000 --- a/app/views/shared/groups/_visibility_level.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -= f.label :visibility_level, class: 'label-bold' do - = _('Visibility level') -.js-visibility-level-dropdown{ data: { visibility_level_options: visibility_level_options(@group).to_json, default_level: f.object.visibility_level } } diff --git a/app/views/shared/hook_logs/_recent_deliveries_table.html.haml b/app/views/shared/hook_logs/_recent_deliveries_table.html.haml index 3c91c2f6ab4..500eb29fa93 100644 --- a/app/views/shared/hook_logs/_recent_deliveries_table.html.haml +++ b/app/views/shared/hook_logs/_recent_deliveries_table.html.haml @@ -23,7 +23,7 @@ - if hook_logs.present? - = paginate hook_logs, theme: 'gitlab' + = paginate_without_count hook_logs - else .gl-text-center.gl-mt-7 %h4= _('No webhook events') diff --git a/app/views/shared/issuable/_feed_buttons.html.haml b/app/views/shared/issuable/_feed_buttons.html.haml index f0e4b915ac8..69ff477d415 100644 --- a/app/views/shared/issuable/_feed_buttons.html.haml +++ b/app/views/shared/issuable/_feed_buttons.html.haml @@ -1,7 +1,7 @@ - show_calendar_button = local_assigns.fetch(:show_calendar_button, true) = link_to safe_params.merge(rss_url_options), class: 'btn gl-button btn-default btn-icon has-tooltip', data: { container: 'body', testid: 'rss-feed-link' }, title: _('Subscribe to RSS feed') , 'aria-label': _('Subscribe to RSS feed') do - = sprite_icon('rss', css_class: 'qa-rss-icon') + = sprite_icon('rss') - if show_calendar_button = link_to safe_params.merge(calendar_url_options), class: 'btn gl-button btn-default btn-icon has-tooltip', data: { container: 'body' }, title: _('Subscribe to calendar'), 'aria-label': _('Subscribe to calendar') do diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index ae8b266c092..53eb6f4c63b 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -3,7 +3,7 @@ - project = @target_project || @project - presenter = local_assigns.fetch(:presenter, nil) -= form_errors(issuable, pajamas_alert: true) += form_errors(issuable) - if @conflict = render Pajamas::AlertComponent.new(variant: :danger, diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 6da094924a0..f2ce0676a9a 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -20,13 +20,7 @@ .js-issuable-todo{ data: { project_path: issuable_sidebar[:project_full_path], iid: issuable_sidebar[:iid], id: issuable_sidebar[:id] } } = form_for issuable_type, url: issuable_sidebar[:issuable_json_path], remote: true, html: { class: 'issuable-context-form inline-update js-issuable-update' } do |f| - - if signed_in && moved_sidebar_enabled - .block.to-do - .title.hide-collapsed.gl-font-weight-bold.gl-display-flex.gl-align-items-center.gl-justify-content-space-between.gl-mt-2{ class: 'gl-mb-0!' } - = _('To-Do') - .js-issuable-todo{ data: { project_path: issuable_sidebar[:project_full_path], iid: issuable_sidebar[:iid], id: issuable_sidebar[:id] } } - - .block.assignee{ class: "#{'gl-mt-3' if !signed_in && moved_sidebar_enabled}", data: { qa_selector: 'assignee_block_container' } } + .block.assignee.qa-assignee-block{ class: "#{'gl-mt-3' if !signed_in && moved_sidebar_enabled}", data: { qa_selector: 'assignee_block_container' } } = render "shared/issuable/sidebar_assignees", issuable_sidebar: issuable_sidebar, assignees: assignees, signed_in: signed_in - if issuable_sidebar[:supports_severity] @@ -88,7 +82,8 @@ .js-sidebar-participants-entry-point .block.with-sub-blocks - #js-reference-entry-point + - if !moved_sidebar_enabled + #js-reference-entry-point - if issuable_type == 'merge_request' && !moved_sidebar_enabled .sub-block.js-sidebar-source-branch .sidebar-collapsed-icon.js-dont-change-state diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 2fd4c598580..e9b04579808 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -6,7 +6,7 @@ max_assignees: dropdown_options[:data][:"max-select"], directly_invite_members: can_admin_project_member?(@project) } } .title.hide-collapsed - = _('Assignee') + = s_('Label|Assignee') = gl_loading_icon(inline: true) .js-sidebar-assignee-data.selectbox.hide-collapsed diff --git a/app/views/shared/issuable/_sidebar_reviewers.html.haml b/app/views/shared/issuable/_sidebar_reviewers.html.haml index cd976b88304..3f78f29ea24 100644 --- a/app/views/shared/issuable/_sidebar_reviewers.html.haml +++ b/app/views/shared/issuable/_sidebar_reviewers.html.haml @@ -2,7 +2,7 @@ #js-vue-sidebar-reviewers{ data: { field: issuable_type, signed_in: signed_in } } .title.hide-collapsed - = _('Reviewer') + = _('Reviewers') = gl_loading_icon(inline: true) .selectbox.hide-collapsed diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 8ab002f755f..634e927f891 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -31,10 +31,14 @@ - 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', - data: { placeholder: _('Select branch'), endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) + .merge-request-select.dropdown.gl-w-auto + = form.hidden_field :target_branch + = dropdown_toggle form.object.target_branch.presence || _("Select branch"), { toggle: "dropdown", 'field-name': "#{form.object_name}[target_branch]", 'refs-url': refs_project_path(@project, sort: 'updated_desc', find: 'branches'), selected: form.object.target_branch, default_text: _("Select branch") }, { toggle_class: "js-compare-dropdown js-target-branch monospace" } + .dropdown-menu.dropdown-menu-selectable.js-target-branch-dropdown.target_branch.ref-name.git-revision-dropdown + = dropdown_title(_("Select branch")) + = dropdown_filter(_("Search branches")) + = dropdown_content + = dropdown_loading - if source_level < target_level = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'gl-mb-4' }) do |c| diff --git a/app/views/shared/issuable/form/_merge_params.html.haml b/app/views/shared/issuable/form/_merge_params.html.haml index 5831460d59a..09086d3aa82 100644 --- a/app/views/shared/issuable/form/_merge_params.html.haml +++ b/app/views/shared/issuable/form/_merge_params.html.haml @@ -11,9 +11,9 @@ - if issuable.can_remove_source_branch?(current_user) .form-check.gl-mb-3 = hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil - = check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?, class: 'form-check-input' + = check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?, class: 'form-check-input js-form-update' = label_tag 'merge_request[force_remove_source_branch]', class: 'form-check-label' do - Delete source branch when merge request is accepted. + = _("Delete source branch when merge request is accepted.") - if !project.squash_never? .form-check - if project.squash_always? @@ -21,9 +21,9 @@ = check_box_tag 'merge_request[squash]', '1', project.squash_enabled_by_default?, class: 'form-check-input', disabled: 'true' - else = hidden_field_tag 'merge_request[squash]', '0', id: nil - = check_box_tag 'merge_request[squash]', '1', issuable_squash_option?(issuable, project), class: 'form-check-input' + = check_box_tag 'merge_request[squash]', '1', issuable_squash_option?(issuable, project), class: 'form-check-input js-form-update' = label_tag 'merge_request[squash]', class: 'form-check-label' do - Squash commits when merge request is accepted. + = _("Squash commits when merge request is accepted.") = link_to sprite_icon('question-o'), help_page_path('user/project/merge_requests/squash_and_merge'), target: '_blank', rel: 'noopener noreferrer' - if project.squash_always? .gl-text-gray-400 diff --git a/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml b/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml index efecffbcc2e..bd9afc3ce69 100644 --- a/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml +++ b/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml @@ -1,4 +1,4 @@ -= form.label :assignee_id, issuable.allows_multiple_assignees? ? _('Assignees') : _('Assignee'), class: "col-12" += form.label :assignee_id, issuable.allows_multiple_assignees? ? _('Assignees') : s_('SearchToken|Assignee'), class: "col-12" .col-12 .issuable-form-select-holder.selectbox - issuable.assignees.each do |assignee| diff --git a/app/views/shared/issue_type/_emoji_block.html.haml b/app/views/shared/issue_type/_emoji_block.html.haml index d2c851a4e49..61e28f18d3b 100644 --- a/app/views/shared/issue_type/_emoji_block.html.haml +++ b/app/views/shared/issue_type/_emoji_block.html.haml @@ -4,8 +4,7 @@ .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-my-2.gl-font-size-0 + .new-branch-col.gl-display-flex.gl-my-2.gl-font-size-0.gl-gap-3 = render_if_exists "projects/issues/timeline_toggle", issuable: issuable - #js-vue-sort-issue-discussions #js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(issuable), notes_filters: UserPreference.notes_filters.to_json } } = render 'new_branch' if show_new_branch_button? diff --git a/app/views/shared/labels/_form.html.haml b/app/views/shared/labels/_form.html.haml index cf8bd23b153..e6d6d0998dc 100644 --- a/app/views/shared/labels/_form.html.haml +++ b/app/views/shared/labels/_form.html.haml @@ -1,5 +1,5 @@ = form_for @label, as: :label, url: url, html: { class: 'label-form js-quick-submit js-requires-input' } do |f| - = form_errors(@label, pajamas_alert: true) + = form_errors(@label) .form-group.row .col-12 diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index 59d1537aa2b..01548325c83 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -43,7 +43,8 @@ - if milestone.merge_requests_enabled? · = link_to pluralize(milestone.total_merge_requests_count, _('Merge request')), merge_requests_path - .float-lg-right.light #{milestone.percent_complete}% complete + .float-lg-right.light + = format(s_('Milestone|%{percentage}%{percent} complete'), percentage: milestone.percent_complete, percent: '%') .col-md-2 .milestone-actions.d-flex.justify-content-sm-start.justify-content-md-end - if @project # if in milestones list on project level diff --git a/app/views/shared/notes/_hints.html.haml b/app/views/shared/notes/_hints.html.haml index 44740db5a00..fb000b9aab1 100644 --- a/app/views/shared/notes/_hints.html.haml +++ b/app/views/shared/notes/_hints.html.haml @@ -9,7 +9,7 @@ - else = html_escape(s_('MarkdownToolbar|Supports %{markdownDocsLinkStart}Markdown%{markdownDocsLinkEnd}')) % { markdownDocsLinkStart: markdownLinkStart, markdownDocsLinkEnd: '</a>'.html_safe } - if supports_file_upload - %span.uploading-container + %span.uploading-container.gl-line-height-32 %span.uploading-progress-container.hide = sprite_icon('paperclip', css_class: 'gl-icon gl-vertical-align-text-bottom') %span.attaching-file-message diff --git a/app/views/shared/projects/_search_form.html.haml b/app/views/shared/projects/_search_form.html.haml index 51a5c9dd38f..a5170b199e8 100644 --- a/app/views/shared/projects/_search_form.html.haml +++ b/app/views/shared/projects/_search_form.html.haml @@ -1,5 +1,5 @@ - form_field_classes = local_assigns[:admin_view] || !Feature.enabled?(:project_list_filter_bar) ? 'input-short js-projects-list-filter' : '' -- placeholder = local_assigns[:search_form_placeholder] ? search_form_placeholder : 'Filter by name...' +- placeholder = local_assigns[:search_form_placeholder] ? search_form_placeholder : _('Filter by name') = form_tag filter_projects_path, method: :get, class: 'project-filter-form', data: { qa_selector: 'project_filter_form_container' }, id: 'project-filter-form' do |f| = search_field_tag :name, params[:name], diff --git a/app/views/shared/runners/_form.html.haml b/app/views/shared/runners/_form.html.haml index e0079a95cec..024b06fe97a 100644 --- a/app/views/shared/runners/_form.html.haml +++ b/app/views/shared/runners/_form.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for runner, url: runner_form_url do |f| - = form_errors(runner, pajamas_alert: true) + = form_errors(runner) .form-group.row = label :active, _("Active"), class: 'col-form-label col-sm-2' .col-sm-10 diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml index fe68244f1da..afe72767b9a 100644 --- a/app/views/shared/web_hooks/_form.html.haml +++ b/app/views/shared/web_hooks/_form.html.haml @@ -1,4 +1,4 @@ -= form_errors(hook, pajamas_alert: true) += form_errors(hook) .form-group = form.label :url, s_('Webhooks|URL'), class: 'label-bold' diff --git a/app/views/shared/web_hooks/_index.html.haml b/app/views/shared/web_hooks/_index.html.haml index 5d07b0f95ab..5ec82ad6702 100644 --- a/app/views/shared/web_hooks/_index.html.haml +++ b/app/views/shared/web_hooks/_index.html.haml @@ -1,5 +1,5 @@ %hr -.card +.card#webhooks-index .card-header %h5 = hook_class.underscore.humanize.titleize.pluralize diff --git a/app/views/shared/web_hooks/_web_hook_disabled_alert.html.haml b/app/views/shared/web_hooks/_web_hook_disabled_alert.html.haml new file mode 100644 index 00000000000..d9155b397b8 --- /dev/null +++ b/app/views/shared/web_hooks/_web_hook_disabled_alert.html.haml @@ -0,0 +1,13 @@ +- return unless show_project_hook_failed_callout?(project: @project) + +- content_for :after_flash_content do + = render Pajamas::AlertComponent.new(variant: :danger, + title: s_('Webhooks|Webhook disabled'), + alert_options: { class: 'gl-my-4 js-web-hook-disabled-callout', + data: { feature_id: Users::CalloutsHelper::WEB_HOOK_DISABLED, dismiss_endpoint: project_callouts_path, project_id: @project.id, defer_links: 'true'} }) do |c| + = c.body do + = s_('Webhooks|A webhook in this project was automatically disabled after being retried multiple times.') + = succeed '.' do + = link_to _('Learn more'), help_page_path('user/project/integrations/webhooks', anchor: 'troubleshoot-webhooks'), target: '_blank', rel: 'noopener noreferrer' + = c.actions do + = link_to s_('Webhooks|Go to webhooks'), project_hooks_path(@project, anchor: 'webhooks-index'), class: 'btn gl-alert-action btn-confirm gl-button' diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml index 0d5e59919cb..34bedbd928a 100644 --- a/app/views/shared/wikis/_form.html.haml +++ b/app/views/shared/wikis/_form.html.haml @@ -1,6 +1,6 @@ - page_info = { last_commit_sha: @page.last_commit_sha, persisted: @page.persisted?, title: @page.title, content: @page.content || '', format: @page.format.to_s, uploads_path: uploads_path, path: wiki_page_path(@wiki, @page), wiki_path: wiki_path(@wiki), help_path: help_page_path('user/project/wiki/index'), markdown_help_path: help_page_path('user/markdown'), markdown_preview_path: wiki_page_path(@wiki, @page, action: :preview_markdown), create_path: wiki_path(@wiki, action: :create) } .gl-mt-3 - = form_errors(@page, truncate: :title, pajamas_alert: true) + = form_errors(@page, truncate: :title) #js-wiki-form{ data: { page_info: page_info.to_json, format_options: wiki_markup_hash_by_name_id.to_json } } diff --git a/app/views/shared/wikis/_wiki_content.html.haml b/app/views/shared/wikis/_wiki_content.html.haml index 42e8037bb0f..780e4c4746d 100644 --- a/app/views/shared/wikis/_wiki_content.html.haml +++ b/app/views/shared/wikis/_wiki_content.html.haml @@ -1,2 +1,2 @@ -.js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json } } +.js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki-page-content', tracking_context: wiki_page_tracking_context(@page).to_json } } = render_wiki_content(@page) diff --git a/app/views/shared/wikis/git_error.html.haml b/app/views/shared/wikis/git_error.html.haml index dab3b940b9a..12eddb4a61e 100644 --- a/app/views/shared/wikis/git_error.html.haml +++ b/app/views/shared/wikis/git_error.html.haml @@ -9,6 +9,6 @@ .gl-mt-5.gl-mb-3 .gl-display-flex.gl-justify-content-space-between %h2.gl-mt-0.gl-mb-5{ data: { qa_selector: 'wiki_page_title', testid: 'wiki_page_title' } }= @page ? @page.human_title : _('Failed to retrieve page') - .js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content' } } + .js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki-page-content' } } = _('The page could not be displayed because it timed out.') = html_escape(_('You can view the source or %{linkStart}%{cloneIcon} clone the repository%{linkEnd}')) % { linkStart: "<a href=\"#{git_access_url}\">".html_safe, linkEnd: '</a>'.html_safe, cloneIcon: sprite_icon('download', css_class: 'gl-mr-2').html_safe } diff --git a/app/views/shared/wikis/show.html.haml b/app/views/shared/wikis/show.html.haml index 6591e8fae7b..3841113231c 100644 --- a/app/views/shared/wikis/show.html.haml +++ b/app/views/shared/wikis/show.html.haml @@ -27,6 +27,6 @@ - if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding = link_to sprite_icon('pencil', css_class: 'gl-icon'), wiki_page_path(@wiki, @page, action: :edit), title: 'Edit', role: "button", class: 'btn gl-button btn-icon btn-default js-wiki-edit', data: { qa_selector: 'edit_page_button', testid: 'wiki_edit_button' } - .js-async-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json, get_wiki_content_url: wiki_page_render_api_endpoint(@page) } } + .js-async-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki-page-content', tracking_context: wiki_page_tracking_context(@page).to_json, get_wiki_content_url: wiki_page_render_api_endpoint(@page) } } = render 'shared/wikis/sidebar' |