2018-03-27 19:54:05 +05:30
|
|
|
- @gfm_form = true
|
2020-11-24 15:15:51 +05:30
|
|
|
- @content_class = "merge-request-container#{' limit-container-width' unless fluid_layout}"
|
2021-04-29 21:17:54 +05:30
|
|
|
- add_to_breadcrumbs _("Merge requests"), project_merge_requests_path(@project)
|
2018-03-17 18:26:18 +05:30
|
|
|
- breadcrumb_title @merge_request.to_reference
|
2021-04-29 21:17:54 +05:30
|
|
|
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", _("Merge requests")
|
2021-01-03 14:25:43 +05:30
|
|
|
- page_description @merge_request.description_html
|
2017-09-10 17:25:29 +05:30
|
|
|
- page_card_attributes @merge_request.card_attributes
|
2021-06-08 01:23:25 +05:30
|
|
|
- suggest_changes_help_path = help_page_path('user/project/merge_requests/reviews/suggestions.md')
|
2020-07-28 23:09:34 +05:30
|
|
|
- mr_action = j(params[:tab].presence || 'show')
|
2021-01-03 14:25:43 +05:30
|
|
|
- add_page_specific_style 'page_bundles/merge_requests'
|
|
|
|
- add_page_specific_style 'page_bundles/pipelines'
|
|
|
|
- add_page_specific_style 'page_bundles/reports'
|
2021-01-29 00:20:46 +05:30
|
|
|
- add_page_specific_style 'page_bundles/ci_status'
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
- add_page_startup_api_call @endpoint_metadata_url
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
.merge-request{ data: { mr_action: mr_action, url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project), lock_version: @merge_request.lock_version } }
|
2017-09-10 17:25:29 +05:30
|
|
|
= render "projects/merge_requests/mr_title"
|
|
|
|
|
|
|
|
.merge-request-details.issuable-details{ data: { id: @merge_request.project.id } }
|
|
|
|
= render "projects/merge_requests/mr_box"
|
|
|
|
.merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') }
|
|
|
|
.merge-request-tabs-container
|
2019-09-04 21:01:54 +05:30
|
|
|
%ul.merge-request-tabs.nav-tabs.nav.nav-links
|
2020-01-01 13:55:28 +05:30
|
|
|
= render "projects/merge_requests/tabs/tab", class: "notes-tab", qa_selector: "notes_tab" do
|
2019-09-04 21:01:54 +05:30
|
|
|
= tab_link_for @merge_request, :show, force_link: @commit.present? do
|
2020-10-24 23:57:45 +05:30
|
|
|
= _("Overview")
|
2022-01-26 12:08:38 +05:30
|
|
|
= gl_badge_tag @merge_request.related_notes.user.count, { size: :sm }
|
2019-09-04 21:01:54 +05:30
|
|
|
- if @merge_request.source_project
|
2021-04-29 21:17:54 +05:30
|
|
|
= render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab", qa_selector: "commits_tab" do
|
2019-09-04 21:01:54 +05:30
|
|
|
= tab_link_for @merge_request, :commits do
|
|
|
|
= _("Commits")
|
2022-01-26 12:08:38 +05:30
|
|
|
= gl_badge_tag @commits_count, { size: :sm }
|
2021-11-11 11:23:49 +05:30
|
|
|
- if @number_of_pipelines.nonzero?
|
2020-01-01 13:55:28 +05:30
|
|
|
= render "projects/merge_requests/tabs/tab", name: "pipelines", class: "pipelines-tab" do
|
2019-09-04 21:01:54 +05:30
|
|
|
= tab_link_for @merge_request, :pipelines do
|
|
|
|
= _("Pipelines")
|
2022-01-26 12:08:38 +05:30
|
|
|
= gl_badge_tag @number_of_pipelines, { size: :sm }, { class: 'js-pipelines-mr-count' }
|
2021-04-17 20:07:23 +05:30
|
|
|
= render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab", id: "diffs-tab", qa_selector: "diffs_tab" do
|
2019-09-04 21:01:54 +05:30
|
|
|
= tab_link_for @merge_request, :diffs do
|
|
|
|
= _("Changes")
|
2022-01-26 12:08:38 +05:30
|
|
|
= gl_badge_tag @diffs_count, { size: :sm }
|
2019-09-04 21:01:54 +05:30
|
|
|
.d-flex.flex-wrap.align-items-center.justify-content-lg-end
|
2018-12-13 13:39:08 +05:30
|
|
|
#js-vue-discussion-counter
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
.tab-content#diff-notes-app
|
2019-03-02 22:35:43 +05:30
|
|
|
#js-diff-file-finder
|
2020-04-22 19:07:51 +05:30
|
|
|
#js-code-navigation
|
2020-01-01 13:55:28 +05:30
|
|
|
= render "projects/merge_requests/tabs/pane", id: "notes", class: "notes voting_notes" do
|
2017-09-10 17:25:29 +05:30
|
|
|
.row
|
|
|
|
%section.col-md-12
|
2018-03-27 19:54:05 +05:30
|
|
|
.issuable-discussion.js-vue-notes-event
|
2020-10-24 23:57:45 +05:30
|
|
|
- if @merge_request.description.present?
|
|
|
|
.detail-page-description
|
|
|
|
= render "projects/merge_requests/description"
|
|
|
|
= render "projects/merge_requests/widget"
|
|
|
|
= render "projects/merge_requests/awards_block"
|
2021-02-22 17:27:13 +05:30
|
|
|
- if mr_action === "show"
|
2021-03-11 19:13:27 +05:30
|
|
|
- if Feature.enabled?(:paginated_notes, @project)
|
|
|
|
- add_page_startup_api_call notes_url
|
|
|
|
- else
|
|
|
|
- add_page_startup_api_call discussions_path(@merge_request)
|
2021-09-04 01:27:46 +05:30
|
|
|
- add_page_startup_api_call widget_project_json_merge_request_path(@project, @merge_request, format: :json)
|
2021-03-08 18:12:59 +05:30
|
|
|
- add_page_startup_api_call cached_widget_project_json_merge_request_path(@project, @merge_request, format: :json)
|
2021-03-11 19:13:27 +05:30
|
|
|
#js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request, Feature.enabled?(:paginated_notes, @project)).to_json,
|
2021-04-29 21:17:54 +05:30
|
|
|
endpoint_metadata: @endpoint_metadata_url,
|
2019-12-04 20:38:33 +05:30
|
|
|
noteable_data: serialize_issuable(@merge_request, serializer: 'noteable'),
|
2018-11-08 19:23:39 +05:30
|
|
|
noteable_type: 'MergeRequest',
|
|
|
|
target_type: 'merge_request',
|
2019-02-15 15:39:39 +05:30
|
|
|
help_page_path: suggest_changes_help_path,
|
2020-10-24 23:57:45 +05:30
|
|
|
current_user_data: @current_user_data,
|
|
|
|
is_locked: @merge_request.discussion_locked.to_s } }
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
= render "projects/merge_requests/tabs/pane", name: "commits", id: "commits", class: "commits" do
|
2017-09-10 17:25:29 +05:30
|
|
|
-# This tab is always loaded via AJAX
|
2020-01-01 13:55:28 +05:30
|
|
|
= render "projects/merge_requests/tabs/pane", name: "pipelines", id: "pipelines", class: "pipelines" do
|
2021-11-11 11:23:49 +05:30
|
|
|
- if @number_of_pipelines.nonzero?
|
2017-09-10 17:25:29 +05:30
|
|
|
= render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request)
|
2022-05-07 20:08:51 +05:30
|
|
|
- params = request.query_parameters.merge(diff_head: true)
|
2021-04-29 21:17:54 +05:30
|
|
|
= render "projects/merge_requests/tabs/pane", name: "diffs", id: "js-diffs-app", class: "diffs", data: diffs_tab_pane_data(@project, @merge_request, params)
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
.mr-loading-status
|
2020-03-13 15:44:24 +05:30
|
|
|
.loading.hide
|
2022-05-07 20:08:51 +05:30
|
|
|
= gl_loading_icon(size: 'lg')
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch
|
2019-02-15 15:39:39 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
- if @merge_request.can_be_reverted?(current_user)
|
2021-03-11 19:13:27 +05:30
|
|
|
= render "projects/commit/change", type: 'revert', commit: @merge_request.merge_commit
|
2017-09-10 17:25:29 +05:30
|
|
|
- if @merge_request.can_be_cherry_picked?
|
2021-03-11 19:13:27 +05:30
|
|
|
= render "projects/commit/change", type: 'cherry-pick', commit: @merge_request.merge_commit
|
2020-06-23 00:09:42 +05:30
|
|
|
|
|
|
|
#js-review-bar
|
2021-04-29 21:17:54 +05:30
|
|
|
|
2022-05-07 20:08:51 +05:30
|
|
|
- if Feature.enabled?(:mr_attention_requests, default_enabled: :yaml)
|
|
|
|
#js-need-attention-sidebar-onboarding
|
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
= render 'projects/invite_members_modal', project: @project
|
2021-11-18 22:05:49 +05:30
|
|
|
= render 'shared/web_ide_path'
|