diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /app/views/shared/issuable | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/views/shared/issuable')
-rw-r--r-- | app/views/shared/issuable/_bulk_update_sidebar.html.haml | 12 | ||||
-rw-r--r-- | app/views/shared/issuable/_form.html.haml | 15 | ||||
-rw-r--r-- | app/views/shared/issuable/_invite_members_trigger.html.haml | 8 | ||||
-rw-r--r-- | app/views/shared/issuable/_search_bar.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/issuable/_sidebar.html.haml | 41 | ||||
-rw-r--r-- | app/views/shared/issuable/_sidebar_todo.html.haml | 15 | ||||
-rw-r--r-- | app/views/shared/issuable/_sort_dropdown.html.haml | 2 |
7 files changed, 22 insertions, 73 deletions
diff --git a/app/views/shared/issuable/_bulk_update_sidebar.html.haml b/app/views/shared/issuable/_bulk_update_sidebar.html.haml index bbbb728d048..3a526a9f306 100644 --- a/app/views/shared/issuable/_bulk_update_sidebar.html.haml +++ b/app/views/shared/issuable/_bulk_update_sidebar.html.haml @@ -6,21 +6,13 @@ = form_tag [:bulk_update, @project, type], method: :post, class: "bulk-update" do .block.issuable-sidebar-header .filter-item.inline.update-issues-btn.float-left - = button_tag _('Update all'), class: "gl-button btn update-selected-issues btn-confirm", disabled: true + = button_tag _('Update all'), class: "gl-button btn js-update-selected-issues btn-confirm", disabled: true = button_tag _('Cancel'), class: "gl-button btn btn-default js-bulk-update-menu-hide float-right" - if params[:state] != 'merged' .block .title = _('Status') - .filter-item - = dropdown_tag(_("Select status"), options: { toggle_class: "js-issue-status", title: _("Change status"), dropdown_class: "dropdown-menu-status dropdown-menu-selectable", data: { field_name: "update[state_event]", default_label: _("Status") } } ) do - %ul - %li - %a{ href: "#", data: { id: "reopen" } } - = _('Open') - %li - %a{ href: "#", data: { id: "close" } } - = _('Closed') + .js-issue-status .block .title = _('Assignee') diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index e79719d41b0..6aa80e6808d 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -6,11 +6,16 @@ = form_errors(issuable) - if @conflict - .gl-alert.gl-alert-danger.gl-mb-5 - Someone edited the #{issuable.class.model_name.human.downcase} the same time you did. - Please check out - = link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project, issuable]), target: "_blank", rel: 'noopener noreferrer' - and make sure your changes will not unintentionally remove theirs + = render 'shared/global_alert', + variant: :danger, + dismissible: false, + is_contained: true, + alert_class: 'gl-mb-5' do + .gl-alert-body + Someone edited the #{issuable.class.model_name.human.downcase} the same time you did. + Please check out + = link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project, issuable]), target: "_blank", rel: 'noopener noreferrer' + and make sure your changes will not unintentionally remove theirs = render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form diff --git a/app/views/shared/issuable/_invite_members_trigger.html.haml b/app/views/shared/issuable/_invite_members_trigger.html.haml deleted file mode 100644 index 5dd6ec0addf..00000000000 --- a/app/views/shared/issuable/_invite_members_trigger.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -- return unless can_import_members? - -.js-invite-members-modal{ data: { id: project.id, - name: project.name, - is_project: 'true', - access_levels: ProjectMember.access_level_roles.to_json, - default_access_level: Gitlab::Access::GUEST, - help_link: help_page_url('user/permissions') } } diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index c03697a4076..737a0ff8c5b 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -25,6 +25,8 @@ = check_box_tag checkbox_id, nil, false, class: "check-all-issues left" - if is_epic_board #js-board-filtered-search{ data: { full_path: @group&.full_path } } + - elsif Feature.enabled?(:issue_boards_filtered_search, board&.resource_parent) && board + #js-issue-board-filtered-search - else .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row .filtered-search-box diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 416c788603a..c76aa176696 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -10,19 +10,13 @@ %aside.right-sidebar.js-right-sidebar.js-issuable-sidebar{ data: { signed: { in: signed_in }, issuable_type: issuable_type }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite', 'aria-label': issuable_type } .issuable-sidebar - .block.issuable-sidebar-header - - if signed_in - %span.issuable-header-text.hide-collapsed.float-left - = _('To Do') + .issuable-sidebar-header.gl-py-3 %a.gutter-toggle.float-right.js-sidebar-toggle.has-tooltip{ role: "button", href: "#", "aria-label" => _('Toggle sidebar'), title: sidebar_gutter_tooltip_text, data: { container: 'body', placement: 'left', boundary: 'viewport' } } = sidebar_gutter_toggle_icon - if signed_in - = render "shared/issuable/sidebar_todo", issuable_sidebar: issuable_sidebar + .js-issuable-todo{ data: { project_path: issuable_sidebar[:project_full_path], iid: issuable_sidebar[:iid], id: issuable_sidebar[:id] } } = form_for issuable_type, url: issuable_sidebar[:issuable_json_path], remote: true, html: { class: 'issuable-context-form inline-update js-issuable-update' } do |f| - - if signed_in - .block.todo.hide-expanded - = render "shared/issuable/sidebar_todo", issuable_sidebar: issuable_sidebar, is_collapsed: true .block.assignee.qa-assignee-block = render "shared/issuable/sidebar_assignees", issuable_sidebar: issuable_sidebar, assignees: assignees, signed_in: signed_in @@ -34,34 +28,11 @@ = render_if_exists 'shared/issuable/sidebar_item_epic', issuable_sidebar: issuable_sidebar, group_path: @project.group.full_path, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid], issuable_type: issuable_type - if issuable_sidebar[:supports_milestone] - - milestone = issuable_sidebar[:milestone] || {} .block.milestone{ :class => ("gl-border-b-0!" if issuable_sidebar[:supports_iterations]), 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 - - if milestone.present? - = milestone[:title] - - else - = _('None') - .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 - = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link float-right', data: { qa_selector: "edit_milestone_link", track_label: "right_sidebar", track_property: "milestone", track_event: "click_edit_button", track_value: "" } - .value.hide-collapsed - - if milestone.present? - - milestone_title = milestone[:expired] ? _("%{milestone_name} (Past due)").html_safe % { milestone_name: milestone[:title] } : milestone[:title] - = link_to milestone_title, milestone[:web_url], class: "bold has-tooltip", title: sidebar_milestone_remaining_days(milestone), data: { container: "body", html: 'true', boundary: 'viewport', qa_selector: 'milestone_link', qa_title: milestone[:title] } - - else - %span.no-value - = _('None') - - .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' }}) + .js-milestone-select{ data: { can_edit: can_edit_issuable.to_s, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid] } } - if @project.group.present? && issuable_sidebar[:supports_iterations] - .block{ class: 'gl-pt-0!' } + .block{ class: 'gl-pt-0!', data: { qa_selector: 'iteration_container' } } = render_if_exists 'shared/issuable/iteration_select', can_edit: can_edit_issuable.to_s, group_path: @project.group.full_path, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid], issuable_type: issuable_type - if issuable_sidebar[:supports_time_tracking] @@ -75,13 +46,13 @@ .js-sidebar-labels{ data: sidebar_labels_data(issuable_sidebar, @project) } - = render_if_exists 'shared/issuable/sidebar_weight', issuable_sidebar: issuable_sidebar + = render_if_exists 'shared/issuable/sidebar_weight', issuable_sidebar: issuable_sidebar, can_edit: can_edit_issuable.to_s, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid] - if issuable_sidebar[:supports_severity] #js-severity - if issuable_sidebar.dig(:features_available, :health_status) - .js-sidebar-status-entry-point + .js-sidebar-status-entry-point{ data: sidebar_status_data(issuable_sidebar, @project) } - if issuable_sidebar.has_key?(:confidential) %script#js-confidential-issue-data{ type: "application/json" }= { is_confidential: issuable_sidebar[:confidential], is_editable: can_edit_issuable }.to_json.html_safe diff --git a/app/views/shared/issuable/_sidebar_todo.html.haml b/app/views/shared/issuable/_sidebar_todo.html.haml deleted file mode 100644 index a867421298b..00000000000 --- a/app/views/shared/issuable/_sidebar_todo.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -- is_collapsed = local_assigns.fetch(:is_collapsed, false) -- has_todo = !!issuable_sidebar.dig(:current_user, :todo, :id) - -- todo_button_data = issuable_todo_button_data(issuable_sidebar, is_collapsed) -- button_title = has_todo ? todo_button_data[:mark_text] : todo_button_data[:todo_text] -- button_icon = has_todo ? todo_button_data[:mark_icon] : todo_button_data[:todo_icon] - -%button.issuable-todo-btn.js-issuable-todo{ type: 'button', - class: (is_collapsed ? 'btn-blank sidebar-collapsed-icon dont-change-state has-tooltip' : 'gl-button btn btn-default issuable-header-btn float-right'), - title: button_title, - 'aria-label' => button_title, - data: todo_button_data } - %span.issuable-todo-inner.js-issuable-todo-inner< - = is_collapsed ? button_icon : button_title - = loading_icon(css_class: is_collapsed ? '' : 'gl-ml-3') diff --git a/app/views/shared/issuable/_sort_dropdown.html.haml b/app/views/shared/issuable/_sort_dropdown.html.haml index 9e3caf62d77..caf271e9ee9 100644 --- a/app/views/shared/issuable/_sort_dropdown.html.haml +++ b/app/views/shared/issuable/_sort_dropdown.html.haml @@ -1,6 +1,7 @@ - sort_value = @sort - sort_title = issuable_sort_option_title(sort_value) - viewing_issues = controller.controller_name == 'issues' || controller.action_name == 'issues' +- viewing_merge_requests = controller.controller_name == 'merge_requests' .dropdown.inline.gl-ml-3.issue-sort-dropdown .btn-group{ role: 'group' } @@ -17,6 +18,7 @@ = sortable_item(sort_title_due_date, page_filter_path(sort: sort_value_due_date), sort_title) if viewing_issues = sortable_item(sort_title_popularity, page_filter_path(sort: sort_value_popularity), sort_title) = sortable_item(sort_title_label_priority, page_filter_path(sort: sort_value_label_priority), sort_title) + = sortable_item(sort_title_merged_date, page_filter_path(sort: sort_value_merged_date), sort_title) if viewing_merge_requests = sortable_item(sort_title_relative_position, page_filter_path(sort: sort_value_relative_position), sort_title) if viewing_issues = render_if_exists('shared/ee/issuable/sort_dropdown', viewing_issues: viewing_issues, sort_title: sort_title) = issuable_sort_direction_button(sort_value) |