Commit 110585c503a0d85fe61cde60c70fa333506370de
1 parent
b7072ff0
Exists in
spb-stable
and in
3 other branches
Hide mr close button for comment form if merge request was closed or inline comment
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
7 additions
and
2 deletions
Show diff stats
app/assets/stylesheets/sections/merge_requests.scss
app/views/projects/merge_requests/_show.html.haml
@@ -24,8 +24,8 @@ | @@ -24,8 +24,8 @@ | ||
24 | 24 | ||
25 | - content_for :note_actions do | 25 | - content_for :note_actions do |
26 | - if can?(current_user, :modify_merge_request, @merge_request) | 26 | - if can?(current_user, :modify_merge_request, @merge_request) |
27 | - - unless @merge_request.closed? | ||
28 | - = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-grouped btn-close", title: "Close merge request" | 27 | + - unless @merge_request.closed? || @merge_request.merged? |
28 | + = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-grouped btn-close close-mr-link", title: "Close merge request" | ||
29 | 29 | ||
30 | 30 | ||
31 | .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } | 31 | .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" } |