Commit 8d240fb0e76f6333a51b1e9eaffb9196d2e4557a
1 parent
f31f101d
Exists in
spb-stable
and in
2 other branches
Show/hide issue assignee avatar depends on drag-n-drop column in milestone view
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
10 additions
and
2 deletions
Show diff stats
app/assets/javascripts/milestone.js.coffee
... | ... | @@ -6,6 +6,13 @@ class Milestone |
6 | 6 | data: data |
7 | 7 | success: (data) -> |
8 | 8 | if data.saved == true |
9 | + if data.assignee_avatar_url | |
10 | + img_tag = $('<img/>') | |
11 | + img_tag.attr('src', data.assignee_avatar_url) | |
12 | + img_tag.addClass('avatar s16') | |
13 | + $(li).find('.assignee-icon').html(img_tag) | |
14 | + else | |
15 | + $(li).find('.assignee-icon').html('') | |
9 | 16 | $(li).effect 'highlight' |
10 | 17 | else |
11 | 18 | new Flash("Issue update failed", 'alert') | ... | ... |
app/controllers/projects/issues_controller.rb
app/views/projects/milestones/_issue.html.haml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | = link_to [@project, issue] do |
4 | 4 | %span.cgray ##{issue.iid} |
5 | 5 | = link_to_gfm issue.title, [@project, issue] |
6 | - - if issue.assignee | |
7 | - .pull-right | |
6 | + .pull-right.assignee-icon | |
7 | + - if issue.assignee | |
8 | 8 | = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16" |
9 | 9 | ... | ... |