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

51 lines
2.9 KiB
Text
Raw Normal View History

2020-01-01 13:55:28 +05:30
- @no_breadcrumb_border = true
2017-09-10 17:25:29 +05:30
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)
2019-07-07 11:18:12 +05:30
- can_reopen_merge_request = can?(current_user, :reopen_merge_request, @merge_request)
2020-01-01 13:55:28 +05:30
- state_human_name, state_icon_name = state_name_with_icon(@merge_request)
2017-09-10 17:25:29 +05:30
- if @merge_request.closed_without_fork?
2020-11-24 15:15:51 +05:30
.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.
2017-09-10 17:25:29 +05:30
2020-10-24 23:57:45 +05:30
.detail-page-header.border-bottom-0.pt-0.pb-0
2018-03-17 18:26:18 +05:30
.detail-page-header-body
2017-09-10 17:25:29 +05:30
.issuable-status-box.status-box{ class: status_box_class(@merge_request) }
2020-10-24 23:57:45 +05:30
= sprite_icon(state_icon_name, css_class: 'd-block d-sm-none')
2018-11-08 19:23:39 +05:30
%span.d-none.d-sm-block
2020-01-01 13:55:28 +05:30
= state_human_name
2017-09-10 17:25:29 +05:30
.issuable-meta
2020-10-24 23:57:45 +05:30
#js-issuable-header-warnings
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: "#" }
2020-07-28 23:09:34 +05:30
= sprite_icon('chevron-double-lg-left')
2018-03-17 18:26:18 +05:30
.detail-page-header-actions.js-issuable-actions
2017-09-10 17:25:29 +05:30
.clearfix.issue-btn-group.dropdown
2021-01-29 00:20:46 +05:30
%button.btn.btn-default.float-left.d-md-none{ type: "button", data: { toggle: "dropdown" } }
2017-09-10 17:25:29 +05:30
Options
= icon('caret-down')
2021-01-29 00:20:46 +05:30
.dropdown-menu.dropdown-menu-right
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
- if can_update_merge_request
2021-01-03 14:25:43 +05:30
- 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"
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-07-07 11:18:12 +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'
2021-01-29 00:20:46 +05:30
- unless @merge_request.merged? || current_user == @merge_request.author
2021-01-03 14:25:43 +05:30
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request))
2017-09-10 17:25:29 +05:30
- if can_update_merge_request
2021-01-29 00:20:46 +05:30
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-md-block btn gl-button btn-grouped js-issuable-edit qa-edit-button"
2017-09-10 17:25:29 +05:30
2019-07-07 11:18:12 +05:30
= render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_reopen_merge_request