2017-06-07 06:18:35 -04:00
|
|
|
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)
|
|
|
|
|
2016-07-26 07:57:43 -04:00
|
|
|
- if @merge_request.closed_without_fork?
|
|
|
|
.alert.alert-danger
|
2016-08-10 09:36:30 -04:00
|
|
|
%p The source project of this merge request has been removed.
|
2016-07-26 07:57:43 -04:00
|
|
|
|
2016-04-01 07:12:13 -04:00
|
|
|
.clearfix.detail-page-header
|
|
|
|
.issuable-header
|
2016-04-12 11:27:16 -04:00
|
|
|
.issuable-status-box.status-box{ class: status_box_class(@merge_request) }
|
2016-04-01 07:12:13 -04:00
|
|
|
= icon(@merge_request.state_icon_name, class: "hidden-sm hidden-md hidden-lg")
|
2016-03-17 17:34:42 -04:00
|
|
|
%span.hidden-xs
|
2016-04-01 07:12:13 -04:00
|
|
|
= @merge_request.state_human_name
|
|
|
|
|
|
|
|
%a.btn.btn-default.pull-right.visible-xs-block.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
|
|
|
|
= icon('angle-double-left')
|
2016-04-01 07:20:54 -04:00
|
|
|
|
2016-04-01 07:12:13 -04:00
|
|
|
.issuable-meta
|
2017-05-18 14:44:13 -04:00
|
|
|
= issuable_meta(@merge_request, @project, "Merge request")
|
2014-12-25 07:32:49 -05:00
|
|
|
|
2017-07-14 13:16:56 -04:00
|
|
|
.issuable-actions.js-issuable-actions
|
2017-06-07 06:18:35 -04:00
|
|
|
.clearfix.issue-btn-group.dropdown
|
|
|
|
%button.btn.btn-default.pull-left.hidden-md.hidden-lg{ type: "button", data: { toggle: "dropdown" } }
|
|
|
|
Options
|
|
|
|
= icon('caret-down')
|
|
|
|
.dropdown-menu.dropdown-menu-align-right.hidden-lg
|
|
|
|
%ul
|
2017-06-07 12:42:09 -04:00
|
|
|
- if can_update_merge_request
|
|
|
|
%li= link_to 'Edit', edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'issuable-edit'
|
2017-07-03 12:00:59 -04:00
|
|
|
- unless current_user == @merge_request.author
|
|
|
|
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request))
|
2017-06-07 06:18:35 -04:00
|
|
|
- if can_update_merge_request
|
2016-07-11 03:51:18 -04:00
|
|
|
%li{ class: merge_request_button_visibility(@merge_request, true) }
|
2016-04-14 09:04:06 -04:00
|
|
|
= link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, title: 'Close merge request'
|
2016-07-11 03:51:18 -04:00
|
|
|
%li{ class: merge_request_button_visibility(@merge_request, false) }
|
2016-04-14 09:04:06 -04:00
|
|
|
= link_to 'Reopen', merge_request_path(@merge_request, merge_request: {state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request'
|
2017-06-07 06:18:35 -04:00
|
|
|
|
|
|
|
- if can_update_merge_request
|
|
|
|
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "hidden-xs hidden-sm btn btn-grouped issuable-edit"
|
|
|
|
|
|
|
|
= render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request
|