diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-16 18:43:07 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-16 18:43:07 +0400 |
commit | 547ea3c80d53c8741f62b435f59427f7ebd4401a (patch) | |
tree | 9020a8526a4d73f9980c5c6ea3a81dfc34a7db78 | |
parent | 3e3396365d6b477a06584b7149f1b816996ac4b1 (diff) | |
parent | 8d240fb0e76f6333a51b1e9eaffb9196d2e4557a (diff) |
Merge branch 'kanban-fixes' into 'master'
Kanban improvements
When drag from unassigned to assigned column - issue assignee avatar updated
-rw-r--r-- | app/assets/javascripts/milestone.js.coffee | 7 | ||||
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 1 | ||||
-rw-r--r-- | app/views/projects/milestones/_issue.html.haml | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/milestone.js.coffee b/app/assets/javascripts/milestone.js.coffee index 5cbddd3a207..ea01c318d4f 100644 --- a/app/assets/javascripts/milestone.js.coffee +++ b/app/assets/javascripts/milestone.js.coffee @@ -6,6 +6,13 @@ class Milestone data: data success: (data) -> if data.saved == true + if data.assignee_avatar_url + img_tag = $('<img/>') + img_tag.attr('src', data.assignee_avatar_url) + img_tag.addClass('avatar s16') + $(li).find('.assignee-icon').html(img_tag) + else + $(li).find('.assignee-icon').html('') $(li).effect 'highlight' else new Flash("Issue update failed", 'alert') diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 6c6fc7e0779..ddea8901f9b 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -90,6 +90,7 @@ class Projects::IssuesController < Projects::ApplicationController format.json do render json: { saved: @issue.valid?, + assignee_avatar_url: @issue.assignee.try(:avatar_url) } end end diff --git a/app/views/projects/milestones/_issue.html.haml b/app/views/projects/milestones/_issue.html.haml index 7c993e01c23..08ccd0cdc8a 100644 --- a/app/views/projects/milestones/_issue.html.haml +++ b/app/views/projects/milestones/_issue.html.haml @@ -3,7 +3,7 @@ = link_to [@project, issue] do %span.cgray ##{issue.iid} = link_to_gfm issue.title, [@project, issue] - - if issue.assignee - .pull-right + .pull-right.assignee-icon + - if issue.assignee = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16" |