Commit 07703c22 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve approve MR widget

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 33dce2df
......@@ -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
%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)
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