Commit f552153e authored by Douwe Maan's avatar Douwe Maan

Merge branch 'improve-approve-ui' into 'master'

Improve approve MR widget
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

![Screenshot_2015-06-12_15.57.39](https://dev.gitlab.org/gitlab/gitlab-ee/uploads/9a53ec89e7ccf3ad924a79c179b323b1/Screenshot_2015-06-12_15.57.39.png)

See merge request !421
parents 33dce2df d666da06
......@@ -188,11 +188,3 @@
.merge-request-form .select2-container {
width: 250px !important;
}
.approve-btn {
margin-right: 10px;
}
.approved-by-users {
padding: 5px 0;
}
......@@ -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)
......@@ -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'
......
%div
- 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"
%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)
%div
%h4
Requires #{pluralize(@merge_request.approvals_left, 'more approval')}
%p Each merge request in this project must be approved by #{pluralize(@merge_request.approvals_required, 'person')} before it can be accepted.
- 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-primary approve-btn"
\ No newline at end of file
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