summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/issuable')
-rw-r--r--app/views/shared/issuable/_form.html.haml8
-rw-r--r--app/views/shared/issuable/_search_bar.html.haml2
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml5
-rw-r--r--app/views/shared/issuable/_sidebar_assignees.html.haml24
-rw-r--r--app/views/shared/issuable/_sidebar_reviewers.html.haml6
-rw-r--r--app/views/shared/issuable/_sidebar_user_dropdown.html.haml21
-rw-r--r--app/views/shared/issuable/form/_branch_chooser.html.haml14
-rw-r--r--app/views/shared/issuable/form/_metadata.html.haml10
8 files changed, 52 insertions, 38 deletions
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") }