36 lines
2.3 KiB
Text
36 lines
2.3 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)
|
|
- are_close_and_open_buttons_hidden = merge_request_button_hidden?(@merge_request, true) && merge_request_button_hidden?(@merge_request, false)
|
|
- hide_gutter_toggle = local_assigns.fetch(:hide_gutter_toggle, false)
|
|
- cache_key = [@project, @merge_request, can_update_merge_request, can_reopen_merge_request, are_close_and_open_buttons_hidden, current_user&.preferred_language, "1.1-updated_header", moved_mr_sidebar_enabled?, hide_gutter_toggle]
|
|
|
|
= cache(cache_key, expires_in: 1.day) do
|
|
- if @merge_request.closed_or_merged_without_fork?
|
|
= render Pajamas::AlertComponent.new(alert_options: { class: 'gl-mb-5' },
|
|
variant: :danger,
|
|
dismissible: false) do |c|
|
|
= c.body do
|
|
= _('The source project of this merge request has been removed.')
|
|
|
|
.detail-page-header.border-bottom-0.pt-0.pb-0.gl-display-block{ class: "gl-md-display-flex! #{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" }
|
|
.detail-page-header-body
|
|
.issuable-meta.gl-display-flex
|
|
#js-issuable-header-warnings
|
|
%h1.title.page-title.gl-font-size-h-display.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } }
|
|
= markdown_field(@merge_request, :title)
|
|
|
|
- unless hide_gutter_toggle
|
|
%div
|
|
- display_class = moved_mr_sidebar_enabled? ? 'gl-md-display-none!' : 'gl-sm-display-none!'
|
|
= render Pajamas::ButtonComponent.new(icon: "chevron-double-lg-left", button_options: { class: "btn-icon float-right gl-display-block gutter-toggle issuable-gutter-toggle js-sidebar-toggle #{display_class}" })
|
|
|
|
.detail-page-header-actions.gl-align-self-start.is-merge-request.js-issuable-actions
|
|
- 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" }
|
|
|
|
- if @merge_request.source_project
|
|
= render 'projects/merge_requests/code_dropdown'
|
|
|
|
- if current_user
|
|
= render 'projects/merge_requests/close_reopen_draft_report_toggle'
|