diff options
Diffstat (limited to 'app/views/shared')
38 files changed, 149 insertions, 103 deletions
diff --git a/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml b/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml index 6f70c927147..f788bf53a4c 100644 --- a/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml +++ b/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml @@ -1,13 +1,14 @@ - if show_auto_devops_implicitly_enabled_banner?(project, current_user) - .qa-auto-devops-banner.auto-devops-implicitly-enabled-banner.gl-alert.gl-alert-info - = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss'), class: 'hide-auto-devops-implicitly-enabled-banner alert-link', data: { project_id: project.id } } - = sprite_icon('close', css_class: 'gl-icon') + = render 'shared/global_alert', + variant: :info, + alert_class: 'qa-auto-devops-banner auto-devops-implicitly-enabled-banner', + close_button_class: 'hide-auto-devops-implicitly-enabled-banner', + close_button_data: { project_id: project.id } do .gl-alert-body = s_("AutoDevOps|The Auto DevOps pipeline has been enabled and will be used if no alternative CI configuration file is found.") - - unless Gitlab.config.registry.enabled - %div - = _('Container registry is not enabled on this GitLab instance. Ask an administrator to enable it in order for Auto DevOps to work.') - .gl-alert-actions.gl-mt-3 + - unless Gitlab.config.registry.enabled + %div + = _('Container registry is not enabled on this GitLab instance. Ask an administrator to enable it in order for Auto DevOps to work.') + .gl-alert-actions = link_to _('Settings'), project_settings_ci_cd_path(project), class: 'alert-link btn gl-button btn-info' = link_to _('More information'), help_page_path('topics/autodevops/index.md'), target: '_blank', class: 'alert-link btn gl-button btn-default gl-ml-2' diff --git a/app/views/shared/_confirm_fork_modal.html.haml b/app/views/shared/_confirm_fork_modal.html.haml index ed52aa01047..96b128eb2ec 100644 --- a/app/views/shared/_confirm_fork_modal.html.haml +++ b/app/views/shared/_confirm_fork_modal.html.haml @@ -4,7 +4,7 @@ .modal-header %h3.page-title= _('Fork project?') %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": true } × + %span{ "aria-hidden": "true" } × .modal-body.p-3 %p= _("You can’t %{tag_start}edit%{tag_end} files directly in this project. Fork this project and submit a merge request with your changes.") % { tag_start: '', tag_end: ''} .modal-footer diff --git a/app/views/shared/_confirm_modal.html.haml b/app/views/shared/_confirm_modal.html.haml index 4e7e5c9d3ba..8b13bb948ee 100644 --- a/app/views/shared/_confirm_modal.html.haml +++ b/app/views/shared/_confirm_modal.html.haml @@ -4,7 +4,7 @@ .modal-header %h3.page-title= _('Confirmation required') %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": true } × + %span{ "aria-hidden": "true" } × .modal-body %p.text-danger.js-confirm-text diff --git a/app/views/shared/_global_alert.html.haml b/app/views/shared/_global_alert.html.haml new file mode 100644 index 00000000000..bebc72fe428 --- /dev/null +++ b/app/views/shared/_global_alert.html.haml @@ -0,0 +1,20 @@ +- icons = { info: 'information-o', warning: 'warning', success: 'check-circle', danger: 'error', tip: 'bulb' } + +- title = local_assigns.fetch(:title, nil) +- variant = local_assigns.fetch(:variant, :info) +- alert_class = local_assigns.fetch(:alert_class, nil) +- alert_data = local_assigns.fetch(:alert_data, nil) +- close_button_class = local_assigns.fetch(:close_button_class, nil) +- close_button_data = local_assigns.fetch(:close_button_data, nil) +- icon = icons[variant] + +%div{ role: 'alert', class: ["gl-alert-#{variant}", alert_class], data: alert_data } + %div{ class: [container_class, @content_class, 'gl-px-0!'] } + .gl-alert + = sprite_icon(icon, size: 16, css_class: "gl-alert-icon#{' gl-alert-icon-no-title' if title.nil?}") + %button.gl-alert-dismiss.js-close{ type: 'button', aria: { label: _('Close') }, class: close_button_class, data: close_button_data } + = sprite_icon('close', size: 16) + - if title + .gl-alert-title + = title + = yield diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index cf9ee1a5231..65e02341936 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -6,14 +6,8 @@ = f.label :import_url, class: 'label-bold' do %span = _('Git repository URL') - = 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, - pattern: '(?:git|https?):\/\/.*/.*\.git$', - title: _('Please provide a valid URL ending with .git') + = 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 .row .form-group.col-md-6 diff --git a/app/views/shared/_search_settings.html.haml b/app/views/shared/_search_settings.html.haml index 2974b2bf4d0..7265f090967 100644 --- a/app/views/shared/_search_settings.html.haml +++ b/app/views/shared/_search_settings.html.haml @@ -1,3 +1,5 @@ +- return if @hide_search_settings + - container_class = local_assigns.fetch(:container_class, 'gl-mt-5') %div{ class: container_class } diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 7af356c0820..c70fce7a38f 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -7,7 +7,7 @@ .js-integration-help-html.gl-display-none -# All content below will be repositioned in Vue - if lookup_context.template_exists?('help', "projects/services/#{integration.to_param}", true) - = render "projects/services/#{integration.to_param}/help", subject: integration + = render "projects/services/#{integration.to_param}/help", integration: integration - elsif integration.help.present? .info-well .well-segment diff --git a/app/views/shared/_sidebar_toggle_button.html.haml b/app/views/shared/_sidebar_toggle_button.html.haml index 9d1970093b8..a5a411db8a0 100644 --- a/app/views/shared/_sidebar_toggle_button.html.haml +++ b/app/views/shared/_sidebar_toggle_button.html.haml @@ -1,8 +1,9 @@ %a.toggle-sidebar-button.js-toggle-sidebar.qa-toggle-sidebar.rspec-toggle-sidebar{ role: "button", type: "button", title: "Toggle sidebar" } = sprite_icon('chevron-double-lg-left', css_class: 'icon-chevron-double-lg-left') - = sprite_icon('chevron-double-lg-right', css_class: 'icon-chevron-double-lg-right') - %span.collapse-text= _("Collapse sidebar") + - if sidebar_refactor_disabled? + = sprite_icon('chevron-double-lg-right', css_class: 'icon-chevron-double-lg-right') + %span.collapse-text.gl-ml-3= _("Collapse sidebar") = button_tag class: 'close-nav-button', type: 'button' do = sprite_icon('close') - %span.collapse-text= _("Close sidebar") + %span.collapse-text.gl-ml-3= _("Close sidebar") diff --git a/app/views/shared/boards/components/sidebar/_time_tracker.html.haml b/app/views/shared/boards/components/sidebar/_time_tracker.html.haml index 43081499920..9f230a4a09b 100644 --- a/app/views/shared/boards/components/sidebar/_time_tracker.html.haml +++ b/app/views/shared/boards/components/sidebar/_time_tracker.html.haml @@ -1,7 +1,5 @@ .block.time-tracking - %time-tracker{ ":time-estimate" => "issue.timeEstimate || 0", - ":time-spent" => "issue.timeSpent || 0", - ":human-time-estimate" => "issue.humanTimeEstimate", - ":human-time-spent" => "issue.humanTimeSpent", - ":limit-to-hours" => "timeTrackingLimitToHours", + %time-tracker{ ":limit-to-hours" => "timeTrackingLimitToHours", + ":issuable-iid" => "issue.iid ? issue.iid.toString() : ''", + ":full-path" => "issue.project ? issue.project.fullPath : ''", "root-path" => "#{root_url}" } diff --git a/app/views/shared/file_hooks/_index.html.haml b/app/views/shared/file_hooks/_index.html.haml index cab0adf159b..d48e9f3d02e 100644 --- a/app/views/shared/file_hooks/_index.html.haml +++ b/app/views/shared/file_hooks/_index.html.haml @@ -19,9 +19,6 @@ %li .monospace = File.basename(file) - - if File.dirname(file).ends_with?('plugins') - .text-warning - = _('Plugins directory is deprecated and will be removed in 14.0. Please move this file into /file_hooks directory.') - else .card.bg-light.text-center diff --git a/app/views/shared/form_elements/_apply_template_warning.html.haml b/app/views/shared/form_elements/_apply_template_warning.html.haml index 61c0e5c42f4..ca1d3d53f16 100644 --- a/app/views/shared/form_elements/_apply_template_warning.html.haml +++ b/app/views/shared/form_elements/_apply_template_warning.html.haml @@ -1,7 +1,7 @@ .form-group.row.js-template-warning.hidden.js-issuable-template-warning .col-sm-12 .warning_message.mb-0{ role: 'alert' } - %btn.js-close-btn.js-dismiss-btn.close{ type: "button", "aria-hidden": true, "aria-label": _("Close") } + %btn.js-close-btn.js-dismiss-btn.close{ type: "button", "aria-hidden": "true", "aria-label": _("Close") } = sprite_icon("close") %p diff --git a/app/views/shared/gitpod/_enable_gitpod_modal.html.haml b/app/views/shared/gitpod/_enable_gitpod_modal.html.haml index dacfbf63db8..6a8ff98a09e 100644 --- a/app/views/shared/gitpod/_enable_gitpod_modal.html.haml +++ b/app/views/shared/gitpod/_enable_gitpod_modal.html.haml @@ -4,7 +4,7 @@ .modal-header %h3.page-title= _('Enable Gitpod?') %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": true } × + %span{ "aria-hidden": "true" } × .modal-body.p-3 %p= (_("To use Gitpod you must first enable the feature in the integrations section of your %{user_prefs}.") % { user_prefs: link_to(_('user preferences'), profile_preferences_path(anchor: 'gitpod')) }).html_safe .modal-footer diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index de657e39453..e79719d41b0 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -24,14 +24,6 @@ = render 'shared/form_elements/description', model: issuable, form: form, project: project -- if issuable.respond_to?(:confidential) - .form-group.row - .offset-sm-2.col-sm-10 - .form-check - = form.check_box :confidential, class: 'form-check-input' - = form.label :confidential, class: 'form-check-label' do - This issue is confidential and should only be visible to team members with at least Reporter access. - = render 'shared/issuable/form/metadata', issuable: issuable, form: form, project: project, presenter: presenter = render_if_exists 'shared/issuable/approvals', issuable: issuable, presenter: presenter, form: form diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index 3e89969f46e..c03697a4076 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -23,7 +23,7 @@ - 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" - - if Feature.enabled?(:boards_filtered_search, @group) && is_epic_board + - if is_epic_board #js-board-filtered-search{ data: { full_path: @group&.full_path } } - else .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index fb2019bef15..416c788603a 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -30,7 +30,8 @@ .block.reviewer.qa-reviewer-block = render "shared/issuable/sidebar_reviewers", issuable_sidebar: issuable_sidebar, reviewers: reviewers, signed_in: signed_in - = render_if_exists 'shared/issuable/sidebar_item_epic', issuable_sidebar: issuable_sidebar + - if @project.group.present? + = 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] - milestone = issuable_sidebar[:milestone] || {} @@ -42,7 +43,7 @@ = milestone[:title] - else = _('None') - .title.hide-collapsed + .hide-collapsed.gl-line-height-20.gl-mb-2.gl-text-gray-900{ data: { testid: "milestone_title" } } = _('Milestone') = loading_icon(css_class: 'gl-vertical-align-text-bottom hidden block-loading') - if can_edit_issuable diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 86369b32e98..7416fda6b44 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -42,22 +42,8 @@ - data['max-select'] = dropdown_options[:data][:'max-select'] if dropdown_options[:data][:'max-select'] - options[:data].merge!(data) - - if directly_invite_members? - - options[:dropdown_class] += ' dropdown-extended-height' - - options[:footer_content] = true - - options[:wrapper_class] = 'js-sidebar-assignee-dropdown' - - options[:toggle_class] += ' js-invite-members-track' - - data['track-event'] = 'show_invite_members' - - options[:data].merge!(data) - - invite_text = _('Invite Members') - - track_label = 'edit_assignee' - - = dropdown_tag(title, options: options) do - %ul.dropdown-footer-list - %li - .js-invite-members-trigger{ data: { trigger_element: 'anchor', - display_text: invite_text, - event: 'click_invite_members', - label: track_label } } - - else - = dropdown_tag(title, options: options) + = render 'shared/issuable/sidebar_user_dropdown', + options: options, + wrapper_class: 'js-sidebar-assignee-dropdown', + track_label: 'edit_assignee', + trigger_source: "#{issuable_type}-assignee-dropdown" diff --git a/app/views/shared/issuable/_sidebar_reviewers.html.haml b/app/views/shared/issuable/_sidebar_reviewers.html.haml index 1a8f1a2639f..bc76d292dd6 100644 --- a/app/views/shared/issuable/_sidebar_reviewers.html.haml +++ b/app/views/shared/issuable/_sidebar_reviewers.html.haml @@ -39,4 +39,8 @@ - data['max-select'] = dropdown_options[:data][:'max-select'] if dropdown_options[:data][:'max-select'] - options[:data].merge!(data) - = dropdown_tag(title, options: options) + = render 'shared/issuable/sidebar_user_dropdown', + options: options, + wrapper_class: 'js-sidebar-reviewer-dropdown', + track_label: 'edit_reviewer', + trigger_source: "#{issuable_type}-reviewer-dropdown" diff --git a/app/views/shared/issuable/_sidebar_user_dropdown.html.haml b/app/views/shared/issuable/_sidebar_user_dropdown.html.haml new file mode 100644 index 00000000000..3a17db5acf8 --- /dev/null +++ b/app/views/shared/issuable/_sidebar_user_dropdown.html.haml @@ -0,0 +1,21 @@ +- options = local_assigns.fetch(:options) +- data = options[:data] + +- if directly_invite_members? + - options[:dropdown_class] += ' dropdown-extended-height' + - options[:footer_content] = true + - options[:wrapper_class] = local_assigns.fetch(:wrapper_class) + - options[:toggle_class] += ' js-invite-members-track' + - data['track-event'] = 'show_invite_members' + - data['track-label'] = local_assigns.fetch(:track_label) + + = dropdown_tag(data['dropdown-title'], options: options) do + %ul.dropdown-footer-list + %li + .js-invite-members-trigger{ data: { trigger_element: 'anchor', + display_text: _('Invite Members'), + event: 'click_invite_members', + trigger_source: local_assigns.fetch(:trigger_source), + label: data['track-label'] } } +- else + = dropdown_tag(data['dropdown-title'], options: options) diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 70e931ac164..1f391e8a321 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -37,10 +37,12 @@ data: { placeholder: _('Select branch'), endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) - if source_level < target_level - .gl-alert.gl-alert-warning.gl-mt-4 - = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-body - = visibilityMismatchString - %br - = _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility } + .gl-alert.gl-alert-warning.gl-alert-not-dismissible.gl-max-content.gl-mt-4 + .gl-alert-container + .gl-alert-content{ role: 'alert' } + = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + = visibilityMismatchString + %br + = _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility } %hr diff --git a/app/views/shared/issuable/form/_metadata.html.haml b/app/views/shared/issuable/form/_metadata.html.haml index 366e819d252..1043eb49752 100644 --- a/app/views/shared/issuable/form/_metadata.html.haml +++ b/app/views/shared/issuable/form/_metadata.html.haml @@ -2,11 +2,19 @@ - issuable = local_assigns.fetch(:issuable) - presenter = local_assigns.fetch(:presenter) -- return unless can?(current_user, :"admin_#{issuable.to_ability_name}", issuable.project) +- return unless can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable) - has_due_date = issuable.has_attribute?(:due_date) - form = local_assigns.fetch(:form) +- if issuable.respond_to?(:confidential) + .form-group.row + .offset-sm-2.col-sm-10 + .form-check + = form.check_box :confidential, class: 'form-check-input' + = form.label :confidential, class: 'form-check-label' do + This issue is confidential and should only be visible to team members with at least Reporter access. + %hr .row %div{ class: (has_due_date ? "col-lg-6" : "col-12") } diff --git a/app/views/shared/issue_type/_emoji_block.html.haml b/app/views/shared/issue_type/_emoji_block.html.haml index ca2749b6bf9..26d30341999 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 + .new-branch-col.gl-my-2 = 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/members/_group.html.haml b/app/views/shared/members/_group.html.haml index d98ba074687..2aac3a94c49 100644 --- a/app/views/shared/members/_group.html.haml +++ b/app/views/shared/members/_group.html.haml @@ -29,7 +29,7 @@ = group_link.human_access = sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3") .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable - = dropdown_title(_("Change permissions")) + = dropdown_title(_("Change role")) .dropdown-content %ul - Gitlab::Access.options_with_owner.each do |role, role_id| diff --git a/app/views/shared/members/_invite_group.html.haml b/app/views/shared/members/_invite_group.html.haml index d59f2950df6..cefdf825eaa 100644 --- a/app/views/shared/members/_invite_group.html.haml +++ b/app/views/shared/members/_invite_group.html.haml @@ -3,21 +3,25 @@ - submit_url = local_assigns[:submit_url] - group_link_field = local_assigns[:group_link_field] - group_access_field = local_assigns[:group_access_field] +- groups_select_tag_data = local_assigns[:groups_select_tag_data] + .row .col-sm-12 = form_tag submit_url, class: 'invite-group-form js-requires-input', method: :post do .form-group = label_tag group_link_field, _("Select a group to invite"), class: "label-bold" - = groups_select_tag(group_link_field, data: { skip_groups: @skip_groups }, class: 'input-clamp qa-group-select-field', required: true) + = groups_select_tag(group_link_field, data: groups_select_tag_data, class: 'input-clamp qa-group-select-field', required: true) + .form-text.text-muted.gl-mb-3 + = _('Group sharing provides access to all group members (including members who inherited group membership from a parent group).') .form-group - = label_tag group_access_field, _("Max access level"), class: "label-bold" + = label_tag group_access_field, _("Max role"), class: "label-bold" .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" = sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200") .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 } + = _("%{link_start}Learn more%{link_end} about roles.").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } .form-group = label_tag :expires_at, _('Access expiration date'), class: 'label-bold' .clearable-input diff --git a/app/views/shared/members/_invite_member.html.haml b/app/views/shared/members/_invite_member.html.haml index 49111c821b1..e6863ed56a5 100644 --- a/app/views/shared/members/_invite_member.html.haml +++ b/app/views/shared/members/_invite_member.html.haml @@ -10,14 +10,14 @@ = label_tag :user_ids, _("GitLab member or Email address"), class: "label-bold" = users_select_tag(:user_ids, multiple: true, class: 'input-clamp qa-member-select-field', scope: :all, email_user: true, placeholder: 'Search for members to update or invite') .form-group - = label_tag :access_level, _("Choose a role permission"), class: "label-bold" + = label_tag :access_level, _("Select a role"), class: "label-bold" .select-wrapper = select_tag :access_level, options_for_select(access_levels, default_access_level), class: "form-control project-access-select select-control" = sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200") .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 } + = _("%{link_start}Learn more%{link_end} about roles.").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } .form-group = label_tag :expires_at, _('Access expiration date'), class: 'label-bold' .clearable-input diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index 88e2a74d235..8f334be0427 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -81,7 +81,7 @@ = member.human_access = sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3") .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable - = dropdown_title(_("Change permissions")) + = dropdown_title(_("Change role")) .dropdown-content %ul - member.valid_level_roles.each do |role, role_id| diff --git a/app/views/shared/milestones/_issuable.html.haml b/app/views/shared/milestones/_issuable.html.haml index a62ed009552..184904dd7ab 100644 --- a/app/views/shared/milestones/_issuable.html.haml +++ b/app/views/shared/milestones/_issuable.html.haml @@ -3,7 +3,7 @@ - labels = issuable.labels - assignees = issuable.assignees - base_url_args = [project] -- issuable_type_args = base_url_args + [issuable.class.table_name] +- issuable_type_args = base_url_args + [issuable.class.table_name.to_sym] - issuable_url_args = base_url_args + [issuable] %li.issuable-row diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index 0088cd35781..56b2b0d5801 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -98,6 +98,7 @@ time_spent: @milestone.total_time_spent, human_time_estimate: @milestone.human_total_time_estimate, human_time_spent: @milestone.human_total_time_spent, + iid: @milestone.iid, limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s } } = render_if_exists 'shared/milestones/weight', milestone: milestone diff --git a/app/views/shared/nav/_scope_menu.html.haml b/app/views/shared/nav/_scope_menu.html.haml index 2f10914ef3d..cbee0e0429c 100644 --- a/app/views/shared/nav/_scope_menu.html.haml +++ b/app/views/shared/nav/_scope_menu.html.haml @@ -1,6 +1,6 @@ -.context-header - = link_to scope_menu.link, **scope_menu.container_html_options do - %span.avatar-container.rect-avatar.s40.project-avatar - = source_icon(scope_menu.container, alt: scope_menu.title, class: 'avatar s40 avatar-tile', width: 40, height: 40) - %span.sidebar-context-title - = scope_menu.title +- if sidebar_refactor_enabled? + = nav_link(**scope_menu.active_routes, html_options: scope_menu.nav_link_html_options) do + = render 'shared/nav/scope_menu_body', scope_menu: scope_menu +- else + .context-header + = render 'shared/nav/scope_menu_body', scope_menu: scope_menu diff --git a/app/views/shared/nav/_scope_menu_body.html.haml b/app/views/shared/nav/_scope_menu_body.html.haml new file mode 100644 index 00000000000..a94c681e2d3 --- /dev/null +++ b/app/views/shared/nav/_scope_menu_body.html.haml @@ -0,0 +1,8 @@ +- avatar_size = sidebar_refactor_disabled? ? 40 : 32 +- avatar_size_class = sidebar_refactor_disabled? ? 's40' : 's32' + += link_to scope_menu.link, **scope_menu.container_html_options, data: { qa_selector: 'project_scope_link' } do + %span{ class: ['avatar-container', 'rect-avatar', 'project-avatar', avatar_size_class] } + = source_icon(scope_menu.container, alt: scope_menu.title, class: ['avatar', 'avatar-tile', avatar_size_class], width: avatar_size, height: avatar_size) + %span.sidebar-context-title + = scope_menu.title diff --git a/app/views/shared/nav/_sidebar.html.haml b/app/views/shared/nav/_sidebar.html.haml index 552dcbfd6fd..54c3b8a281d 100644 --- a/app/views/shared/nav/_sidebar.html.haml +++ b/app/views/shared/nav/_sidebar.html.haml @@ -1,11 +1,13 @@ %aside.nav-sidebar{ class: ('sidebar-collapsed-desktop' if collapsed_sidebar?), **sidebar_tracking_attributes_by_object(sidebar.container), 'aria-label': sidebar.aria_label } .nav-sidebar-inner-scroll - - if sidebar.scope_menu + - if sidebar.scope_menu && sidebar_refactor_disabled? = render partial: 'shared/nav/scope_menu', object: sidebar.scope_menu - elsif sidebar.render_raw_scope_menu_partial = render sidebar.render_raw_scope_menu_partial %ul.sidebar-top-level-items.qa-project-sidebar + - if sidebar.scope_menu && sidebar_refactor_enabled? + = render partial: 'shared/nav/scope_menu', object: sidebar.scope_menu - if sidebar.renderable_menus.any? = render partial: 'shared/nav/sidebar_menu', collection: sidebar.renderable_menus - if sidebar.render_raw_menus_partial diff --git a/app/views/shared/nav/_sidebar_menu.html.haml b/app/views/shared/nav/_sidebar_menu.html.haml index 67c775d1a85..b80bd515a32 100644 --- a/app/views/shared/nav/_sidebar_menu.html.haml +++ b/app/views/shared/nav/_sidebar_menu.html.haml @@ -15,13 +15,13 @@ %ul.sidebar-sub-level-items{ class: ('is-fly-out-only' unless sidebar_menu.has_renderable_items?) } = nav_link(**sidebar_menu.all_active_routes, html_options: { class: 'fly-out-top-item' } ) do - = link_to sidebar_menu.link, **sidebar_menu.collapsed_container_html_options do - %strong.fly-out-top-item-name - = sidebar_menu.title - - if sidebar_menu.has_pill? - %span.badge.badge-pill.count.fly-out-badge{ **sidebar_menu.pill_html_options } - = number_with_delimiter(sidebar_menu.pill_count) + - if sidebar_refactor_disabled? + = link_to sidebar_menu.link, class: "'has-sub-items' if sidebar_menu.has_renderable_items?", **sidebar_menu.collapsed_container_html_options do + = render 'shared/nav/sidebar_menu_collapsed', sidebar_menu: sidebar_menu + - else + %span.fly-out-top-item-container + = render 'shared/nav/sidebar_menu_collapsed', sidebar_menu: sidebar_menu - - if sidebar_menu.has_items? + - if sidebar_menu.has_renderable_items? %li.divider.fly-out-top-item = render partial: 'shared/nav/sidebar_menu_item', collection: sidebar_menu.renderable_items diff --git a/app/views/shared/nav/_sidebar_menu_collapsed.html.haml b/app/views/shared/nav/_sidebar_menu_collapsed.html.haml new file mode 100644 index 00000000000..78567a991df --- /dev/null +++ b/app/views/shared/nav/_sidebar_menu_collapsed.html.haml @@ -0,0 +1,5 @@ +%strong.fly-out-top-item-name + = sidebar_menu.title +- if sidebar_menu.has_pill? + %span.badge.badge-pill.count.fly-out-badge{ **sidebar_menu.pill_html_options } + = number_with_delimiter(sidebar_menu.pill_count) diff --git a/app/views/shared/nav/_sidebar_menu_item.html.haml b/app/views/shared/nav/_sidebar_menu_item.html.haml index 0b0e4c7aec9..674ce593ee2 100644 --- a/app/views/shared/nav/_sidebar_menu_item.html.haml +++ b/app/views/shared/nav/_sidebar_menu_item.html.haml @@ -1,4 +1,4 @@ -= nav_link(**sidebar_menu_item.active_routes) do += nav_link(**sidebar_menu_item.active_routes, html_options: sidebar_menu_item.nav_link_html_options) do = link_to sidebar_menu_item.link, **sidebar_menu_item.container_html_options, data: { qa_selector: 'sidebar_menu_item_link', qa_menu_item: sidebar_menu_item.title } do %span = sidebar_menu_item.title 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 index 6a362866f41..3cbe35e5c15 100644 --- a/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml +++ b/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml @@ -33,6 +33,5 @@ %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 } -- if ::Feature.enabled?(:allow_force_push_to_protected_branches, @project, default_enabled: :yaml) - %td - = render "shared/buttons/project_feature_toggle", is_checked: protected_branch.allow_force_push, label: s_("ProtectedBranch|Toggle allow force push"), class_list: "js-force-push-toggle project-feature-toggle", data: { qa_selector: 'force_push_toggle_button', qa_branch_name: protected_branch.name } +%td + = render "shared/buttons/project_feature_toggle", is_checked: protected_branch.allow_force_push, label: s_("ProtectedBranch|Toggle allowed to force push"), class_list: "js-force-push-toggle project-feature-toggle", data: { qa_selector: 'force_push_toggle_button', qa_branch_name: protected_branch.name } diff --git a/app/views/shared/runners/_runner_type_alert.html.haml b/app/views/shared/runners/_runner_type_alert.html.haml index b83def8b802..e0cc1e924d8 100644 --- a/app/views/shared/runners/_runner_type_alert.html.haml +++ b/app/views/shared/runners/_runner_type_alert.html.haml @@ -5,16 +5,16 @@ = s_('Runners|This runner is available to all groups and projects in your GitLab instance.') .gl-alert-body = s_('Runners|Shared runners are available to every project in a GitLab instance. If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.') - = link_to _('Learn more.'), help_page_path('ci/runners/README', anchor: 'shared-runners'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'shared-runners'), target: '_blank', rel: 'noopener noreferrer' - elsif runner.group_type? %h4.gl-alert-title = s_('Runners|This runner is available to all projects and subgroups in a group.') .gl-alert-body = s_('Runners|Use Group runners when you want all projects in a group to have access to a set of runners.') - = link_to _('Learn more.'), help_page_path('ci/runners/README', anchor: 'group-runners'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'group-runners'), target: '_blank', rel: 'noopener noreferrer' - else %h4.gl-alert-title = s_('Runners|This runner is associated with specific projects.') .gl-alert-body = s_('Runners|You can set up a specific runner to be used by multiple projects but you cannot make this a shared runner.') - = link_to _('Learn more.'), help_page_path('ci/runners/README', anchor: 'specific-runners'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'specific-runners'), target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/shared/wikis/diff.html.haml b/app/views/shared/wikis/diff.html.haml index 19167f04855..0eeceac28c8 100644 --- a/app/views/shared/wikis/diff.html.haml +++ b/app/views/shared/wikis/diff.html.haml @@ -5,7 +5,7 @@ .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - %h3.page-title.gl-flex-fill-1 + %h3.page-title.gl-flex-grow-1 = link_to_wiki_page @page %span.light · diff --git a/app/views/shared/wikis/edit.html.haml b/app/views/shared/wikis/edit.html.haml index 4bdeee3996f..729646c2731 100644 --- a/app/views/shared/wikis/edit.html.haml +++ b/app/views/shared/wikis/edit.html.haml @@ -7,7 +7,7 @@ .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - %h3.page-title.gl-flex-fill-1 + %h3.page-title.gl-flex-grow-1 - if @page.persisted? = link_to_wiki_page @page %span.light diff --git a/app/views/shared/wikis/pages.html.haml b/app/views/shared/wikis/pages.html.haml index 1889b6501c9..c1918198594 100644 --- a/app/views/shared/wikis/pages.html.haml +++ b/app/views/shared/wikis/pages.html.haml @@ -5,7 +5,7 @@ - add_page_specific_style 'page_bundles/wiki' .wiki-page-header.top-area.flex-column.flex-lg-row - %h3.page-title.gl-flex-fill-1 + %h3.page-title.gl-flex-grow-1 = s_("Wiki|Wiki Pages") .nav-controls.pb-md-3.pb-lg-0 |