MR: Accept section polished. Show permission info
This commit is contained in:
parent
b729004a50
commit
89043d6b89
2 changed files with 37 additions and 12 deletions
|
@ -969,3 +969,23 @@ li.note {
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.automerge_widget {
|
||||||
|
|
||||||
|
&.can_be_merged {
|
||||||
|
background: #DFF0D8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accept_merge_request {
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 1px 1px #222;
|
||||||
|
background: #5bb75b;;
|
||||||
|
&:hover {
|
||||||
|
background-color: #51a351;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.how_to_merge_link {
|
||||||
|
@extend .primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -53,30 +53,35 @@
|
||||||
Closed by #{@merge_request.closed_event.author_name}
|
Closed by #{@merge_request.closed_event.author_name}
|
||||||
%small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
|
%small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
|
||||||
|
|
||||||
|
- unless can?(current_user, :accept_mr, @project)
|
||||||
|
.alert-message
|
||||||
|
%strong Only masters can accept MR
|
||||||
|
|
||||||
|
|
||||||
- if @merge_request.open? && @commits.any? && can?(current_user, :accept_mr, @project)
|
- if @merge_request.open? && @commits.any? && can?(current_user, :accept_mr, @project)
|
||||||
.automerge_widget.can_be_merged{:style => "display:none"}
|
.automerge_widget.can_be_merged{:style => "display:none"}
|
||||||
.ui-box.padded
|
.alert.alert-success
|
||||||
%p
|
%span
|
||||||
You can accept this request automatically. If you still want to do it manually - #{link_to "click here", "#", :class => "how_to_merge_link vlink", :title => "How To Merge"} for instructions
|
|
||||||
= link_to "Accept Merge Request", automerge_project_merge_request_path(@project, @merge_request), :class => "btn small info accept_merge_request", :remote => true
|
= link_to "Accept Merge Request", automerge_project_merge_request_path(@project, @merge_request), :class => "btn small info accept_merge_request", :remote => true
|
||||||
|
|
||||||
|
You can accept this request automatically. If you still want to do it manually - #{link_to "click here", "#", :class => "how_to_merge_link vlink", :title => "How To Merge"} for instructions
|
||||||
|
|
||||||
.automerge_widget.cannot_be_merged{:style => "display:none"}
|
.automerge_widget.cannot_be_merged{:style => "display:none"}
|
||||||
.alert-message
|
.alert.alert-info
|
||||||
%p
|
%span
|
||||||
%strong This request cant be merged with GitLab. You should do it manually
|
|
||||||
= link_to "Show how to merge", "#", :class => "how_to_merge_link btn small padded", :title => "How To Merge"
|
= link_to "Show how to merge", "#", :class => "how_to_merge_link btn small padded", :title => "How To Merge"
|
||||||
|
|
||||||
|
%strong This request cant be merged with GitLab. You should do it manually
|
||||||
|
|
||||||
.automerge_widget.unchecked
|
.automerge_widget.unchecked
|
||||||
.alert-message
|
.alert-message
|
||||||
%p
|
%strong
|
||||||
%strong Checking for ability to automatically merge…
|
%i.icon-refresh
|
||||||
|
Checking for ability to automatically merge…
|
||||||
|
|
||||||
.automerge_widget.already_cannot_be_merged{:style => "display:none"}
|
.automerge_widget.already_cannot_be_merged{:style => "display:none"}
|
||||||
.alert-message
|
.alert.alert-info
|
||||||
%p
|
%strong This merge request already can not be merged. Try to reload page.
|
||||||
%strong This merge request already can not be merged
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue