debian-mirror-gitlab/app/views/projects/merge_requests/_mr_title.html.haml

45 lines
2.5 KiB
Text
Raw Normal View History

2017-09-10 17:25:29 +05:30
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)
2019-05-18 00:54:41 +05:30
- can_reopen_merge_request = can?(current_user, :reopen_merge_request, @merge_request)
2017-09-10 17:25:29 +05:30
- if @merge_request.closed_without_fork?
.alert.alert-danger
2019-05-18 00:54:41 +05:30
The source project of this merge request has been removed.
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.detail-page-header
.detail-page-header-body
2017-09-10 17:25:29 +05:30
.issuable-status-box.status-box{ class: status_box_class(@merge_request) }
2018-11-08 19:23:39 +05:30
= sprite_icon(@merge_request.state_icon_name, size: 16, css_class: 'd-block d-sm-none')
%span.d-none.d-sm-block
2017-09-10 17:25:29 +05:30
= @merge_request.state_human_name
.issuable-meta
2018-03-17 18:26:18 +05:30
- if @merge_request.discussion_locked?
.issuable-warning-icon.inline= sprite_icon('lock', size: 16, css_class: 'icon')
2017-09-10 17:25:29 +05:30
= issuable_meta(@merge_request, @project, "Merge request")
2018-11-08 19:23:39 +05:30
%a.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
2018-03-17 18:26:18 +05:30
= icon('angle-double-left')
.detail-page-header-actions.js-issuable-actions
2017-09-10 17:25:29 +05:30
.clearfix.issue-btn-group.dropdown
2018-11-08 19:23:39 +05:30
%button.btn.btn-default.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
2017-09-10 17:25:29 +05:30
Options
= icon('caret-down')
2018-11-08 19:23:39 +05:30
.dropdown-menu.dropdown-menu-right.d-lg-none.d-xl-none
2017-09-10 17:25:29 +05:30
%ul
- if can_update_merge_request
2018-03-17 18:26:18 +05:30
%li= link_to 'Edit', edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
2017-09-10 17:25:29 +05:30
- 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
2018-03-17 18:26:18 +05:30
%li{ class: [merge_request_button_visibility(@merge_request, true), 'js-close-item'] }
2017-09-10 17:25:29 +05:30
= link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, title: 'Close merge request'
2019-05-18 00:54:41 +05:30
- if can_reopen_merge_request
2017-09-10 17:25:29 +05:30
%li{ class: merge_request_button_visibility(@merge_request, false) }
2018-03-17 18:26:18 +05:30
= link_to 'Reopen', merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request'
2017-09-10 17:25:29 +05:30
- if can_update_merge_request
2019-02-15 15:39:39 +05:30
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-sm-none d-md-block btn btn-grouped js-issuable-edit qa-edit-button"
2017-09-10 17:25:29 +05:30
2019-05-18 00:54:41 +05:30
= render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_reopen_merge_request