diff options
Diffstat (limited to 'app/views/shared')
24 files changed, 165 insertions, 149 deletions
diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index f03314563cb..3ab2b969b75 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -9,17 +9,12 @@ = f.text_field :import_url, value: import_url.sanitized_url, autocomplete: 'off', class: 'form-control gl-form-input', placeholder: 'https://gitlab.company.com/group/project.git', required: true = render 'shared/global_alert', - variant: :warning, - alert_class: 'gl-mt-3 js-import-url-warning hide', + variant: :danger, + alert_class: 'gl-mt-3 js-import-url-error hide', dismissible: false, close_button_class: 'js-close-2fa-enabled-success-alert' do .gl-alert-body - = s_('Import|A repository URL usually ends in a .git suffix, although this is not required. Double check to make sure your repository URL is correct.') - - .gl-alert.gl-alert-not-dismissible.gl-alert-warning.gl-mt-3.hide#project_import_url_warning - .gl-alert-container - = sprite_icon('warning-solid', css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content{ role: 'alert' } + = s_('Import|There is not a valid Git repository at this URL. If your HTTP repository is not publicly accessible, verify your credentials.') .row .form-group.col-md-6 = f.label :import_url_user, class: 'label-bold' do diff --git a/app/views/shared/_milestones_filter.html.haml b/app/views/shared/_milestones_filter.html.haml index eb50960202a..117ed212fd9 100644 --- a/app/views/shared/_milestones_filter.html.haml +++ b/app/views/shared/_milestones_filter.html.haml @@ -1,13 +1,15 @@ -%ul.nav-links.mobile-separator.nav.nav-tabs - %li{ class: milestone_class_for_state(params[:state], 'opened', true) }> - = link_to milestones_filter_path(state: 'opened') do - = _('Open') - %span.badge.badge-pill= counts[:opened] - %li{ class: milestone_class_for_state(params[:state], 'closed') }> - = link_to milestones_filter_path(state: 'closed', sort: 'due_date_desc') do - = _('Closed') - %span.badge.badge-pill= counts[:closed] - %li{ class: milestone_class_for_state(params[:state], 'all') }> - = link_to milestones_filter_path(state: 'all', sort: 'due_date_desc') do - = _('All') - %span.badge.badge-pill= counts[:all] +- count_badge_classes = 'badge badge-muted badge-pill gl-badge gl-tab-counter-badge sm gl-display-none gl-sm-display-inline-flex' + += gl_tabs_nav( {class: 'gl-border-b-0 gl-flex-grow-1', data: { testid: 'milestones-filter' } } ) do + = gl_tab_link_to milestones_filter_path(state: 'opened'), { item_active: params[:state].blank? || params[:state] == 'opened' } do + = _('Open') + %span{ class: count_badge_classes } + = counts[:opened] + = gl_tab_link_to milestones_filter_path(state: 'closed', sort: 'due_date_desc'), { item_active: params[:state] == 'closed' } do + = _('Closed') + %span{ class: count_badge_classes } + = counts[:closed] + = gl_tab_link_to milestones_filter_path(state: 'all', sort: 'due_date_desc'), { item_active: params[:state] == 'all' } do + = _('All') + %span{ class: count_badge_classes } + = counts[:all] diff --git a/app/views/shared/_web_ide_path.html.haml b/app/views/shared/_web_ide_path.html.haml new file mode 100644 index 00000000000..73d00bcd408 --- /dev/null +++ b/app/views/shared/_web_ide_path.html.haml @@ -0,0 +1,4 @@ += javascript_tag do + :plain + window.gl = window.gl || {}; + window.gl.webIDEPath = '#{web_ide_url}' diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml index 98752345074..165564c5666 100644 --- a/app/views/shared/boards/_show.html.haml +++ b/app/views/shared/boards/_show.html.haml @@ -2,7 +2,7 @@ - @no_breadcrumb_container = true - @no_container = true - @content_wrapper_class = "#{@content_wrapper_class} gl-relative" -- @content_class = "issue-boards-content js-focus-mode-board" +- @content_class = "js-focus-mode-board" - is_epic_board = board.to_type == "EpicBoard" - if is_epic_board - breadcrumb_title _("Epic Boards") diff --git a/app/views/shared/builds/_build_output.html.haml b/app/views/shared/builds/_build_output.html.haml index 380fac4d0e4..a3b7d4926f8 100644 --- a/app/views/shared/builds/_build_output.html.haml +++ b/app/views/shared/builds/_build_output.html.haml @@ -1,4 +1,4 @@ -%pre.build-trace#build-trace +%pre.build-log %code.bash.js-build-output .build-loader-animation.js-build-refresh .dot diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml index 4973309edf5..498e9cc33ce 100644 --- a/app/views/shared/builds/_tabs.html.haml +++ b/app/views/shared/builds/_tabs.html.haml @@ -1,24 +1,19 @@ -%ul.nav-links.mobile-separator.nav.nav-tabs - %li{ class: active_when(scope.nil?) }> - = link_to build_path_proc.call(nil) do - All - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm.js-totalbuilds-count - = limited_counter_with_delimiter(all_builds) +- count_badge_classes = 'badge badge-muted badge-pill gl-badge gl-tab-counter-badge sm gl-display-none gl-sm-display-inline-flex' - %li{ class: active_when(scope == 'pending') }> - = link_to build_path_proc.call('pending') do - Pending - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = limited_counter_with_delimiter(all_builds.pending) - - %li{ class: active_when(scope == 'running') }> - = link_to build_path_proc.call('running') do - Running - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = limited_counter_with_delimiter(all_builds.running) - - %li{ class: active_when(scope == 'finished') }> - = link_to build_path_proc.call('finished') do - Finished - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = limited_counter_with_delimiter(all_builds.finished) += gl_tabs_nav( {class: 'gl-border-b-0 gl-flex-grow-1', data: { testid: 'jobs-tabs' } } ) do + = gl_tab_link_to build_path_proc.call(nil), { item_active: scope.nil? } do + = _('All') + %span{ class: count_badge_classes } + = limited_counter_with_delimiter(all_builds) + = gl_tab_link_to build_path_proc.call('pending'), { item_active: scope == 'pending' } do + = _('Pending') + %span{ class: count_badge_classes } + = limited_counter_with_delimiter(all_builds.pending) + = gl_tab_link_to build_path_proc.call('running'), { item_active: scope == 'running' } do + = _('Running') + %span{ class: count_badge_classes } + = limited_counter_with_delimiter(all_builds.running) + = gl_tab_link_to build_path_proc.call('finished'), { item_active: scope == 'finished' } do + = _('Finished') + %span{ class: count_badge_classes } + = limited_counter_with_delimiter(all_builds.finished) diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index 652da4b396a..e049afbc40b 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -4,7 +4,6 @@ = s_('DeployTokens|Create a new deploy token for all projects in this group. %{link_start}What are deploy tokens?%{link_end}').html_safe % { link_start: group_deploy_tokens_help_link_start, link_end: '</a>'.html_safe } = form_for token, url: create_deploy_token_path(group_or_project, anchor: 'js-deploy-tokens'), method: :post, remote: Feature.enabled?(:ajax_new_deploy_token, group_or_project) do |f| - = form_errors(token) .form-group = f.label :name, class: 'label-bold' diff --git a/app/views/shared/empty_states/_topics.html.haml b/app/views/shared/empty_states/_topics.html.haml new file mode 100644 index 00000000000..fd82a853037 --- /dev/null +++ b/app/views/shared/empty_states/_topics.html.haml @@ -0,0 +1,7 @@ +.row.empty-state + .col-12 + .svg-content + = image_tag 'illustrations/labels.svg', data: { qa_selector: 'svg_content' } + .text-content.gl-text-center.gl-pt-0! + %h4= _('There are no topics to show.') + %p= _('Add topics to projects to help users find them.') diff --git a/app/views/shared/errors/_gitaly_unavailable.html.haml b/app/views/shared/errors/_gitaly_unavailable.html.haml new file mode 100644 index 00000000000..96a68cbcdc6 --- /dev/null +++ b/app/views/shared/errors/_gitaly_unavailable.html.haml @@ -0,0 +1,8 @@ +.gl-alert.gl-alert-danger.gl-mb-5.gl-mt-5 + .gl-alert-container + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-content + .gl-alert-title + = reason + .gl-alert-body + = s_('The git server, Gitaly, is not available at this time. Please contact your administrator.') diff --git a/app/views/shared/hook_logs/_recent_deliveries_table.html.haml b/app/views/shared/hook_logs/_recent_deliveries_table.html.haml new file mode 100644 index 00000000000..31ef8560781 --- /dev/null +++ b/app/views/shared/hook_logs/_recent_deliveries_table.html.haml @@ -0,0 +1,34 @@ +%table.gl-table.gl-w-full + %thead + %tr + %th= _('Status') + %th.d-none.d-sm-table-cell= _('Trigger') + %th= _('Elapsed time') + %th= _('Request time') + %th + + - if hook_logs.present? + - hook_logs.each do |hook_log| + %tr + %td + = render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log } + %td.d-none.d-sm-table-cell + %span.badge.badge-pill.gl-badge.badge-muted.sm + = hook_log.trigger.singularize.titleize + %td + #{number_with_precision(hook_log.execution_duration, precision: 2)} sec + %td + = time_ago_with_tooltip(hook_log.created_at) + %td + = link_to _('View details'), hook_log_path(hook, hook_log) + + +- if hook_logs.present? + = paginate hook_logs, theme: 'gitlab' +- else + .gl-text-center.gl-mt-7 + %h4= _('No webhook events') + %p + %span.gl-display-block= _('Webhook events will be displayed here.') + %span= _('Use the %{strongStart}Test%{strongEnd} option above to create an event.').html_safe % { strongStart: '<strong>'.html_safe, strongEnd: '</strong>'.html_safe } + diff --git a/app/views/shared/hook_logs/_status_label.html.haml b/app/views/shared/hook_logs/_status_label.html.haml index dfa5ecee448..b930074303c 100644 --- a/app/views/shared/hook_logs/_status_label.html.haml +++ b/app/views/shared/hook_logs/_status_label.html.haml @@ -1,3 +1,3 @@ - label_status = hook_log.success? ? 'badge-success' : 'badge-danger' -%span{ class: "badge #{label_status}" } +%span{ class: "badge badge-pill gl-badge sm #{label_status}" } = hook_log.internal_error? ? _('Error') : hook_log.response_status diff --git a/app/views/shared/integrations/_tabs.html.haml b/app/views/shared/integrations/_tabs.html.haml index 553401e47bd..d6ca0bd7d1e 100644 --- a/app/views/shared/integrations/_tabs.html.haml +++ b/app/views/shared/integrations/_tabs.html.haml @@ -1,18 +1,11 @@ -- active_tab = local_assigns.fetch(:active_tab, 'edit') -- active_classes = 'gl-tab-nav-item-active gl-tab-nav-item-active-indigo active' -- tabs = integration_tabs(integration: integration) - -- if tabs.length <= 1 - = yield -- else +- if integration.instance_level? .tabs.gl-tabs %div - %ul.nav.gl-tabs-nav{ role: 'tablist' } - - tabs.each do |tab| - %li.nav-item{ role: 'presentation' } - %a.nav-link.gl-tab-nav-item{ role: 'tab', class: (active_classes if tab[:key] == active_tab), href: tab[:href] } - = tab[:text] + = gl_tabs_nav({ class: 'gl-mb-5' }) do + = gl_tab_link_to _('Settings'), scoped_edit_integration_path(integration) + = gl_tab_link_to s_('Integrations|Projects using custom settings'), scoped_overrides_integration_path(integration) - .tab-content.gl-tab-content - .tab-pane.gl-pt-3.active{ role: 'tabpanel' } - = yield + = yield + +- else + = yield diff --git a/app/views/shared/issuable/_nav.html.haml b/app/views/shared/issuable/_nav.html.haml index cff50eef88b..4a33f625347 100644 --- a/app/views/shared/issuable/_nav.html.haml +++ b/app/views/shared/issuable/_nav.html.haml @@ -2,22 +2,16 @@ - page_context_word = type.to_s.humanize(capitalize: false) - display_count = local_assigns.fetch(:display_count, true) -%ul.nav-links.issues-state-filters.mobile-separator.nav.nav-tabs - %li{ class: active_when(params[:state] == 'opened') }> - = link_to page_filter_path(state: 'opened'), id: 'state-opened', title: _("Filter by %{page_context_word} that are currently open.") % { page_context_word: page_context_word }, data: { state: 'opened' } do - #{issuables_state_counter_text(type, :opened, display_count)} - += gl_tabs_nav({ class: 'issues-state-filters gl-border-b-0 gl-flex-grow-1' }) do + = gl_tab_link_to page_filter_path(state: 'opened'), { item_active: params[:state] == 'opened', id: 'state-opened', title: _("Filter by %{page_context_word} that are currently open.") % { page_context_word: page_context_word }, data: { state: 'opened' } } do + #{issuables_state_counter_text(type, :opened, display_count)} - if type == :merge_requests - %li{ class: active_when(params[:state] == 'merged') }> - = link_to page_filter_path(state: 'merged'), id: 'state-merged', title: _('Filter by merge requests that are currently merged.'), data: { state: 'merged' } do - #{issuables_state_counter_text(type, :merged, display_count)} - - %li{ class: active_when(params[:state] == 'closed') }> - = link_to page_filter_path(state: 'closed'), id: 'state-closed', title: _('Filter by merge requests that are currently closed and unmerged.'), data: { state: 'closed' } do - #{issuables_state_counter_text(type, :closed, display_count)} + = gl_tab_link_to page_filter_path(state: 'merged'), item_active: params[:state] == 'merged', id: 'state-merged', title: _('Filter by merge requests that are currently merged.'), data: { state: 'merged' } do + #{issuables_state_counter_text(type, :merged, display_count)} + = gl_tab_link_to page_filter_path(state: 'closed'), item_active: params[:state] == 'closed', id: 'state-closed', title: _('Filter by merge requests that are currently closed and unmerged.'), data: { state: 'closed' } do + #{issuables_state_counter_text(type, :closed, display_count)} - else - %li{ class: active_when(params[:state] == 'closed') }> - = link_to page_filter_path(state: 'closed'), id: 'state-closed', title: _('Filter by issues that are currently closed.'), data: { state: 'closed', qa_selector: 'closed_issues_link' } do - #{issuables_state_counter_text(type, :closed, display_count)} + = gl_tab_link_to page_filter_path(state: 'closed'), item_active: params[:state] == 'closed', id: 'state-closed', title: _('Filter by issues that are currently closed.'), data: { state: 'closed', qa_selector: 'closed_issues_link' } do + #{issuables_state_counter_text(type, :closed, display_count)} = render 'shared/issuable/nav_links/all', page_context_word: page_context_word, counter: issuables_state_counter_text(type, :all, display_count) diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index e6c4b3f4814..81a7581d392 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -19,7 +19,7 @@ - if params[:search].present? = hidden_field_tag :search, params[:search] - if @can_bulk_update - .check-all-holder.d-none.d-sm-block.hidden + .check-all-holder.gl-display-none.gl-sm-display-block.hidden.gl-float-left.gl-mr-5.gl-line-height-36 - checkbox_id = 'check-all-issues' %label.gl-sr-only{ for: checkbox_id }= _('Select all') = check_box_tag checkbox_id, nil, false, class: "check-all-issues left" diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 1e8724c3448..62539bfeffd 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -7,6 +7,7 @@ - can_edit_issuable = issuable_sidebar.dig(:current_user, :can_edit) - add_page_startup_api_call "#{issuable_sidebar[:issuable_json_path]}?serializer=sidebar_extras" - reviewers = local_assigns.fetch(:reviewers, nil) +- in_group_context_with_iterations = @project.group.present? && issuable_sidebar[:supports_iterations] %aside.right-sidebar.js-right-sidebar.js-issuable-sidebar{ data: { signed: { in: signed_in }, issuable_type: issuable_type }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite', 'aria-label': issuable_type } .issuable-sidebar @@ -28,11 +29,11 @@ = render_if_exists 'shared/issuable/sidebar_item_epic', issuable_sidebar: issuable_sidebar, group_path: @project.group.full_path, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid], issuable_type: issuable_type - if issuable_sidebar[:supports_milestone] - .block.milestone{ :class => ("gl-border-b-0!" if issuable_sidebar[:supports_iterations]), data: { qa_selector: 'milestone_block' } } + .block.milestone{ :class => ("gl-border-b-0!" if in_group_context_with_iterations), data: { qa_selector: 'milestone_block' } } .js-milestone-select{ data: { can_edit: can_edit_issuable.to_s, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid] } } - - if @project.group.present? && issuable_sidebar[:supports_iterations] - .block{ class: 'gl-pt-0!', data: { qa_selector: 'iteration_container' } } + - if in_group_context_with_iterations + .block{ class: 'gl-pt-0! gl-collapse-empty', data: { qa_selector: 'iteration_container', testid: 'iteration_container' } }< = render_if_exists 'shared/issuable/iteration_select', can_edit: can_edit_issuable.to_s, group_path: @project.group.full_path, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid], issuable_type: issuable_type - if issuable_sidebar[:supports_time_tracking] @@ -55,11 +56,13 @@ .js-sidebar-status-entry-point{ data: sidebar_status_data(issuable_sidebar, @project) } - if issuable_sidebar.has_key?(:confidential) + -# haml-lint:disable InlineJavaScript %script#js-confidential-issue-data{ type: "application/json" }= { is_confidential: issuable_sidebar[:confidential], is_editable: can_edit_issuable }.to_json.html_safe #js-confidential-entry-point = render_if_exists 'shared/issuable/sidebar_cve_id_request', issuable_sidebar: issuable_sidebar + -# haml-lint:disable InlineJavaScript %script#js-lock-issue-data{ type: "application/json" }= { is_locked: !!issuable_sidebar[:discussion_locked], is_editable: can_edit_issuable }.to_json.html_safe #js-lock-entry-point @@ -72,7 +75,7 @@ #js-reference-entry-point - if issuable_type == 'merge_request' .sub-block.js-sidebar-source-branch - .sidebar-collapsed-icon.dont-change-state + .sidebar-collapsed-icon.js-dont-change-state = clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport') .gl-display-flex.gl-align-items-center.gl-justify-content-space-between.gl-mb-2.hide-collapsed %span.gl-overflow-hidden.gl-text-overflow-ellipsis.gl-white-space-nowrap diff --git a/app/views/shared/issuable/nav_links/_all.html.haml b/app/views/shared/issuable/nav_links/_all.html.haml index c92a50bcb70..7afa194d5db 100644 --- a/app/views/shared/issuable/nav_links/_all.html.haml +++ b/app/views/shared/issuable/nav_links/_all.html.haml @@ -1,6 +1,5 @@ - page_context_word = local_assigns.fetch(:page_context_word) - counter = local_assigns.fetch(:counter) -%li{ class: active_when(params[:state] == 'all') }> - = link_to page_filter_path(state: 'all'), id: 'state-all', title: "Show all #{page_context_word}.", data: { state: 'all' } do - #{counter} += gl_tab_link_to page_filter_path(state: 'all'), item_active: params[:state] == 'all', id: 'state-all', title: _("Show all %{issuable_type}.") % { issuable_type: page_context_word }, data: { state: 'all' } do + #{counter} diff --git a/app/views/shared/issue_type/_emoji_block.html.haml b/app/views/shared/issue_type/_emoji_block.html.haml index 26d30341999..d2c851a4e49 100644 --- a/app/views/shared/issue_type/_emoji_block.html.haml +++ b/app/views/shared/issue_type/_emoji_block.html.haml @@ -4,7 +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 + .new-branch-col.gl-my-2.gl-font-size-0 = 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 } } diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index 56b2b0d5801..c66ba5ba2e1 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -161,11 +161,11 @@ - milestone_ref = milestone.try(:to_reference, full: true) - if milestone_ref.present? .block.reference - .sidebar-collapsed-icon.dont-change-state + .sidebar-collapsed-icon.js-dont-change-state = clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport') .cross-project-reference.hide-collapsed - %span + %span.gl-display-inline-block.gl-text-truncate = s_('MilestoneSidebar|Reference:') %span{ title: milestone_ref } = milestone_ref - = clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport') + = clipboard_button(text: milestone_ref, title: s_('MilestoneSidebar|Copy reference'), placement: "left", boundary: 'viewport', class: 'btn-clipboard btn-transparent gl-float-right gl-bg-gray-10') diff --git a/app/views/shared/notes/_comment_button.html.haml b/app/views/shared/notes/_comment_button.html.haml index d0a2d97df0f..3e880a36e29 100644 --- a/app/views/shared/notes/_comment_button.html.haml +++ b/app/views/shared/notes/_comment_button.html.haml @@ -1,31 +1,4 @@ - noteable_name = @note.noteable.human_class_name -.float-left.btn-group.gl-sm-mr-3.droplab-dropdown.comment-type-dropdown.js-comment-type-dropdown +.js-comment-type-dropdown.float-left.gl-sm-mr-3{ data: { noteable_name: noteable_name } } %input.btn.gl-button.btn-confirm.js-comment-button.js-comment-submit-button{ type: 'submit', value: _('Comment'), data: { qa_selector: 'comment_button' } } - - - if @note.can_be_discussion_note? - = button_tag type: 'button', class: 'gl-button btn dropdown-toggle btn-confirm js-note-new-discussion js-disable-on-submit', data: { 'dropdown-trigger' => '#resolvable-comment-menu' }, 'aria-label' => _('Open comment type dropdown') do - = sprite_icon('chevron-down') - - %ul#resolvable-comment-menu.dropdown-menu.dropdown-open-top{ data: { dropdown: true } } - %li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => _('Comment'), 'close-text' => _("Comment & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Comment & reopen %{noteable_name}") % { noteable_name: noteable_name } } } - %button.btn.gl-button.btn-default-tertiary - = sprite_icon('check', css_class: 'icon') - .description - %strong= _("Comment") - %p - = _("Add a general comment to this %{noteable_name}.") % { noteable_name: noteable_name } - - %li.divider.droplab-item-ignore - - %li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => _('Start thread'), 'close-text' => _("Start thread & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Start thread & reopen %{noteable_name}") % { noteable_name: noteable_name } } } - %button.btn.gl-button.btn-default-tertiary - = sprite_icon('check', css_class: 'icon') - .description - %strong= _("Start thread") - %p - = succeed '.' do - - if @note.noteable.supports_resolvable_notes? - = _('Discuss a specific suggestion or question that needs to be resolved') - - else - = _('Discuss a specific suggestion or question') diff --git a/app/views/shared/notes/_hints.html.haml b/app/views/shared/notes/_hints.html.haml index a03e8446f5d..6231f817704 100644 --- a/app/views/shared/notes/_hints.html.haml +++ b/app/views/shared/notes/_hints.html.haml @@ -1,4 +1,5 @@ - supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false) +- supports_file_upload = local_assigns.fetch(:supports_file_upload, true) .comment-toolbar.clearfix .toolbar-text = link_to _('Markdown'), help_page_path('user/markdown'), target: '_blank' @@ -10,33 +11,34 @@ is supported - %span.uploading-container - %span.uploading-progress-container.hide - = 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% - = loading_icon(css_class: 'align-text-bottom gl-mr-2') - - %span.uploading-error-container.hide - %span.uploading-error-icon + - if supports_file_upload + %span.uploading-container + %span.uploading-progress-container.hide = 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.btn.gl-button.btn-link.gl-vertical-align-baseline.retry-uploading-link - %span.gl-button-text - = _("Try again") - = _("or") - %button.btn.gl-button.btn-link.attach-new-file.markdown-selector.gl-vertical-align-baseline - %span.gl-button-text - = _("attach a new file") - = _(".") + %span.attaching-file-message + -# Populated by app/assets/javascripts/dropzone_input.js + %span.uploading-progress 0% + = loading_icon(css_class: 'align-text-bottom gl-mr-2') - %button.btn.gl-button.btn-link.button-attach-file.markdown-selector.button-attach-file.gl-vertical-align-text-bottom - = sprite_icon('media') - %span.gl-button-text - = _("Attach a file") + %span.uploading-error-container.hide + %span.uploading-error-icon + = 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.btn.gl-button.btn-link.gl-vertical-align-baseline.retry-uploading-link + %span.gl-button-text + = _("Try again") + = _("or") + %button.btn.gl-button.btn-link.attach-new-file.markdown-selector.gl-vertical-align-baseline + %span.gl-button-text + = _("attach a new file") + = _(".") - %button.btn.gl-button.btn-link.button-cancel-uploading-files.gl-vertical-align-baseline.hide - %span.gl-button-text - = _("Cancel") + %button.btn.gl-button.btn-link.button-attach-file.markdown-selector.button-attach-file.gl-vertical-align-text-bottom + = sprite_icon('media') + %span.gl-button-text + = _("Attach a file") + + %button.btn.gl-button.btn-link.button-cancel-uploading-files.gl-vertical-align-baseline.hide + %span.gl-button-text + = _("Cancel") diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml index f7f5c02370d..e34f412baa4 100644 --- a/app/views/shared/notes/_notes_with_form.html.haml +++ b/app/views/shared/notes/_notes_with_form.html.haml @@ -25,4 +25,5 @@ = sprite_icon('lock', css_class: 'icon') %span = 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/topics/_search_form.html.haml b/app/views/shared/topics/_search_form.html.haml new file mode 100644 index 00000000000..97343983b3c --- /dev/null +++ b/app/views/shared/topics/_search_form.html.haml @@ -0,0 +1,7 @@ += form_tag page_filter_path, method: :get, class: "topic-filter-form js-topic-filter-form", id: 'topic-filter-form' do |f| + = search_field_tag :search, params[:search], + placeholder: s_('Filter by name'), + class: 'topic-filter-form-field form-control input-short', + spellcheck: false, + id: 'topic-filter-form-field', + autofocus: local_assigns[:autofocus] diff --git a/app/views/shared/web_hooks/_hook.html.haml b/app/views/shared/web_hooks/_hook.html.haml index abe23d0be78..fd124c2967d 100644 --- a/app/views/shared/web_hooks/_hook.html.haml +++ b/app/views/shared/web_hooks/_hook.html.haml @@ -5,12 +5,12 @@ %div - hook.class.triggers.each_value do |trigger| - if hook.public_send(trigger) - %span.gl-badge.gl-bg-gray-10.gl-mt-2.rounded.deploy-project-label= trigger.to_s.titleize - %span.gl-badge.gl-bg-gray-10.gl-mt-2.rounded + %span.gl-badge.badge-muted.badge-pill.sm.gl-mt-2.deploy-project-label= trigger.to_s.titleize + %span.gl-badge.badge-muted.badge-pill.sm.gl-mt-2 = _('SSL Verification:') = hook.enable_ssl_verification ? _('enabled') : _('disabled') .col-md-4.col-lg-5.text-right-md.gl-mt-2 %span>= render 'shared/web_hooks/test_button', hook: hook, button_class: 'btn-sm btn-default gl-mr-3' %span>= link_to _('Edit'), edit_hook_path(hook), class: 'btn gl-button btn-default btn-sm gl-mr-3' - = link_to _('Delete'), destroy_hook_path(hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn gl-button btn-default btn-sm' + = link_to _('Delete'), destroy_hook_path(hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn gl-button btn-secondary btn-danger-secondary btn-sm' diff --git a/app/views/shared/wikis/edit.html.haml b/app/views/shared/wikis/edit.html.haml index 15710f0df49..e0860bc473d 100644 --- a/app/views/shared/wikis/edit.html.haml +++ b/app/views/shared/wikis/edit.html.haml @@ -4,7 +4,7 @@ - if @error #js-wiki-error{ data: { error: @error, wiki_page_path: wiki_page_path(@wiki, @page) } } -.wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row +.js-wiki-edit-page.wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button %h3.page-title.gl-flex-grow-1 |