Commit 177b953d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'improve/assignee_select' into 'master'

Improve assignee select

Fixes #1036. Fixes #1047
parents ade780a9 423dcb46
......@@ -24,7 +24,7 @@
%i.icon-user
Assign to
.col-sm-10
= project_users_select_tag('issue[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control')
= project_users_select_tag('issue[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @issue.assignee_id)
 
= link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
.form-group
......
......@@ -6,7 +6,8 @@
- if can?(current_user, :modify_issue, @issue)
= link_to profile_path(issue.assignee) do
= image_tag(avatar_icon(issue.assignee.email), class: 'avatar avatar-inline s16 assignee') if issue.assignee
= f.select(:assignee_id, assignee_options(@issue), { include_blank: "Assign to user (none):" }, {class: 'select2'})
= project_users_select_tag('issue[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @issue.assignee_id)
- elsif issue.assignee
= link_to_member(@project, @issue.assignee)
......
......@@ -50,7 +50,7 @@
%i.icon-user
Assign to
.col-sm-10
= project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control')
= project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id)
 
= link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
.form-group
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment