diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-17 18:23:11 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-17 18:23:11 +0200 |
commit | 423dcb46eeba31461f02424c0afa1629b24f9652 (patch) | |
tree | 66b862345285b793d4a47dafb7b358104b875c9b | |
parent | 64dbcfe27f362ebbb3da840b0914c40dba814505 (diff) | |
download | gitlab-ce-423dcb46eeba31461f02424c0afa1629b24f9652.tar.gz |
Set initial value to Issue/MR form -> assignee selectbox
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/views/projects/issues/_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/issues/_issue_context.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_form.html.haml | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml index 2bf66eef6cb..f725db57ad1 100644 --- a/app/views/projects/issues/_form.html.haml +++ b/app/views/projects/issues/_form.html.haml @@ -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 diff --git a/app/views/projects/issues/_issue_context.html.haml b/app/views/projects/issues/_issue_context.html.haml index 35ea4f260fa..029d7d6f0f4 100644 --- a/app/views/projects/issues/_issue_context.html.haml +++ b/app/views/projects/issues/_issue_context.html.haml @@ -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) diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml index 7049e313cde..9502ff95d8e 100644 --- a/app/views/projects/merge_requests/_form.html.haml +++ b/app/views/projects/merge_requests/_form.html.haml @@ -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 |