BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
70212889
Commit
70212889
authored
Feb 18, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow change assignee/milestone from MergeRequest show page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b05a67f4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
11 deletions
+35
-11
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+8
-1
_issue_context.html.haml
app/views/projects/issues/_issue_context.html.haml
+1
-1
_context.html.haml
app/views/projects/merge_requests/show/_context.html.haml
+23
-0
_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+1
-9
update.js.haml
app/views/projects/merge_requests/update.js.haml
+2
-0
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
70212889
...
...
@@ -108,8 +108,15 @@ class Projects::MergeRequestsController < Projects::ApplicationController
if
@merge_request
.
update_attributes
(
params
[
:merge_request
].
merge
(
author_id_of_changes:
current_user
.
id
))
@merge_request
.
reload_code
@merge_request
.
mark_as_unchecked
@merge_request
.
reset_events_cache
redirect_to
[
@merge_request
.
target_project
,
@merge_request
],
notice:
'Merge request was successfully updated.'
respond_to
do
|
format
|
format
.
js
format
.
html
do
redirect_to
[
@merge_request
.
target_project
,
@merge_request
],
notice:
'Merge request was successfully updated.'
end
end
else
render
"edit"
end
...
...
app/views/projects/issues/_issue_context.html.haml
View file @
70212889
...
...
@@ -4,7 +4,7 @@
\ and currently assigned to
-
if
can?
(
current_user
,
:modify_issue
,
@issue
)
=
project_users_select_tag
(
'issue[assignee_id]'
,
placeholder:
'Select a
user
'
,
class:
'custom-form-control'
,
selected:
@issue
.
assignee_id
)
=
project_users_select_tag
(
'issue[assignee_id]'
,
placeholder:
'Select a
ssignee
'
,
class:
'custom-form-control'
,
selected:
@issue
.
assignee_id
)
-
elsif
issue
.
assignee
=
link_to_member
(
@project
,
@issue
.
assignee
)
...
...
app/views/projects/merge_requests/show/_context.html.haml
0 → 100644
View file @
70212889
=
form_for
[
@project
,
@merge_request
],
remote:
true
,
html:
{
class:
'edit-merge_request inline-update'
}
do
|
f
|
Created by
#{
link_to_member
(
@project
,
merge_request
.
author
)
}
-
if
merge_request
.
assignee
\ and currently assigned to
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
=
project_users_select_tag
(
'merge_request[assignee_id]'
,
placeholder:
'Select assignee'
,
class:
'custom-form-control'
,
selected:
@merge_request
.
assignee_id
)
-
elsif
merge_request
.
assignee
=
link_to_member
(
@project
,
@merge_request
.
assignee
)
.pull-right.hidden-sm.hidden-xs
-
if
merge_request
.
milestone
-
milestone
=
merge_request
.
milestone
%cite
.cgray
Attached to milestone
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
=
f
.
select
(
:milestone_id
,
milestone_options
(
@merge_request
),
{
include_blank:
"Select milestone (none):"
},
{
class:
'select2 select2-compact'
})
=
hidden_field_tag
:merge_request_context
=
f
.
submit
class:
'btn'
-
elsif
merge_request
.
milestone
=
link_to
merge_request
.
milestone
.
title
,
project_milestone_path
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
70212889
...
...
@@ -4,15 +4,7 @@
.context
%cite
.cgray
Created by
#{
link_to_member
(
@project
,
@merge_request
.
author
)
}
.
-
if
@merge_request
.
assignee
Currently assigned to
#{
link_to_member
(
@project
,
@merge_request
.
assignee
)
}
.
-
if
@merge_request
.
milestone
.pull-right
-
milestone
=
@merge_request
.
milestone
%cite
.cgray
Attached to milestone
%strong
=
link_to_gfm
truncate
(
milestone
.
title
,
length:
20
),
project_milestone_path
(
milestone
.
project
,
milestone
)
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
-
if
@merge_request
.
description
.
present?
.description
...
...
app/views/projects/merge_requests/update.js.haml
0 → 100644
View file @
70212889
-
if
params
[
:merge_request_context
]
$('.issue-box .context').effect('highlight');
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