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.

37 lines
2.4 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-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-23 23:45:48 +05:30
- hide_gutter_toggle = local_assigns.fetch(:hide_gutter_toggle, false)
2022-08-13 15:12:31 +05:30
- 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, fluid_layout]
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-07-23 23:45:48 +05:30
= render Pajamas::AlertComponent.new(alert_options: { 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
2023-06-20 00:43:36 +05:30
.detail-page-header.border-bottom-0.gl-display-block.gl-pt-5{ class: "gl-md-display-flex! #{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" }
2021-06-08 01:23:25 +05:30
.detail-page-header-body
2022-07-23 23:45:48 +05:30
.issuable-meta.gl-display-flex
2023-03-17 16:20:25 +05:30
#js-issuable-header-warnings{ data: { hidden: @merge_request.hidden?.to_s } }
2022-07-23 23:45:48 +05:30
%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)
2017-09-10 17:25:29 +05:30
2022-07-23 23:45:48 +05:30
- 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}" })
2017-09-10 17:25:29 +05:30
2023-01-13 00:05:48 +05:30
.detail-page-header-actions.gl-align-self-start.is-merge-request.js-issuable-actions.gl-display-flex
2022-07-16 23:28:13 +05:30
- if can_update_merge_request
2023-05-27 22:25:52 +05:30
= render Pajamas::ButtonComponent.new(href: edit_project_merge_request_path(@project, @merge_request), button_options: {class: "gl-display-none gl-md-display-block js-issuable-edit", data: { qa_selector: "edit_button" }}) do
= _('Edit')
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'