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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
07703c22
Commit
07703c22
authored
Jun 12, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve approve MR widget
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
33dce2df
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
22 deletions
+10
-22
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+0
-8
app/views/projects/merge_requests/widget/_open.html.haml
app/views/projects/merge_requests/widget/_open.html.haml
+6
-0
app/views/projects/merge_requests/widget/open/_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+0
-6
app/views/projects/merge_requests/widget/open/_approve.html.haml
...ws/projects/merge_requests/widget/open/_approve.html.haml
+4
-8
doc/workflow/approval_for_merge_requests/mr.png
doc/workflow/approval_for_merge_requests/mr.png
+0
-0
No files found.
app/assets/stylesheets/pages/merge_requests.scss
View file @
07703c22
...
...
@@ -188,11 +188,3 @@
.merge-request-form
.select2-container
{
width
:
250px
!
important
;
}
.approve-btn
{
margin-right
:
10px
;
}
.approved-by-users
{
padding
:
5px
0
;
}
app/views/projects/merge_requests/widget/_open.html.haml
View file @
07703c22
...
...
@@ -29,3 +29,9 @@
Accepting this merge request will close
#{
@closes_issues
.
size
==
1
?
'issue'
:
'issues'
}
=
succeed
'.'
do
!=
gfm
(
issues_sentence
(
@closes_issues
))
-
if
@merge_request
.
approvals
.
any?
.mr-widget-footer.approved-by-users
Approved by
-
@merge_request
.
approved_by_users
.
each
do
|
user
|
=
link_to_member
(
@project
,
user
,
name:
false
,
size:
24
)
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
07703c22
...
...
@@ -24,12 +24,6 @@
%strong
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
-
if
@merge_request
.
approvals
.
any?
.approved-by-users
Approved by
-
@merge_request
.
approved_by_users
.
each
do
|
user
|
=
link_to_member
(
@project
,
user
,
name:
false
,
size:
24
)
:coffeescript
disableButtonIfEmptyField '#commit_message', '.accept_merge_request'
...
...
app/views/projects/merge_requests/widget/open/_approve.html.haml
View file @
07703c22
%div
%h4
Requires
#{
pluralize
(
@merge_request
.
approvals_left
,
'approval'
)
}
%p
Each merge request in this project must be approved by
#{
pluralize
(
@merge_request
.
approvals_required
,
'user'
)
}
before it can be merged
-
unless
@merge_request
.
approved_by?
(
current_user
)
.append-bottom-10
=
form_for
[
:approve
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@merge_request
],
method: :post
do
|
f
|
=
f
.
submit
"Approve Merge Request"
,
class:
"btn btn-
reopen
approve-btn"
=
f
.
submit
"Approve Merge Request"
,
class:
"btn btn-
primary
approve-btn"
%p
This merge request must be approved by
#{
pluralize
(
@merge_request
.
approvals_required
,
'user'
)
}
before it can be merged
-
if
@merge_request
.
approvals
.
any?
.approved-by-users
Approved by
-
@merge_request
.
approved_by_users
.
each
do
|
user
|
=
link_to_member
(
@project
,
user
,
name:
false
,
size:
24
)
doc/workflow/approval_for_merge_requests/mr.png
View replaced file @
33dce2df
View file @
07703c22
160 KB
|
W:
|
H:
165 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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