diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/helpers/form_helper.rb | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) | |
download | gitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/helpers/form_helper.rb')
-rw-r--r-- | app/helpers/form_helper.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index 67bfeb22d92..3dde5afcb92 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -55,6 +55,29 @@ module FormHelper dropdown_data end + def reviewers_dropdown_options(issuable_type) + { + toggle_class: 'js-reviewer-search js-multiselect js-save-user-data', + title: 'Request review from', + filter: true, + dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-reviewer', + placeholder: _('Search users'), + data: { + first_user: current_user&.username, + null_user: true, + current_user: true, + project_id: (@target_project || @project)&.id, + field_name: "#{issuable_type}[reviewer_ids][]", + default_label: 'Unassigned', + 'dropdown-header': 'Reviewer(s)', + multi_select: true, + 'input-meta': 'name', + 'always-show-selectbox': true, + current_user_info: UserSerializer.new.represent(current_user) + } + } + end + # Overwritten def issue_supports_multiple_assignees? false |