2021-01-03 14:25:43 +05:30
|
|
|
- issuable_type = issuable_sidebar[:type]
|
|
|
|
|
2023-01-13 00:05:48 +05:30
|
|
|
.js-sidebar-reviewers-root{ data: { field: issuable_type, signed_in: signed_in } }
|
2021-01-03 14:25:43 +05:30
|
|
|
.title.hide-collapsed
|
2022-10-11 01:57:18 +05:30
|
|
|
= _('Reviewers')
|
2022-05-07 20:08:51 +05:30
|
|
|
= gl_loading_icon(inline: true)
|
2021-01-03 14:25:43 +05:30
|
|
|
|
|
|
|
.selectbox.hide-collapsed
|
2023-01-13 00:05:48 +05:30
|
|
|
.js-reviewers-inputs
|
2021-01-03 14:25:43 +05:30
|
|
|
|
|
|
|
- options = { toggle_class: 'js-reviewer-search js-author-search',
|
|
|
|
title: _('Request review from'),
|
|
|
|
filter: true,
|
|
|
|
dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author',
|
|
|
|
placeholder: _('Search users'),
|
|
|
|
data: { first_user: issuable_sidebar.dig(:current_user, :username),
|
|
|
|
current_user: true,
|
|
|
|
iid: issuable_sidebar[:iid],
|
|
|
|
issuable_type: issuable_type,
|
|
|
|
project_id: issuable_sidebar[:project_id],
|
|
|
|
author_id: issuable_sidebar[:author_id],
|
|
|
|
field_name: "#{issuable_type}[reviewer_ids][]",
|
|
|
|
issue_update: issuable_sidebar[:issuable_json_path],
|
|
|
|
ability_name: issuable_type,
|
|
|
|
null_user: true,
|
|
|
|
display: 'static' } }
|
|
|
|
|
|
|
|
- dropdown_options = reviewers_dropdown_options(issuable_type)
|
|
|
|
- title = dropdown_options[:title]
|
|
|
|
- options[:toggle_class] += ' js-multiselect js-save-user-data'
|
2023-01-13 00:05:48 +05:30
|
|
|
- data = { multi_select: true }
|
2021-01-03 14:25:43 +05:30
|
|
|
- data['dropdown-title'] = title
|
|
|
|
- data['dropdown-header'] = dropdown_options[:data][:'dropdown-header']
|
2023-01-13 00:05:48 +05:30
|
|
|
- data[:suggested_reviewers_help_path] = dropdown_options[:data][:suggested_reviewers_help_path]
|
2022-11-25 23:54:43 +05:30
|
|
|
- data[:suggested_reviewers_header] = dropdown_options[:data][:suggested_reviewers_header]
|
|
|
|
- data[:all_members_header] = dropdown_options[:data][:all_members_header]
|
|
|
|
- data[:show_suggested] = dropdown_options[:data][:show_suggested]
|
|
|
|
- data['max-select'] = dropdown_max_select(dropdown_options[:data], :limit_reviewer_and_assignee_size)
|
2021-01-03 14:25:43 +05:30
|
|
|
- options[:data].merge!(data)
|
|
|
|
|
2021-09-04 01:27:46 +05:30
|
|
|
= render 'shared/issuable/sidebar_user_dropdown',
|
|
|
|
options: options,
|
|
|
|
wrapper_class: 'js-sidebar-reviewer-dropdown',
|
|
|
|
track_label: 'edit_reviewer',
|
|
|
|
trigger_source: "#{issuable_type}-reviewer-dropdown"
|