diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /app/views/shared | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) | |
download | gitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'app/views/shared')
52 files changed, 274 insertions, 423 deletions
diff --git a/app/views/shared/_confirm_fork_modal.html.haml b/app/views/shared/_confirm_fork_modal.html.haml index 1390d821899..b692dffce37 100644 --- a/app/views/shared/_confirm_fork_modal.html.haml +++ b/app/views/shared/_confirm_fork_modal.html.haml @@ -8,5 +8,5 @@ .modal-body.p-3 %p= _("You're not allowed to %{tag_start}edit%{tag_end} files in this project directly. Please fork this project, make your changes there, and submit a merge request.") % { tag_start: '', tag_end: ''} .modal-footer - = link_to _('Cancel'), '#', class: "btn btn-cancel", "data-dismiss" => "modal" - = link_to _('Fork project'), fork_path, class: 'btn btn-success', data: { qa_selector: 'fork_project_button' }, method: :post + = link_to _('Cancel'), '#', class: "gl-button btn btn-default btn-cancel", "data-dismiss" => "modal" + = link_to _('Fork project'), fork_path, class: 'gl-button btn btn-confirm', data: { qa_selector: 'fork_project_button' }, method: :post diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index c3fac5cd464..eea0c5f37de 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -39,7 +39,7 @@ .gl-alert-body = _('Changing group URL can have unintended side effects.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank', class: 'gl-link' + = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank', class: 'gl-link' - if @group.persisted? .row diff --git a/app/views/shared/_mobile_clone_panel.html.haml b/app/views/shared/_mobile_clone_panel.html.haml index 2854b115506..3edfd502f13 100644 --- a/app/views/shared/_mobile_clone_panel.html.haml +++ b/app/views/shared/_mobile_clone_panel.html.haml @@ -3,8 +3,8 @@ - http_copy_label = _('Copy %{http_label} clone URL') % { http_label: gitlab_config.protocol.upcase } .btn-group.mobile-git-clone.js-mobile-git-clone.btn-block - = clipboard_button(button_text: default_clone_label, text: default_url_to_repo(project), hide_button_icon: true, class: "btn-primary flex-fill bold justify-content-center input-group-text clone-dropdown-btn js-clone-dropdown-label") - %button.btn.btn-primary.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center.w-auto.ml-0{ type: "button", data: { toggle: "dropdown" } } + = clipboard_button(button_text: default_clone_label, text: default_url_to_repo(project), hide_button_icon: true, class: "gl-button btn btn-confirm flex-fill input-group-text clone-dropdown-btn js-clone-dropdown-label") + %button.gl-button.btn.btn-confirm.btn-icon.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center.w-auto.ml-0{ type: "button", data: { toggle: "dropdown" } } = sprite_icon("chevron-down", css_class: "dropdown-btn-icon icon") %ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown{ data: { dropdown: true } } - if ssh_enabled? diff --git a/app/views/shared/_new_commit_form.html.haml b/app/views/shared/_new_commit_form.html.haml index 62ba89e2576..5641c67e462 100644 --- a/app/views/shared/_new_commit_form.html.haml +++ b/app/views/shared/_new_commit_form.html.haml @@ -3,8 +3,11 @@ = render 'shared/commit_message_container', placeholder: placeholder -- if @project.empty_repo? - = hidden_field_tag 'branch_name', @ref +- if project.empty_repo? + - ref = local_assigns[:ref] || @ref + - branch_name_class = project.empty_repo_upload_experiment? ? 'js-branch-name' : nil + + = hidden_field_tag 'branch_name', ref, class: branch_name_class - else - if can?(current_user, :push_code, @project) .form-group.row.branch diff --git a/app/views/shared/_new_project_item_select.html.haml b/app/views/shared/_new_project_item_select.html.haml index b327b6f7ee8..3817ff8a56d 100644 --- a/app/views/shared/_new_project_item_select.html.haml +++ b/app/views/shared/_new_project_item_select.html.haml @@ -1,7 +1,7 @@ - if any_projects?(@projects) .project-item-select-holder.btn-group.gl-ml-auto.gl-mr-auto.gl-py-3.gl-relative.gl-display-flex.gl-overflow-hidden - %a.btn.gl-button.btn-success.new-project-item-link.block-truncated.qa-new-project-item-link{ href: '', data: { label: local_assigns[:label], type: local_assigns[:type] }, class: "gl-m-0!" } + %a.btn.gl-button.btn-confirm.new-project-item-link.block-truncated.qa-new-project-item-link{ href: '', data: { label: local_assigns[:label], type: local_assigns[:type] }, class: "gl-m-0!" } = loading_icon(color: 'light') = project_select_tag :project_path, class: "project-item-select gl-absolute! gl-visibility-hidden", data: { include_groups: local_assigns[:include_groups], order_by: 'last_activity_at', relative_path: local_assigns[:path], with_shared: local_assigns[:with_shared], include_projects_in_subgroups: local_assigns[:include_projects_in_subgroups] }, with_feature_enabled: local_assigns[:with_feature_enabled] - %button.btn.dropdown-toggle.btn-success.btn-md.gl-button.gl-dropdown-toggle.dropdown-toggle-split.new-project-item-select-button.qa-new-project-item-select-button.gl-p-0.gl-w-100{ class: "gl-m-0!", 'aria-label': _('Toggle project select') } + %button.btn.dropdown-toggle.btn-confirm.btn-md.gl-button.gl-dropdown-toggle.dropdown-toggle-split.new-project-item-select-button.qa-new-project-item-select-button.gl-p-0.gl-w-100{ class: "gl-m-0!", 'aria-label': _('Toggle project select') } = sprite_icon('chevron-down') diff --git a/app/views/shared/_recaptcha_form.html.haml b/app/views/shared/_recaptcha_form.html.haml index aa9e9a34c90..f524747dea0 100644 --- a/app/views/shared/_recaptcha_form.html.haml +++ b/app/views/shared/_recaptcha_form.html.haml @@ -20,4 +20,4 @@ - if has_submit .row-content-block.footer-block - = f.submit _("Submit %{humanized_resource_name}") % { humanized_resource_name: humanized_resource_name }, class: 'btn btn-success' + = f.submit _("Submit %{humanized_resource_name}") % { humanized_resource_name: humanized_resource_name }, class: 'gl-button btn btn-confirm' diff --git a/app/views/shared/access_tokens/_form.html.haml b/app/views/shared/access_tokens/_form.html.haml index 089643f4748..9709ad8428e 100644 --- a/app/views/shared/access_tokens/_form.html.haml +++ b/app/views/shared/access_tokens/_form.html.haml @@ -29,5 +29,9 @@ = f.label :scopes, _('Scopes'), class: 'label-bold' = render 'shared/tokens/scopes_form', prefix: prefix, token: token, scopes: scopes + - if prefix == :personal_access_token && Feature.enabled?(:personal_access_tokens_scoped_to_projects, current_user) + .js-access-tokens-projects + %input{ type: 'hidden', name: 'temporary-name', id: 'temporary-id' } + .gl-mt-3 - = f.submit _('Create %{type}') % { type: type }, class: 'gl-button btn btn-success', data: { qa_selector: 'create_token_button' } + = f.submit _('Create %{type}') % { type: type }, class: 'gl-button btn btn-confirm', data: { qa_selector: 'create_token_button' } diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml index ababbdc7eb9..8c0893adaaa 100644 --- a/app/views/shared/boards/_show.html.haml +++ b/app/views/shared/boards/_show.html.haml @@ -2,7 +2,7 @@ - group = local_assigns.fetch(:group, false) -# TODO: Move group_id and can_admin_list to the board store See: https://gitlab.com/gitlab-org/gitlab/-/issues/213082 -- can_admin_list = can?(current_user, :admin_list, current_board_parent) == true +- can_admin_list = can?(current_user, :admin_issue_board_list, current_board_parent) == true - @no_breadcrumb_container = true - @no_container = true - @content_class = "issue-boards-content js-focus-mode-board" diff --git a/app/views/shared/boards/_switcher.html.haml b/app/views/shared/boards/_switcher.html.haml index 58e877f20fe..18e0ca20cf7 100644 --- a/app/views/shared/boards/_switcher.html.haml +++ b/app/views/shared/boards/_switcher.html.haml @@ -7,7 +7,7 @@ milestone_path: milestones_filter_path(milestone_filter_opts), board_base_url: board_base_url, has_missing_boards: (!multiple_boards_available? && current_board_parent.boards.size > 1).to_s, - can_admin_board: can?(current_user, :admin_board, parent).to_s, + can_admin_board: can?(current_user, :admin_issue_board, parent).to_s, multiple_issue_boards_available: parent.multiple_issue_boards_available?.to_s, labels_path: labels_filter_path_with_defaults(only_group_labels: true, include_descendant_groups: true), labels_web_url: parent.is_a?(Project) ? project_labels_path(@project) : group_labels_path(@group), diff --git a/app/views/shared/boards/components/_sidebar.html.haml b/app/views/shared/boards/components/_sidebar.html.haml index 3daa13fb488..59dd571604b 100644 --- a/app/views/shared/boards/components/_sidebar.html.haml +++ b/app/views/shared/boards/components/_sidebar.html.haml @@ -25,7 +25,3 @@ = render "shared/boards/components/sidebar/labels" = render_if_exists "shared/boards/components/sidebar/weight" = render "shared/boards/components/sidebar/notifications" - %remove-btn{ ":issue" => "issue", - ":issue-update" => "issue.sidebarInfoEndpoint", - ":list" => "list", - "v-if" => "canRemove" } diff --git a/app/views/shared/deploy_keys/_index.html.haml b/app/views/shared/deploy_keys/_index.html.haml index 5d9c2cd25b4..be6fe94e497 100644 --- a/app/views/shared/deploy_keys/_index.html.haml +++ b/app/views/shared/deploy_keys/_index.html.haml @@ -1,8 +1,8 @@ - expanded = expanded_by_default? %section.qa-deploy-keys-settings.settings.no-animate#js-deploy-keys-settings{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_keys_settings_content' } } .settings-header - %h4= _('Deploy keys') - %button.btn.js-settings-toggle{ type: 'button' } + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Deploy keys') + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/deploy_keys/index') } 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 bad25086d9f..25357ccdc65 100644 --- a/app/views/shared/deploy_keys/_project_group_form.html.haml +++ b/app/views/shared/deploy_keys/_project_group_form.html.haml @@ -21,4 +21,4 @@ = _('Allow this key to push to this repository') .form-group.row - = f.submit _("Add key"), class: "btn-success btn" + = f.submit _("Add key"), class: "btn gl-button btn-confirm" diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index 052d68baf71..2ddfcf43756 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -48,4 +48,4 @@ .text-secondary= s_('DeployTokens|Allows write access to the package registry.') .gl-mt-3 - = f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-success qa-create-deploy-token' + = f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-confirm qa-create-deploy-token' diff --git a/app/views/shared/deploy_tokens/_index.html.haml b/app/views/shared/deploy_tokens/_index.html.haml index e64b8634cf5..9d1a24d4c24 100644 --- a/app/views/shared/deploy_tokens/_index.html.haml +++ b/app/views/shared/deploy_tokens/_index.html.haml @@ -2,8 +2,8 @@ %section.qa-deploy-tokens-settings.settings.no-animate#js-deploy-tokens{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_tokens_settings_content' } } .settings-header - %h4= s_('DeployTokens|Deploy tokens') - %button.gl-button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= s_('DeployTokens|Deploy tokens') + %button.btn.gl-button.btn-default.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p = description diff --git a/app/views/shared/empty_states/_deploy_keys.html.haml b/app/views/shared/empty_states/_deploy_keys.html.haml index 6fca64d805b..6c615de9c56 100644 --- a/app/views/shared/empty_states/_deploy_keys.html.haml +++ b/app/views/shared/empty_states/_deploy_keys.html.haml @@ -6,4 +6,4 @@ .text-content.gl-mx-auto.gl-my-0.gl-p-5 %h4.h4= _('Deploy Keys') %p= _('Deploy keys grant read/write access to all repositories in your instance') - = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-md gl-button' + = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'gl-button btn btn-confirm btn-md' diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml index 997bc7b8a98..8ccf14463c7 100644 --- a/app/views/shared/empty_states/_issues.html.haml +++ b/app/views/shared/empty_states/_issues.html.haml @@ -6,6 +6,8 @@ - opened_issues_count = issuables_count_for_state(:issues, :opened) - is_opened_state = params[:state] == 'opened' - is_closed_state = params[:state] == 'closed' +- issuable_type = 'issues' +- can_edit = can?(current_user, :admin_project, @project) .row.empty-state .col-12 @@ -20,7 +22,7 @@ = _("To widen your search, change or remove filters above") - if show_new_issue_link?(@project) .text-center - = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success" + = link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm" - elsif is_opened_state && opened_issues_count == 0 && closed_issues_count > 0 %h4.text-center = _("There are no open issues") @@ -28,7 +30,7 @@ = _("To keep this project going, create a new issue") - if show_new_issue_link?(@project) .text-center - = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success" + = link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm" - elsif is_closed_state && opened_issues_count > 0 && closed_issues_count == 0 %h4.text-center = _("There are no closed issues") @@ -42,10 +44,10 @@ - if project_select_button = render 'shared/new_project_item_select', path: 'issues/new', label: _('New issue'), type: :issues, with_feature_enabled: 'issues' - else - = link_to _('New issue'), button_path, class: 'btn gl-button btn-success', id: 'new_issue_link' + = link_to _('New issue'), button_path, class: 'gl-button btn btn-confirm', id: 'new_issue_link' - if show_import_button - = render 'projects/issues/import_csv/button', type: :text + .js-csv-import-export-buttons{ data: { show_import_button: show_import_button.to_s, issuable_type: issuable_type, import_csv_issues_path: import_csv_namespace_project_issues_path, can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes), container_class: 'gl-display-inline-flex gl-vertical-align-middle', show_label: 'true' } } %hr %p.gl-text-center.gl-mb-0 %strong @@ -62,7 +64,4 @@ %p = _("The Issue Tracker is the place to add things that need to be improved or solved in a project. You can register or sign in to create issues for this project.") .text-center - = link_to _('Register / Sign In'), new_user_session_path, class: 'btn btn-success' - -- if show_import_button - = render 'projects/issues/import_csv/modal' + = link_to _('Register / Sign In'), new_user_session_path, class: 'gl-button btn btn-confirm' diff --git a/app/views/shared/empty_states/_labels.html.haml b/app/views/shared/empty_states/_labels.html.haml index a739103641e..4e5e04ba4d4 100644 --- a/app/views/shared/empty_states/_labels.html.haml +++ b/app/views/shared/empty_states/_labels.html.haml @@ -8,7 +8,7 @@ %p= _("You can also star a label to make it a priority label.") .text-center - if can?(current_user, :admin_label, @project) - = link_to _('New label'), new_project_label_path(@project), class: 'btn btn-success qa-label-create-new', title: _('New label'), id: 'new_label_link' - = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: _('Generate a default set of labels'), id: 'generate_labels_link' + = link_to _('New label'), new_project_label_path(@project), class: 'btn gl-button btn-confirm qa-label-create-new', title: _('New label'), id: 'new_label_link' + = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn gl-button btn-confirm-secondary', title: _('Generate a default set of labels'), id: 'generate_labels_link' - if can?(current_user, :admin_label, @group) - = link_to _('New label'), new_group_label_path(@group), class: 'btn btn-success', title: _('New label'), id: 'new_label_link' + = link_to _('New label'), new_group_label_path(@group), class: 'btn gl-button btn-confirm', title: _('New label'), id: 'new_label_link' diff --git a/app/views/shared/empty_states/_merge_requests.html.haml b/app/views/shared/empty_states/_merge_requests.html.haml index 837c3afc796..879447f16ae 100644 --- a/app/views/shared/empty_states/_merge_requests.html.haml +++ b/app/views/shared/empty_states/_merge_requests.html.haml @@ -20,7 +20,7 @@ = _("To widen your search, change or remove filters above") .text-center - if can_create_merge_request - = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request") + = link_to _("New merge request"), project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request") - elsif is_opened_state && opened_merged_count == 0 && closed_merged_count > 0 %h4.text-center = _("There are no open merge requests") @@ -28,7 +28,7 @@ = _("To keep this project going, create a new merge request") .text-center - if can_create_merge_request - = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request") + = link_to _("New merge request"), project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request") - elsif is_closed_state && opened_merged_count > 0 && closed_merged_count == 0 %h4.text-center = _("There are no closed merge requests") @@ -42,4 +42,4 @@ - if project_select_button = render 'shared/new_project_item_select', path: 'merge_requests/new', label: _('New merge request'), type: :merge_requests, with_feature_enabled: 'merge_requests' - else - = link_to _('New merge request'), button_path, class: 'btn btn-success', title: _('New merge request'), id: 'new_merge_request_link' + = link_to _('New merge request'), button_path, class: 'gl-button btn btn-confirm', title: _('New merge request'), id: 'new_merge_request_link' diff --git a/app/views/shared/empty_states/_profile_tabs.html.haml b/app/views/shared/empty_states/_profile_tabs.html.haml index abcf9740200..42a845846d1 100644 --- a/app/views/shared/empty_states/_profile_tabs.html.haml +++ b/app/views/shared/empty_states/_profile_tabs.html.haml @@ -13,9 +13,9 @@ %p= current_user_empty_message_description - if secondary_button_link.present? - = link_to secondary_button_label, secondary_button_link, class: 'gl-button btn btn-success btn-inverted' + = link_to secondary_button_label, secondary_button_link, class: 'gl-button btn btn-confirm btn-inverted' - if primary_button_link.present? - = link_to primary_button_label, primary_button_link, class: 'gl-button btn btn-success' + = link_to primary_button_label, primary_button_link, class: 'gl-button btn btn-confirm' - else %h5= visitor_empty_message diff --git a/app/views/shared/empty_states/_snippets.html.haml b/app/views/shared/empty_states/_snippets.html.haml index 105efcc3c88..20ca7954479 100644 --- a/app/views/shared/empty_states/_snippets.html.haml +++ b/app/views/shared/empty_states/_snippets.html.haml @@ -12,7 +12,7 @@ = s_('SnippetsEmptyState|Store, share, and embed small pieces of code and text.') .mt-2< - if button_path - = link_to s_('SnippetsEmptyState|New snippet'), button_path, class: 'btn gl-button btn-success', title: s_('SnippetsEmptyState|New snippet'), id: 'new_snippet_link', data: { qa_selector: 'create_first_snippet_link' } + = link_to s_('SnippetsEmptyState|New snippet'), button_path, class: 'btn gl-button btn-confirm', title: s_('SnippetsEmptyState|New snippet'), id: 'new_snippet_link', data: { qa_selector: 'create_first_snippet_link' } = link_to s_('SnippetsEmptyState|Documentation'), help_page_path('user/snippets.md'), class: 'btn gl-button btn-default', title: s_('SnippetsEmptyState|Documentation') - else %h4.text-center= s_('SnippetsEmptyState|There are no snippets to show.') diff --git a/app/views/shared/empty_states/_wikis.html.haml b/app/views/shared/empty_states/_wikis.html.haml index 4150406a4ea..0bddffa881a 100644 --- a/app/views/shared/empty_states/_wikis.html.haml +++ b/app/views/shared/empty_states/_wikis.html.haml @@ -3,7 +3,7 @@ - if can?(current_user, :create_wiki, @wiki.container) - create_path = wiki_page_path(@wiki, params[:id], view: 'create') - - create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn gl-button btn-success qa-create-first-page-link', title: s_('WikiEmpty|Create your first page') + - create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn gl-button btn-confirm qa-create-first-page-link', title: s_('WikiEmpty|Create your first page') = render layout: layout_path, locals: { image_path: 'illustrations/wiki_login_empty.svg' } do %h4.text-left @@ -18,7 +18,7 @@ - elsif @project && can?(current_user, :read_issue, @project) - issues_link = link_to s_('WikiEmptyIssueMessage|issue tracker'), project_issues_path(@project) - - new_issue_link = link_to s_('WikiEmpty|Suggest wiki improvement'), new_project_issue_path(@project), class: 'btn gl-button btn-success', title: s_('WikiEmptyIssueMessage|Suggest wiki improvement') + - new_issue_link = link_to s_('WikiEmpty|Suggest wiki improvement'), new_project_issue_path(@project), class: 'btn gl-button btn-confirm', title: s_('WikiEmptyIssueMessage|Suggest wiki improvement') = render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do %h4 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 73be0c741dc..61c0e5c42f4 100644 --- a/app/views/shared/form_elements/_apply_template_warning.html.haml +++ b/app/views/shared/form_elements/_apply_template_warning.html.haml @@ -7,7 +7,7 @@ %p = _("Applying a template will replace the existing issue description. Any changes you have made will be lost.") - %button.js-override-template.btn.btn-warning.mr-2{ type: 'button' } + %button.js-override-template.btn.gl-button.btn-confirm.mr-2{ type: 'button' } = _("Apply template") - %button.js-close-btn.js-cancel-btn.btn.btn-inverted{ type: 'button' } + %button.js-close-btn.js-cancel-btn.btn.gl-button.btn-default{ type: 'button' } = _("Cancel") diff --git a/app/views/shared/gitpod/_enable_gitpod_modal.html.haml b/app/views/shared/gitpod/_enable_gitpod_modal.html.haml index a6bd1d10e43..dacfbf63db8 100644 --- a/app/views/shared/gitpod/_enable_gitpod_modal.html.haml +++ b/app/views/shared/gitpod/_enable_gitpod_modal.html.haml @@ -8,5 +8,5 @@ .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 - = link_to _('Cancel'), '#', class: "btn btn-cancel", "data-dismiss" => "modal" - = link_to _('Enable Gitpod'), profile_path(user: { gitpod_enabled: true}), class: 'btn btn-success', method: :put + = link_to _('Cancel'), '#', class: "gl-button btn btn-default btn-cancel", "data-dismiss" => "modal" + = link_to _('Enable Gitpod'), profile_path(user: { gitpod_enabled: true}), class: 'gl-button btn btn-confirm', method: :put diff --git a/app/views/shared/groups/_empty_state.html.haml b/app/views/shared/groups/_empty_state.html.haml index 1d3bc1d6959..506954c53ca 100644 --- a/app/views/shared/groups/_empty_state.html.haml +++ b/app/views/shared/groups/_empty_state.html.haml @@ -9,5 +9,5 @@ - if invite_group_members?(@group) = link_to _('Invite your team'), group_group_members_path(@group), - class: 'gl-button btn btn-success-secondary', + class: 'gl-button btn btn-confirm-secondary', data: { track_event: 'click_invite_team_group_empty_state', track_label: 'invite_team_group_empty_state' } diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 2a91ffbdbaa..41b7d7e9e1b 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -64,17 +64,17 @@ .row-content-block{ class: (is_footer ? "footer-block" : "middle-block") } .float-right - if issuable.new_record? - = link_to 'Cancel', polymorphic_path([@project, issuable.class]), class: 'gl-button btn btn-cancel' + = link_to _('Cancel'), polymorphic_path([@project, issuable.class]), class: 'gl-button btn btn-cancel' - else - if can?(current_user, :"destroy_#{issuable.to_ability_name}", @project) = link_to 'Delete', polymorphic_path([@project, issuable], params: { destroy_confirm: true }), data: { confirm: "#{issuable.human_class_name} will be removed! Are you sure?" }, method: :delete, class: 'btn btn-danger btn-grouped' - = link_to 'Cancel', polymorphic_path([@project, issuable]), class: 'gl-button btn btn-grouped btn-cancel' + = link_to _('Cancel'), polymorphic_path([@project, issuable]), class: 'gl-button btn btn-grouped btn-default btn-cancel' %span.gl-mr-3 - if issuable.new_record? - = form.submit "Submit #{issuable.class.model_name.human.downcase}", class: 'gl-button btn btn-success qa-issuable-create-button' + = form.submit "Submit #{issuable.class.model_name.human.downcase}", class: 'gl-button btn btn-confirm', data: { qa_selector: 'issuable_create_button' } - else - = form.submit 'Save changes', class: 'gl-button btn btn-success' + = form.submit 'Save changes', class: 'gl-button btn btn-confirm' - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = issuable.project.present.contribution_guide_path) .inline.gl-mt-3 diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml index 005b76180fd..cf7e6cf8365 100644 --- a/app/views/shared/issuable/_label_page_create.html.haml +++ b/app/views/shared/issuable/_label_page_create.html.haml @@ -19,7 +19,7 @@ %input.js-add-list{ type: "checkbox", name: "add_list", checked: add_list } %span= _('Add list') .clearfix - %button.gl-button.btn.btn-success.float-left.js-new-label-btn{ type: "button" } + %button.gl-button.btn.btn-confirm.float-left.js-new-label-btn{ type: "button" } = _('Create') %button.gl-button.btn.btn-default.float-right.js-cancel-label-btn{ type: "button" } = _('Cancel') diff --git a/app/views/shared/issuable/_nav.html.haml b/app/views/shared/issuable/_nav.html.haml index c715cd8f736..a3d6a2c8e04 100644 --- a/app/views/shared/issuable/_nav.html.haml +++ b/app/views/shared/issuable/_nav.html.haml @@ -4,7 +4,7 @@ %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 opened.") % { page_context_word: page_context_word }, data: { state: 'opened' } do + = 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)} - if type == :merge_requests diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index d1e74cc771e..f5b2868aa6c 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -5,7 +5,10 @@ - placeholder = local_assigns[:placeholder] || _('Search or filter results...') - is_not_boards_modal_or_productivity_analytics = type != :boards_modal && type != :productivity_analytics - block_css_class = is_not_boards_modal_or_productivity_analytics ? 'row-content-block second-block' : '' -- user_can_admin_list = board && can?(current_user, :admin_list, board.resource_parent) +- if board && board.to_type == "EpicBoard" + - user_can_admin_list = can?(current_user, :admin_epic_board_list, board.resource_parent) +- elsif board + - user_can_admin_list = can?(current_user, :admin_issue_board_list, board.resource_parent) .issues-filters{ class: ("w-100" if type == :boards_modal) } .issues-details-filters.filtered-search-block.d-flex.flex-column.flex-lg-row{ class: block_css_class, "v-pre" => type == :boards_modal } @@ -18,191 +21,194 @@ - if @can_bulk_update .check-all-holder.d-none.d-sm-block.hidden = check_box_tag "check-all-issues", nil, false, class: "check-all-issues left" - .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row - .filtered-search-box - - if type != :boards_modal && type != :boards - - text = tag.span(sprite_icon('history'), class: "d-md-none") + tag.span(_('Recent searches'), class: "d-none d-md-inline") - = dropdown_tag(text, - options: { wrapper_class: "filtered-search-history-dropdown-wrapper", - toggle_class: "btn filtered-search-history-dropdown-toggle-button", - dropdown_class: "filtered-search-history-dropdown", - content_class: "filtered-search-history-dropdown-content" }) do - .js-filtered-search-history-dropdown{ data: { full_path: search_history_storage_prefix } } - .filtered-search-box-input-container.droplab-dropdown - .scroll-container - %ul.tokens-container.list-unstyled - %li.input-token - %input.form-control.filtered-search{ search_filter_input_options(type, placeholder) } - #js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item{ data: {hint: "#{'{{hint}}'}", tag: "#{'{{tag}}'}", action: "#{'{{hint === \'search\' ? \'submit\' : \'\' }}'}" } } - %button.btn.btn-link{ type: 'button' } - -# Encapsulate static class name `{{icon}}` inside #{} to bypass - -# haml lint's ClassAttributeWithStaticValue - %svg - %use{ 'xlink:href': "#{'{{icon}}'}" } - %span.js-filter-hint - {{formattedKey}} - #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } } - %li.filter-dropdown-item{ data: { value: "{{ title }}" } } - %button.btn.btn-link{ type: 'button' } - {{ title }} - %span.btn-helptext - {{ help }} - #js-dropdown-author.filtered-search-input-dropdown-menu.dropdown-menu - - if current_user - %ul{ data: { dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: current_user - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: User.new(username: '{{username}}', name: '{{name}}'), - avatar: { lazy: true, url: '{{avatar_url}}' } - #js-dropdown-assignee.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore + - if Feature.enabled?(:boards_filtered_search, @group) + #js-board-filtered-search + - else + .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row + .filtered-search-box + - if type != :boards_modal && type != :boards + - text = tag.span(sprite_icon('history'), class: "d-md-none") + tag.span(_('Recent searches'), class: "d-none d-md-inline") + = dropdown_tag(text, + options: { wrapper_class: "filtered-search-history-dropdown-wrapper", + toggle_class: "btn filtered-search-history-dropdown-toggle-button", + dropdown_class: "filtered-search-history-dropdown", + content_class: "filtered-search-history-dropdown-content" }) do + .js-filtered-search-history-dropdown{ data: { full_path: search_history_storage_prefix } } + .filtered-search-box-input-container.droplab-dropdown + .scroll-container + %ul.tokens-container.list-unstyled + %li.input-token + %input.form-control.filtered-search{ search_filter_input_options(type, placeholder) } + #js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item{ data: {hint: "#{'{{hint}}'}", tag: "#{'{{tag}}'}", action: "#{'{{hint === \'search\' ? \'submit\' : \'\' }}'}" } } + %button.btn.btn-link{ type: 'button' } + -# Encapsulate static class name `{{icon}}` inside #{} to bypass + -# haml lint's ClassAttributeWithStaticValue + %svg + %use{ 'xlink:href': "#{'{{icon}}'}" } + %span.js-filter-hint + {{formattedKey}} + #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } } + %li.filter-dropdown-item{ data: { value: "{{ title }}" } } + %button.btn.btn-link{ type: 'button' } + {{ title }} + %span.btn-helptext + {{ help }} + #js-dropdown-author.filtered-search-input-dropdown-menu.dropdown-menu - if current_user + %ul{ data: { dropdown: true } } + = render 'shared/issuable/user_dropdown_item', + user: current_user + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } = render 'shared/issuable/user_dropdown_item', - user: current_user - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: User.new(username: '{{username}}', name: '{{name}}'), - avatar: { lazy: true, url: '{{avatar_url}}' } - #js-dropdown-reviewer.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - - if current_user + user: User.new(username: '{{username}}', name: '{{name}}'), + avatar: { lazy: true, url: '{{avatar_url}}' } + #js-dropdown-assignee.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + - if current_user + = render 'shared/issuable/user_dropdown_item', + user: current_user + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + = render 'shared/issuable/user_dropdown_item', + user: User.new(username: '{{username}}', name: '{{name}}'), + avatar: { lazy: true, url: '{{avatar_url}}' } + #js-dropdown-reviewer.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + - if current_user + = render 'shared/issuable/user_dropdown_item', + user: current_user + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } = render 'shared/issuable/user_dropdown_item', - user: current_user - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: User.new(username: '{{username}}', name: '{{name}}'), - avatar: { lazy: true, url: '{{avatar_url}}' } - = render_if_exists 'shared/issuable/approver_dropdown' - = render_if_exists 'shared/issuable/approved_by_dropdown' - #js-dropdown-milestone.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.filter-dropdown-item{ data: { value: 'Upcoming' } } - %button.btn.btn-link{ type: 'button' } - = _('Upcoming') - %li.filter-dropdown-item{ data: { value: 'Started' } } - %button.btn.btn-link{ type: 'button' } - = _('Started') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link.js-data-value{ type: 'button' } - {{title}} - = render_if_exists 'shared/issuable/filter_iteration', type: type - #js-dropdown-release.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link.js-data-value{ type: 'button' } - {{title}} - #js-dropdown-label.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link{ type: 'button' } - %span.dropdown-label-box{ style: 'background: {{color}}' } - %span.label-title.js-data-value + user: User.new(username: '{{username}}', name: '{{name}}'), + avatar: { lazy: true, url: '{{avatar_url}}' } + = render_if_exists 'shared/issuable/approver_dropdown' + = render_if_exists 'shared/issuable/approved_by_dropdown' + #js-dropdown-milestone.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.filter-dropdown-item{ data: { value: 'Upcoming' } } + %button.btn.btn-link{ type: 'button' } + = _('Upcoming') + %li.filter-dropdown-item{ data: { value: 'Started' } } + %button.btn.btn-link{ type: 'button' } + = _('Started') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link.js-data-value{ type: 'button' } + {{title}} + = render_if_exists 'shared/issuable/filter_iteration', type: type + #js-dropdown-release.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link.js-data-value{ type: 'button' } {{title}} - #js-dropdown-my-reaction.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link{ type: 'button' } - %gl-emoji - %span.js-data-value.gl-ml-3 - {{name}} - #js-dropdown-wip.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('Yes') - %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('No') - #js-dropdown-confidential.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('Yes') - %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('No') - - unless disable_target_branch - #js-dropdown-target-branch.filtered-search-input-dropdown-menu.dropdown-menu + #js-dropdown-label.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link{ type: 'button' } + %span.dropdown-label-box{ style: 'background: {{color}}' } + %span.label-title.js-data-value + {{title}} + #js-dropdown-my-reaction.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link{ type: 'button' } + %gl-emoji + %span.js-data-value.gl-ml-3 + {{name}} + #js-dropdown-wip.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('Yes') + %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('No') + #js-dropdown-confidential.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('Yes') + %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('No') + - unless disable_target_branch + #js-dropdown-target-branch.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link.js-data-value.monospace + {{title}} + #js-dropdown-environment.filtered-search-input-dropdown-menu.dropdown-menu %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %li.filter-dropdown-item - %button.btn.btn-link.js-data-value.monospace + %button.btn.btn-link.js-data-value{ type: 'button' } {{title}} - #js-dropdown-environment.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link.js-data-value{ type: 'button' } - {{title}} - = render_if_exists 'shared/issuable/filter_weight', type: type + = render_if_exists 'shared/issuable/filter_weight', type: type - = render_if_exists 'shared/issuable/filter_epic', type: type + = render_if_exists 'shared/issuable/filter_epic', type: type - %button.clear-search.hidden{ type: 'button' } - = sprite_icon('close', size: 16, css_class: 'clear-search-icon') + %button.clear-search.hidden{ type: 'button' } + = sprite_icon('close', size: 16, css_class: 'clear-search-icon') .filter-dropdown-container.d-flex.flex-column.flex-md-row - if type == :boards #js-board-labels-toggle - if current_user #js-board-epics-swimlanes-toggle - .js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } } + .js-board-config{ data: { can_admin_list: user_can_admin_list.to_s, has_scope: board.scoped?.to_s } } - if user_can_admin_list - - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) + - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) || board.to_type == "EpicBoard" .js-create-column-trigger{ data: board_list_data } - else = render 'shared/issuable/board_create_list_dropdown', board: board - if @project - #js-add-issues-btn{ data: { can_admin_list: can?(current_user, :admin_list, @project) } } + #js-add-issues-btn{ data: { can_admin_list: can?(current_user, :admin_issue_board_list, @project) } } #js-toggle-focus-btn - elsif is_not_boards_modal_or_productivity_analytics && show_sorting_dropdown = render 'shared/issuable/sort_dropdown' diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index f26f4adc19a..7a1bb9dd3ca 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -34,7 +34,7 @@ - if issuable_sidebar[:supports_milestone] - milestone = issuable_sidebar[:milestone] || {} - .block.milestone{ data: { qa_selector: 'milestone_block' } } + .block.milestone{ class: 'gl-border-b-0!', data: { qa_selector: 'milestone_block' } } .sidebar-collapsed-icon.has-tooltip{ title: sidebar_milestone_tooltip_label(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } } = sprite_icon('clock') %span.milestone-title.collapse-truncated-title @@ -58,8 +58,10 @@ .selectbox.hide-collapsed = f.hidden_field 'milestone_id', value: milestone[:id], id: nil = dropdown_tag('Milestone', options: { title: _('Assign milestone'), toggle_class: 'js-milestone-select js-extra-options', filter: true, dropdown_class: 'dropdown-menu-selectable', placeholder: _('Search milestones'), data: { show_no: true, field_name: "#{issuable_type}[milestone_id]", project_id: issuable_sidebar[:project_id], issuable_id: issuable_sidebar[:id], ability_name: issuable_type, issue_update: issuable_sidebar[:issuable_json_path], use_id: true, default_no: true, selected: milestone[:title], null_default: true, display: 'static' }}) - - if @project.group.present? && issuable_sidebar[:supports_iterations] - = 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 @project.group.present? && issuable_sidebar[:supports_iterations] + .block{ class: 'gl-pt-0!' } + = 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] #issuable-time-tracker.block @@ -118,6 +120,8 @@ %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 + %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 @@ -126,17 +130,8 @@ - if signed_in .js-sidebar-subscriptions-entry-point - - project_ref = issuable_sidebar[:reference] .block.with-sub-blocks - .project-reference.sub-block - .sidebar-collapsed-icon.dont-change-state - = clipboard_button(text: project_ref, title: _('Copy reference'), placement: "left", boundary: 'viewport') - .cross-project-reference.hide-collapsed - %span - = _('Reference:') - %cite{ title: project_ref } - = project_ref - = clipboard_button(text: project_ref, title: _('Copy reference'), placement: "left", boundary: 'viewport') + #js-reference-entry-point - if issuable_type == 'merge_request' .sidebar-source-branch.sub-block .sidebar-collapsed-icon.dont-change-state @@ -163,7 +158,7 @@ = dropdown_content = dropdown_loading = dropdown_footer add_content_class: true do - %button.gl-button.btn.btn-success.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ type: 'button', disabled: true } + %button.gl-button.btn.btn-confirm.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ type: 'button', disabled: true } = _('Move') = loading_icon(css_class: 'gl-vertical-align-text-bottom sidebar-move-issue-confirmation-loading-icon') diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 2b6920ed80f..26986c913f0 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -43,6 +43,9 @@ - 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_track_event + - options[:data].merge!(data) - invite_text = _('Invite Members') - track_label = 'edit_assignee' diff --git a/app/views/shared/issuable/_sidebar_reviewers.html.haml b/app/views/shared/issuable/_sidebar_reviewers.html.haml index 0142c87aeb0..1a8f1a2639f 100644 --- a/app/views/shared/issuable/_sidebar_reviewers.html.haml +++ b/app/views/shared/issuable/_sidebar_reviewers.html.haml @@ -39,17 +39,4 @@ - data['max-select'] = dropdown_options[:data][:'max-select'] if dropdown_options[:data][:'max-select'] - options[:data].merge!(data) - - if experiment_enabled?(:invite_members_version_a) && can_import_members? - - options[:dropdown_class] += ' dropdown-extended-height' - - options[:footer_content] = true - - options[:wrapper_class] = 'js-sidebar-reviewer-dropdown' - - = dropdown_tag(title, options: options) do - %ul.dropdown-footer-list - %li - = link_to _('Invite Members'), - project_project_members_path(@project), - title: _('Invite Members'), - data: { 'is-link': true, 'track-event': 'click_invite_members', 'track-label': 'edit_reviewer' } - - else - = dropdown_tag(title, options: options) + = dropdown_tag(title, options: options) diff --git a/app/views/shared/issuable/csv_export/_button.html.haml b/app/views/shared/issuable/csv_export/_button.html.haml deleted file mode 100644 index 8134b7eb161..00000000000 --- a/app/views/shared/issuable/csv_export/_button.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- if current_user - %button.csv_download_link.btn.gl-button.btn-default.btn-icon.has-tooltip{ title: _('Export as CSV'), - data: { toggle: 'modal', target: ".#{issuable_type}-export-modal", qa_selector: 'export_as_csv_button' } } - = sprite_icon('export') diff --git a/app/views/shared/issuable/csv_export/_modal.html.haml b/app/views/shared/issuable/csv_export/_modal.html.haml deleted file mode 100644 index 4a4c6b90cd9..00000000000 --- a/app/views/shared/issuable/csv_export/_modal.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -- class_name = "#{issuable_type.dasherize}-export-modal" -- if current_user - .modal.issuable-export-modal{ class: class_name } - .modal-dialog - .modal-content{ data: { qa_selector: "export_issuable_modal" } } - .modal-header - %h3 - = _("Export %{issuable_type}" % { issuable_type: issuable_type.humanize(capitalize: false) }) - .svg-content.import-export-svg-container - = image_tag 'illustrations/export-import.svg', role: "presentation", class: 'illustration' - %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - = sprite_icon('close', css_class: 'gl-icon') - .modal-body - - issuable_count = issuables_count_for_state(issuable_type.to_sym, params[:state]) - - unless issuable_count == -1 # The count timed out - .modal-subheader - = sprite_icon('check', css_class: 'gl-icon gl-color-green-400') - %strong.gl-ml-3 - - if issuable_type.eql?('merge_requests') - = n_("%{count} merge request selected", "%{count} merge requests selected", issuable_count) % { count: issuable_count } - - else - = n_("%{count} issue selected", "%{count} issues selected", issuable_count) % { count: issuable_count } - .modal-text - = html_escape(_('The CSV export will be created in the background. Once finished, it will be sent to %{strong_open}%{email}%{strong_close} in an attachment.')) % { email: @current_user.notification_email, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - .modal-footer - - if issuable_type.eql?('merge_requests') - = link_to _("Export merge requests"), export_csv_project_merge_requests_path(@project, request.query_parameters), method: :post, class: 'btn gl-button btn-success', data: { track_label: "export_merge_requests_csv", track_event: "click_button", track_value: "" } - - else - = link_to _('Export issues'), export_csv_project_issues_path(@project, request.query_parameters), method: :post, class: 'btn gl-button btn-success', data: { track_label: "export_issues_csv", track_event: "click_button", track_value: "", qa_selector: "export_issues_button" } diff --git a/app/views/shared/labels/_form.html.haml b/app/views/shared/labels/_form.html.haml index 2df6c3a6afd..604aac9237c 100644 --- a/app/views/shared/labels/_form.html.haml +++ b/app/views/shared/labels/_form.html.haml @@ -28,7 +28,7 @@ = render_suggested_colors .form-actions - if @label.persisted? - = f.submit 'Save changes', class: 'btn gl-button btn-success js-save-button' + = f.submit 'Save changes', class: 'btn gl-button btn-confirm js-save-button' - else - = f.submit 'Create label', class: 'btn gl-button btn-success js-save-button qa-label-create-button' - = link_to 'Cancel', back_path, class: 'btn gl-button btn-cancel' + = f.submit 'Create label', class: 'btn gl-button btn-confirm js-save-button qa-label-create-button' + = link_to 'Cancel', back_path, class: 'btn gl-button btn-default btn-cancel' diff --git a/app/views/shared/labels/_nav.html.haml b/app/views/shared/labels/_nav.html.haml index 6d1d422f227..a0225e35c90 100644 --- a/app/views/shared/labels/_nav.html.haml +++ b/app/views/shared/labels/_nav.html.haml @@ -19,6 +19,6 @@ = sprite_icon('search') = render 'shared/labels/sort_dropdown' - if labels_or_filters && can_admin_label && @project - = link_to _('New label'), new_project_label_path(@project), class: "btn gl-button btn-success qa-label-create-new" + = link_to _('New label'), new_project_label_path(@project), class: "btn gl-button btn-confirm qa-label-create-new" - if labels_or_filters && can_admin_label && @group - = link_to _('New label'), new_group_label_path(@group), class: "btn gl-button btn-success qa-label-create-new" + = link_to _('New label'), new_group_label_path(@group), class: "btn gl-button btn-confirm qa-label-create-new" diff --git a/app/views/shared/members/_invite_group.html.haml b/app/views/shared/members/_invite_group.html.haml index 5e3a6918ab2..d59f2950df6 100644 --- a/app/views/shared/members/_invite_group.html.haml +++ b/app/views/shared/members/_invite_group.html.haml @@ -23,4 +23,4 @@ .clearable-input = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date-groups', placeholder: _('Expiration date'), id: 'expires_at_groups' = sprite_icon('close', size: 16, css_class: 'clear-icon js-clear-input gl-text-gray-200') - = submit_tag _("Invite"), class: "btn btn-success", data: { qa_selector: 'invite_group_button' } + = submit_tag _("Invite"), class: "gl-button btn btn-confirm gl-mr-3", data: { qa_selector: 'invite_group_button' } diff --git a/app/views/shared/members/_invite_member.html.haml b/app/views/shared/members/_invite_member.html.haml index 0302b2fc3cf..ad0ba6dcedf 100644 --- a/app/views/shared/members/_invite_member.html.haml +++ b/app/views/shared/members/_invite_member.html.haml @@ -23,6 +23,6 @@ .clearable-input = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date' = sprite_icon('close', size: 16, css_class: 'clear-icon js-clear-input gl-text-gray-200') - = submit_tag _("Invite"), class: "gl-button btn btn-success", data: { qa_selector: 'invite_member_button' } + = submit_tag _("Invite"), class: "gl-button btn btn-confirm gl-mr-3", data: { qa_selector: 'invite_member_button' } - if can_import_members = link_to _("Import"), import_path, class: "gl-button btn btn-default", title: _("Import members from another project") diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index c76051a25b2..0ba3e539357 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -107,7 +107,7 @@ - if member.can_approve? = link_to polymorphic_path([:approve_access_request, member]), method: :post, - class: "btn btn-success btn-icon gl-button align-self-center m-0 mb-2 #{'mb-sm-0 ml-sm-2' unless force_mobile_view}", + class: "btn btn-confirm btn-icon gl-button align-self-center m-0 mb-2 #{'mb-sm-0 ml-sm-2' unless force_mobile_view}", title: _('Grant access') do %span{ class: ('d-block d-sm-none' unless force_mobile_view) } = _('Grant access') diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index 4301bf01858..f52bf1551f4 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -25,7 +25,11 @@ • - if total_count > recent_releases.count • - = link_to n_('%{count} more release', '%{count} more releases', more_count) % { count: more_count }, project_releases_path(milestone.project) + - more_text = n_('%{count} more release', '%{count} more releases', more_count) % { count: more_count } + - if milestone.project_milestone? + = link_to more_text, project_releases_path(milestone.project) + - else + = more_text %div = render('shared/milestone_expired', milestone: milestone) - if milestone.group_milestone? diff --git a/app/views/shared/notifications/_button.html.haml b/app/views/shared/notifications/_button.html.haml deleted file mode 100644 index e12531b8a8d..00000000000 --- a/app/views/shared/notifications/_button.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -- btn_class = local_assigns.fetch(:btn_class, '') -- emails_disabled = local_assigns.fetch(:emails_disabled, false) - -- if notification_setting - - if emails_disabled - - button_title = notification_description(:owner_disabled) - - aria_label = button_title - - btn_class << " disabled" - - else - - button_title = _("Notification setting") - - aria_label = _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) } - - .js-notification-dropdown.notification-dropdown.mr-md-2.home-panel-action-button.dropdown.inline - = form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f| - = hidden_setting_source_input(notification_setting) - = f.hidden_field :level, class: "notification_setting_level" - .js-notification-toggle-btns - %div{ class: ("btn-group" if notification_setting.custom?) } - - if notification_setting.custom? - %button.dropdown-new.btn.btn-default.btn-icon.gl-button.has-tooltip.notifications-btn.text-left#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } - = sprite_icon("notifications", css_class: "js-notification-loading") - = notification_title(notification_setting.level) - %button.btn.dropdown-toggle.gl-display-flex.gl-align-items-center{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } - = sprite_icon('chevron-down') - .sr-only Toggle dropdown - - else - %button.dropdown-new.btn.btn-default.btn-icon.gl-button.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } - .float-left - = sprite_icon("notifications", css_class: "js-notification-loading") - = notification_title(notification_setting.level) - .float-right - = sprite_icon("chevron-down") - - = render "shared/notifications/notification_dropdown", notification_setting: notification_setting - - = content_for :scripts_body do - = render "shared/notifications/custom_notifications", notification_setting: notification_setting diff --git a/app/views/shared/notifications/_custom_notifications.html.haml b/app/views/shared/notifications/_custom_notifications.html.haml deleted file mode 100644 index 946e3c67dcf..00000000000 --- a/app/views/shared/notifications/_custom_notifications.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -- hide_label = local_assigns.fetch(:hide_label, false) - -.modal.fade{ tabindex: "-1", role: "dialog", id: notifications_menu_identifier("modal", notification_setting), "aria-labelledby": "custom-notifications-title" } - .modal-dialog - .modal-content - .modal-header - %h4#custom-notifications-title.modal-title - #{ _('Custom notification events') } - %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": true } × - - .modal-body - .container-fluid - = form_for notification_setting, html: { class: "custom-notifications-form" } do |f| - = hidden_setting_source_input(notification_setting) - = hidden_field_tag("hide_label", true) if hide_label - .row - .col-lg-4 - %h4.gl-mt-0= _('Notification events') - %p - - notification_link = link_to _('notification emails'), help_page_path('user/profile/notifications'), target: '_blank' - - paragraph = _('Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notification_link}.') % { notification_link: notification_link.html_safe } - #{ paragraph.html_safe } - .col-lg-8 - - notification_setting.email_events.each_with_index do |event, index| - - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]" - .form-group - .form-check{ class: ("gl-mt-0" if index == 0) } - = check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event form-check-input", checked: notification_setting.public_send(event)) - %label.form-check-label{ for: field_id } - %strong - = notification_event_name(event) - %span.spinner.is-loading.gl-vertical-align-middle.gl-display-none - = sprite_icon('check', css_class: 'is-done gl-display-none gl-vertical-align-middle gl-text-green-600') diff --git a/app/views/shared/notifications/_new_button.html.haml b/app/views/shared/notifications/_new_button.html.haml deleted file mode 100644 index 4b008601783..00000000000 --- a/app/views/shared/notifications/_new_button.html.haml +++ /dev/null @@ -1,35 +0,0 @@ -- btn_class = local_assigns.fetch(:btn_class, '') -- dropdown_container_class = local_assigns.fetch(:dropdown_container_class, '') -- emails_disabled = local_assigns.fetch(:emails_disabled, false) - -- if notification_setting - - if emails_disabled - - button_title = notification_description(:owner_disabled) - - btn_class << " disabled" - - else - - button_title = _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) } - - .js-notification-dropdown.notification-dropdown.home-panel-action-button.gl-mt-3.dropdown.inline{ class: dropdown_container_class } - = form_for notification_setting, remote: true, html: { class: "notification-form no-label" } do |f| - = hidden_setting_source_input(notification_setting) - = hidden_field_tag "hide_label", true - = f.hidden_field :level, class: "notification_setting_level" - .js-notification-toggle-btns - %div{ class: ("btn-group" if notification_setting.custom?) } - - if notification_setting.custom? - %button.dropdown-new.btn.gl-button.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => button_title, data: { container: "body", placement: 'top', toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } - = notification_setting_icon(notification_setting) - %span.js-notification-loading.fa.hidden - %button.btn.gl-button.btn-default.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" }, class: "#{btn_class}" } - = sprite_icon("chevron-down", css_class: "icon mr-0") - .sr-only Toggle dropdown - - else - %button.dropdown-new.btn.gl-button.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => button_title, data: { container: "body", placement: 'top', toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } - = notification_setting_icon(notification_setting) - %span.js-notification-loading.fa.hidden - = sprite_icon("chevron-down", css_class: "icon") - - = render "shared/notifications/notification_dropdown", notification_setting: notification_setting - - = content_for :scripts_body do - = render "shared/notifications/custom_notifications", notification_setting: notification_setting, hide_label: true diff --git a/app/views/shared/notifications/_notification_dropdown.html.haml b/app/views/shared/notifications/_notification_dropdown.html.haml deleted file mode 100644 index a6ef2d51171..00000000000 --- a/app/views/shared/notifications/_notification_dropdown.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: [notifications_menu_identifier("dropdown", notification_setting)] } - - NotificationSetting.levels.each_key do |level| - - next if level == "custom" - - next if level == "global" && notification_setting.source.nil? - - = notification_list_item(level, notification_setting) - - %li.divider - %li - %a.update-notification{ href: "#", role: "button", class: ("is-active" if notification_setting.custom?), data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), notification_level: "custom", notification_title: "Custom" } } - %strong.dropdown-menu-inner-title= s_('NotificationSetting|Custom') - %span.dropdown-menu-inner-content= notification_description("custom") diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index c0c009f2a86..6fae6a15567 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -2,9 +2,6 @@ - avatar = true unless local_assigns[:avatar] == false - use_creator_avatar = false unless local_assigns[:use_creator_avatar] == true - stars = true unless local_assigns[:stars] == false -- forks = true unless local_assigns[:forks] == false -- merge_requests = true unless local_assigns[:merge_requests] == false -- issues = true unless local_assigns[:issues] == false - pipeline_status = true unless local_assigns[:pipeline_status] == false - skip_namespace = false unless local_assigns[:skip_namespace] == true - user = local_assigns[:user] @@ -40,8 +37,9 @@ - css_class = (i >= projects_limit) || project.pending_delete? ? 'hide' : nil = render "shared/projects/project", project: project, skip_namespace: skip_namespace, avatar: avatar, stars: stars, css_class: css_class, use_creator_avatar: use_creator_avatar, - forks: forks, show_last_commit_as_description: show_last_commit_as_description, user: user, merge_requests: merge_requests, - issues: issues, pipeline_status: pipeline_status, compact_mode: compact_mode + forks: project.forking_enabled?, show_last_commit_as_description: show_last_commit_as_description, user: user, + merge_requests: project.merge_requests_enabled?, issues: project.issues_enabled?, + pipeline_status: pipeline_status, compact_mode: compact_mode = paginate_collection(projects, remote: remote) unless skip_pagination - else - if @contributed_projects diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 115d0c9a7c5..a33cd7c3b53 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -12,9 +12,10 @@ - css_class += " no-description" if project.description.blank? && !show_last_commit_as_description - cache_key = project_list_cache_key(project, pipeline_status: pipeline_status) - updated_tooltip = time_ago_with_tooltip(project.last_activity_date) -- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) && project.last_pipeline.present? +- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) +- last_pipeline = project.last_pipeline if show_pipeline_status_icon - css_controls_class = compact_mode ? [] : ["flex-lg-row", "justify-content-lg-between"] -- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon +- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present? - avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar' %li.project-row.d-flex{ class: css_class } @@ -68,10 +69,10 @@ .controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class.join(" ") } .icon-container.d-flex.align-items-center - - if show_pipeline_status_icon + - if show_pipeline_status_icon && last_pipeline.present? - pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref) %span.icon-wrapper.pipeline-status - = render 'ci/status/icon', status: project.last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path + = render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path = render_if_exists 'shared/projects/archived', project: project - if stars diff --git a/app/views/shared/projects/_search_bar.html.haml b/app/views/shared/projects/_search_bar.html.haml index a745da32110..6c3a6ce809f 100644 --- a/app/views/shared/projects/_search_bar.html.haml +++ b/app/views/shared/projects/_search_bar.html.haml @@ -13,7 +13,7 @@ .filtered-search-box.m-0 .filtered-search-box-input-container.pl-2 = render 'shared/projects/search_form', admin_view: false, search_form_placeholder: _("Search projects...") - %button.btn.btn-secondary{ type: 'submit', form: 'project-filter-form' } + %button.btn.gl-button.btn-icon.btn-secondary{ type: 'submit', form: 'project-filter-form' } = sprite_icon('search', css_class: 'search-icon ') .filtered-search-dropdown.flex-row.align-items-center.mb-2.m-sm-0#filtered-search-visibility-dropdown{ class: flex_grow_and_shrink_xs } .filtered-search-dropdown-label.p-0.pl-sm-3.font-weight-bold 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 d1b32df7139..75d6d88fbc3 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,3 +33,6 @@ %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) + %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 } diff --git a/app/views/shared/snippets/_snippet.html.haml b/app/views/shared/snippets/_snippet.html.haml index 5f0ecb2ee79..52cf0248f21 100644 --- a/app/views/shared/snippets/_snippet.html.haml +++ b/app/views/shared/snippets/_snippet.html.haml @@ -10,6 +10,8 @@ %ul.controls %li + = snippet_file_count(snippet) + %li = link_to gitlab_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if notes_count == 0) do = sprite_icon('comments', css_class: 'gl-vertical-align-text-bottom') = notes_count diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml index 5fd22665633..d91e3c73c49 100644 --- a/app/views/shared/wikis/_form.html.haml +++ b/app/views/shared/wikis/_form.html.haml @@ -70,10 +70,10 @@ .form-actions - if @page && @page.persisted? - = f.submit _("Save changes"), class: 'btn gl-button btn-success qa-save-changes-button js-wiki-btn-submit', disabled: 'true' + = f.submit _("Save changes"), class: 'btn gl-button btn-confirm qa-save-changes-button js-wiki-btn-submit', disabled: 'true' .float-right = link_to _("Cancel"), wiki_page_path(@wiki, @page), class: 'btn gl-button btn-cancel btn-default' - else - = f.submit s_("Wiki|Create page"), class: 'btn-success gl-button btn qa-create-page-button rspec-create-page-button js-wiki-btn-submit', disabled: 'true' + = f.submit s_("Wiki|Create page"), class: 'btn-confirm gl-button btn qa-create-page-button rspec-create-page-button js-wiki-btn-submit', disabled: 'true' .float-right = link_to _("Cancel"), wiki_path(@wiki), class: 'btn gl-button btn-cancel btn-default' diff --git a/app/views/shared/wikis/_main_links.html.haml b/app/views/shared/wikis/_main_links.html.haml index 8568c36559a..02794950895 100644 --- a/app/views/shared/wikis/_main_links.html.haml +++ b/app/views/shared/wikis/_main_links.html.haml @@ -2,5 +2,5 @@ = link_to wiki_page_path(@wiki, @page, action: :history), class: "btn gl-button", role: "button", data: { qa_selector: 'page_history_button' } do = s_("Wiki|Page history") - if can?(current_user, :create_wiki, @wiki.container) - = link_to wiki_path(@wiki, action: :new), class: "btn gl-button btn-success btn-inverted", role: "button", data: { qa_selector: 'new_page_button' } do + = link_to wiki_path(@wiki, action: :new), class: "btn gl-button btn-confirm-secondary", role: "button", data: { qa_selector: 'new_page_button' } do = s_("Wiki|New page") diff --git a/app/views/shared/wikis/_sidebar_wiki_page.html.haml b/app/views/shared/wikis/_sidebar_wiki_page.html.haml index 4259633280a..38a7e6fc813 100644 --- a/app/views/shared/wikis/_sidebar_wiki_page.html.haml +++ b/app/views/shared/wikis/_sidebar_wiki_page.html.haml @@ -1,3 +1,3 @@ %li{ class: active_when(params[:id] == wiki_page.slug) } - = link_to wiki_page_path(@wiki, wiki_page), data: { qa_selector: 'wiki_page_link', qa_page_name: wiki_page.slug } do + = link_to wiki_page_path(@wiki, wiki_page), data: { qa_selector: 'wiki_page_link', qa_page_name: wiki_page.human_title } do = wiki_page.human_title diff --git a/app/views/shared/wikis/edit.html.haml b/app/views/shared/wikis/edit.html.haml index c2b0e474c03..4bdeee3996f 100644 --- a/app/views/shared/wikis/edit.html.haml +++ b/app/views/shared/wikis/edit.html.haml @@ -1,7 +1,8 @@ - wiki_page_title @page, @page.persisted? ? _('Edit') : _('New') - add_page_specific_style 'page_bundles/wiki' -= wiki_page_errors(@error) +- 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 = wiki_sidebar_toggle_button |