50 lines
2.9 KiB
Text
50 lines
2.9 KiB
Text
- @no_breadcrumb_border = true
|
|
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)
|
|
- can_reopen_merge_request = can?(current_user, :reopen_merge_request, @merge_request)
|
|
- state_human_name, state_icon_name = state_name_with_icon(@merge_request)
|
|
|
|
- if @merge_request.closed_without_fork?
|
|
.gl-alert.gl-alert-danger.gl-mb-5
|
|
= sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
|
|
.gl-alert-body
|
|
The source project of this merge request has been removed.
|
|
|
|
.detail-page-header.border-bottom-0.pt-0.pb-0
|
|
.detail-page-header-body
|
|
.issuable-status-box.status-box{ class: status_box_class(@merge_request) }
|
|
= sprite_icon(state_icon_name, css_class: 'd-block d-sm-none')
|
|
%span.d-none.d-sm-block
|
|
= state_human_name
|
|
|
|
.issuable-meta
|
|
#js-issuable-header-warnings
|
|
= issuable_meta(@merge_request, @project, "Merge request")
|
|
|
|
%a.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
|
|
= sprite_icon('chevron-double-lg-left')
|
|
|
|
.detail-page-header-actions.js-issuable-actions
|
|
.clearfix.issue-btn-group.dropdown
|
|
%button.btn.btn-default.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
|
|
Options
|
|
= icon('caret-down')
|
|
.dropdown-menu.dropdown-menu-right.d-lg-none.d-xl-none
|
|
%ul
|
|
- if can_update_merge_request
|
|
%li= link_to 'Edit', edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
|
|
- if can_update_merge_request
|
|
- unless @merge_request.closed?
|
|
%li
|
|
= link_to @merge_request.work_in_progress? ? _('Mark as ready') : _('Mark as draft'), toggle_draft_issuable_path(@merge_request), method: :put, class: "js-draft-toggle-button"
|
|
%li{ class: [merge_request_button_visibility(@merge_request, true), 'js-close-item'] }
|
|
= link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, title: 'Close merge request'
|
|
- if can_reopen_merge_request
|
|
%li{ class: merge_request_button_visibility(@merge_request, false) }
|
|
= link_to 'Reopen', merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request'
|
|
- 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))
|
|
|
|
- if can_update_merge_request
|
|
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-sm-none d-md-block btn gl-button btn-grouped js-issuable-edit qa-edit-button"
|
|
|
|
= render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_reopen_merge_request
|