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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
2.5 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)
2021-02-22 17:27:13 +05:30
- are_close_and_open_buttons_hidden = merge_request_button_hidden?(@merge_request, true) && merge_request_button_hidden?(@merge_request, false)
2022-07-16 23:28:13 +05:30
- updated_mr_header_enabled = Feature.enabled?(:updated_mr_header, @project)
- cache_key = [@project, @merge_request, can_update_merge_request, can_reopen_merge_request, are_close_and_open_buttons_hidden, current_user&.preferred_language, updated_mr_header_enabled]
2017-09-10 17:25:29 +05:30
2022-01-26 12:08:38 +05:30
= cache(cache_key, expires_in: 1.day) do
2021-06-08 01:23:25 +05:30
- if @merge_request.closed_or_merged_without_fork?
2022-06-21 17:19:12 +05:30
= render Pajamas::AlertComponent.new(alert_class: 'gl-mb-5',
2022-05-07 20:08:51 +05:30
variant: :danger,
2022-07-16 23:28:13 +05:30
dismissible: false) do |c|
= c.body do
2022-05-07 20:08:51 +05:30
= _('The source project of this merge request has been removed.')
2017-09-10 17:25:29 +05:30
2022-07-16 23:28:13 +05:30
.detail-page-header.border-bottom-0.pt-0.pb-0{ class: "#{'gl-display-block gl-md-display-flex!' if updated_mr_header_enabled}" }
2021-06-08 01:23:25 +05:30
.detail-page-header-body
2022-07-16 23:28:13 +05:30
- unless updated_mr_header_enabled
= render "shared/issuable/status_box", issuable: @merge_request
.issuable-meta{ class: "#{'gl-display-flex' if updated_mr_header_enabled}" }
- if updated_mr_header_enabled
#js-issuable-header-warnings
%h2.title.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } }
= markdown_field(@merge_request, :title)
- else
#js-issuable-header-warnings
= issuable_meta(@merge_request, @project)
2017-09-10 17:25:29 +05:30
2022-07-16 23:28:13 +05:30
%div
%button.gl-button.btn.btn-default.btn-icon.float-right.gl-display-block.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ type: 'button', class: "#{'gl-md-display-none!' if moved_mr_sidebar_enabled? } #{'gl-sm-display-none!' unless moved_mr_sidebar_enabled?}" }
= sprite_icon('chevron-double-lg-left')
2017-09-10 17:25:29 +05:30
2022-07-16 23:28:13 +05:30
.detail-page-header-actions.js-issuable-actions{ class: "#{'gl-align-self-start is-merge-request' if updated_mr_header_enabled}" }
- if can_update_merge_request
= link_to _('Edit'), edit_project_merge_request_path(@project, @merge_request), class: "gl-display-none gl-md-display-block btn gl-button btn-default btn-grouped js-issuable-edit", data: { qa_selector: "edit_button" }
2018-03-17 18:26:18 +05:30
2022-07-16 23:28:13 +05:30
- if @merge_request.source_project
= render 'projects/merge_requests/code_dropdown'
2017-09-10 17:25:29 +05:30
2022-07-16 23:28:13 +05:30
- if current_user
= render 'projects/merge_requests/close_reopen_draft_report_toggle'