debian-mirror-gitlab/app/views/shared/issuable/_sidebar_assignees.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
2 KiB
Text
Raw Normal View History

2019-02-15 15:39:39 +05:30
- issuable_type = issuable_sidebar[:type]
2021-04-29 21:17:54 +05:30
- dropdown_options = assignees_dropdown_options(issuable_type)
2019-02-15 15:39:39 +05:30
2023-01-13 00:05:48 +05:30
.js-sidebar-assignees-root{ data: { field: issuable_type,
2021-06-08 01:23:25 +05:30
signed_in: signed_in,
max_assignees: dropdown_options[:data][:"max-select"],
2021-10-27 15:23:28 +05:30
directly_invite_members: can_admin_project_member?(@project) } }
2017-08-17 22:00:37 +05:30
.title.hide-collapsed
2022-10-11 01:57:18 +05:30
= s_('Label|Assignee')
2022-05-07 20:08:51 +05:30
= gl_loading_icon(inline: true)
2017-08-17 22:00:37 +05:30
2021-03-11 19:13:27 +05:30
.js-sidebar-assignee-data.selectbox.hide-collapsed
2019-02-15 15:39:39 +05:30
- if assignees.none?
= hidden_field_tag "#{issuable_type}[assignee_ids][]", 0, id: nil
- else
- assignees.each do |assignee|
2019-12-04 20:38:33 +05:30
= hidden_field_tag "#{issuable_type}[assignee_ids][]", assignee.id, id: nil, data: assignee_sidebar_data(assignee, merge_request: @merge_request)
2017-08-17 22:00:37 +05:30
2019-02-15 15:39:39 +05:30
- options = { toggle_class: 'js-user-search js-author-search',
title: _('Assign to'),
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,
2019-12-04 20:38:33 +05:30
iid: issuable_sidebar[:iid],
issuable_type: issuable_type,
2019-02-15 15:39:39 +05:30
project_id: issuable_sidebar[:project_id],
author_id: issuable_sidebar[:author_id],
field_name: "#{issuable_type}[assignee_ids][]",
issue_update: issuable_sidebar[:issuable_json_path],
ability_name: issuable_type,
null_user: true,
display: 'static' } }
2017-08-17 22:00:37 +05:30
2019-07-31 22:56:46 +05:30
- title = dropdown_options[:title]
- options[:toggle_class] += ' js-multiselect js-save-user-data'
- data = { field_name: "#{issuable_type}[assignee_ids][]" }
- data[:multi_select] = true
- data['dropdown-title'] = title
- data['dropdown-header'] = dropdown_options[:data][:'dropdown-header']
2023-04-23 21:23:45 +05:30
- data['max-select'] = dropdown_max_select(dropdown_options[:data])
2019-07-31 22:56:46 +05:30
- options[:data].merge!(data)
2017-08-17 22:00:37 +05:30
2021-09-04 01:27:46 +05:30
= render 'shared/issuable/sidebar_user_dropdown',
options: options,
wrapper_class: 'js-sidebar-assignee-dropdown',
track_label: 'edit_assignee',
trigger_source: "#{issuable_type}-assignee-dropdown"