Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
be94e135
Commit
be94e135
authored
Mar 06, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add assignee icon to milestone merge requests.
parent
dc558eb2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
app/assets/javascripts/milestone.js.coffee
app/assets/javascripts/milestone.js.coffee
+7
-0
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+6
-0
app/views/projects/milestones/_merge_request.html.haml
app/views/projects/milestones/_merge_request.html.haml
+3
-0
No files found.
app/assets/javascripts/milestone.js.coffee
View file @
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'
)
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
be94e135
...
...
@@ -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"
...
...
app/views/projects/milestones/_merge_request.html.haml
View file @
be94e135
...
...
@@ -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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment