From aaf184bfa643d748cce42a4cf524642c6e77dc6e Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 12 Jan 2016 14:38:37 -0500 Subject: reverting _mr_title.html.haml --- .../merge_requests/show/_mr_title.html.haml | 26 +++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml index 7996d35c462..fc6fb2a0d42 100644 --- a/app/views/projects/merge_requests/show/_mr_title.html.haml +++ b/app/views/projects/merge_requests/show/_mr_title.html.haml @@ -1,12 +1,6 @@ .detail-page-header - - if @merge_request.merged? - .status-box{ class: "status-box-merged" } - Merged - - else - .status-box{ class: "status-box-closed #{merge_request_button_visibility(@merge_request, false)}"} - Closed - .status-box{ class: "status-box-open #{merge_request_button_visibility(@merge_request, true)}"} - Open + .status-box{ class: status_box_class(@merge_request) } + = @merge_request.state_human_name %span.identifier Merge Request ##{@merge_request.iid} %span.creator @@ -21,11 +15,11 @@ = time_ago_with_tooltip(@merge_request.updated_at, placement: 'bottom') .issue-btn-group.pull-right - - if can?(current_user, :update_merge_request, @merge_request) && !@merge_request.merged? - - = link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }, format: 'json'), data: {no_turbolink: true}, method: :put, class: "btn btn-nr btn-grouped btn-reopen reopen-mr-link #{merge_request_button_visibility(@merge_request, false)}", title: 'Reopen merge request' - = link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }, format: 'json'), data: {no_turbolink: true}, method: :put, class: "btn btn-nr btn-grouped btn-close #{merge_request_button_visibility(@merge_request, true)}", title: 'Close merge request' - - = link_to edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "btn btn-nr btn-grouped issuable-edit #{merge_request_button_visibility(@merge_request, true)}", id: 'edit_merge_request' do - %i.fa.fa-pencil-square-o - Edit \ No newline at end of file + - if can?(current_user, :update_merge_request, @merge_request) + - if @merge_request.open? + = link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, class: 'btn btn-nr btn-grouped btn-close', title: 'Close merge request' + = link_to edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-nr btn-grouped issuable-edit', id: 'edit_merge_request' do + %i.fa.fa-pencil-square-o + Edit + - if @merge_request.closed? + = link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: 'btn btn-nr btn-grouped btn-reopen reopen-mr-link', title: 'Reopen merge request' -- cgit v1.2.1