Commit cec2be2d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-milestone-list-width' into 'master'

Fix width of text in milestone lists and add assignee icon to merge requests.

Before:

![Screen_Shot_2015-03-06_at_13.48.00](https://dev.gitlab.org/gitlab/gitlabhq/uploads/5754638a3ebb79dee1f6c07a6e268035/Screen_Shot_2015-03-06_at_13.48.00.png)

After:

![Screen_Shot_2015-03-06_at_13.48.14](https://dev.gitlab.org/gitlab/gitlabhq/uploads/fe92adf387964efb3d460dfc61ced3b8/Screen_Shot_2015-03-06_at_13.48.14.png)

I've checked with other screen widths as well, and it looks good all the time.

See merge request !1645
parents 83e60cc2 be94e135
......@@ -49,6 +49,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')
......
.issues-sortable-list .str-truncated {
max-width: 70%;
max-width: 90%;
}
......@@ -100,6 +100,12 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request.target_project, @merge_request],
notice: 'Merge request was successfully updated.')
end
format.json do
render json: {
saved: @merge_request.valid?,
assignee_avatar_url: @merge_request.assignee.try(:avatar_url)
}
end
end
else
render "edit"
......
......@@ -3,3 +3,6 @@
= link_to [@project.namespace.becomes(Namespace), @project, merge_request] do
%span.cgray ##{merge_request.iid}
= link_to_gfm merge_request.title, [@project.namespace.becomes(Namespace), @project, merge_request], title: merge_request.title
.pull-right.assignee-icon
- if merge_request.assignee
= image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16"
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