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

105 lines
6 KiB
Text
Raw Normal View History

2018-03-27 19:54:05 +05:30
- @gfm_form = true
2017-09-10 17:25:29 +05:30
- @content_class = "limit-container-width" unless fluid_layout
2018-03-17 18:26:18 +05:30
- add_to_breadcrumbs "Merge Requests", project_merge_requests_path(@project)
- breadcrumb_title @merge_request.to_reference
2017-09-10 17:25:29 +05:30
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
- page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes
2019-02-15 15:39:39 +05:30
- suggest_changes_help_path = help_page_path('user/discussions/index.md', anchor: 'suggest-changes')
2019-12-04 20:38:33 +05:30
- number_of_pipelines = @pipelines.size
2017-09-10 17:25:29 +05:30
2019-03-02 22:35:43 +05:30
.merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), 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"
2020-01-01 13:55:28 +05:30
- unless mr_tabs_position_enabled?
= render "projects/merge_requests/widget"
= render "projects/merge_requests/awards_block"
2017-09-10 17:25:29 +05:30
.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-01-01 13:55:28 +05:30
- if mr_tabs_position_enabled?
= _("Overview")
- else
= _("Discussion")
2019-09-04 21:01:54 +05:30
%span.badge.badge-pill= @merge_request.related_notes.user.count
- if @merge_request.source_project
2020-01-01 13:55:28 +05:30
= render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab" do
2019-09-04 21:01:54 +05:30
= tab_link_for @merge_request, :commits do
= _("Commits")
%span.badge.badge-pill= @commits_count
2019-12-04 20:38:33 +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")
2019-12-04 20:38:33 +05:30
%span.badge.badge-pill.js-pipelines-mr-count= number_of_pipelines
2020-01-01 13:55:28 +05:30
= render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab qa-diffs-tab", id: "diffs-tab" do
2019-09-04 21:01:54 +05:30
= tab_link_for @merge_request, :diffs do
= _("Changes")
%span.badge.badge-pill= @merge_request.diff_size
2020-01-01 13:55:28 +05:30
- if mr_tabs_position_enabled? && show_tabs_feature_highlight?
.js-tabs-feature-highlight{ data: { dismiss_endpoint: user_callouts_path, feature_id: UserCalloutsHelper::TABS_POSITION_HIGHLIGHT } }
2019-09-04 21:01:54 +05:30
.d-flex.flex-wrap.align-items-center.justify-content-lg-end
2020-01-01 13:55:28 +05:30
- unless mr_tabs_position_enabled?
= render "projects/merge_requests/discussion_filter"
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
- if native_code_navigation_enabled?(@project)
#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
%script.js-notes-data{ type: "application/json" }= initial_notes_data(true).to_json.html_safe
.issuable-discussion.js-vue-notes-event
2020-01-01 13:55:28 +05:30
- if mr_tabs_position_enabled?
- if @merge_request.description.present?
.detail-page-description
= render "projects/merge_requests/description"
= render "projects/merge_requests/widget"
= render "projects/merge_requests/awards_block"
2018-12-05 23:21:45 +05:30
#js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request).to_json,
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,
2019-12-04 20:38:33 +05:30
current_user_data: @current_user_data} }
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
2019-12-04 20:38:33 +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)
2020-01-01 13:55:28 +05:30
= render "projects/merge_requests/tabs/pane", name: "diffs", id: "js-diffs-app", class: "diffs", data: { "is-locked": @merge_request.discussion_locked?,
2018-11-08 19:23:39 +05:30
endpoint: diffs_project_merge_request_path(@project, @merge_request, 'json', request.query_parameters),
2020-01-01 13:55:28 +05:30
endpoint_metadata: diffs_metadata_project_json_merge_request_path(@project, @merge_request, 'json', request.query_parameters),
endpoint_batch: diffs_batch_project_json_merge_request_path(@project, @merge_request, 'json', request.query_parameters),
2020-04-08 14:13:33 +05:30
endpoint_coverage: @coverage_path,
2019-02-15 15:39:39 +05:30
help_page_path: suggest_changes_help_path,
2019-12-04 20:38:33 +05:30
current_user_data: @current_user_data,
2019-02-15 15:39:39 +05:30
project_path: project_path(@merge_request.project),
2019-07-07 11:18:12 +05:30
changes_empty_state_illustration: image_path('illustrations/merge_request_changes_empty.svg'),
2019-09-04 21:01:54 +05:30
is_fluid_layout: fluid_layout.to_s,
dismiss_endpoint: user_callouts_path,
2019-12-04 20:38:33 +05:30
show_suggest_popover: show_suggest_popover?.to_s,
2020-01-01 13:55:28 +05:30
show_whitespace_default: @show_whitespace_default.to_s }
2017-09-10 17:25:29 +05:30
.mr-loading-status
2020-03-13 15:44:24 +05:30
.loading.hide
.spinner.spinner-md
2017-09-10 17:25:29 +05:30
2019-02-15 15:39:39 +05:30
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees
2017-09-10 17:25:29 +05:30
- if @merge_request.can_be_reverted?(current_user)
= render "projects/commit/change", type: 'revert', commit: @merge_request.merge_commit, title: @merge_request.title
- if @merge_request.can_be_cherry_picked?
= render "projects/commit/change", type: 'cherry-pick', commit: @merge_request.merge_commit, title: @merge_request.title
2020-06-23 00:09:42 +05:30
#js-review-bar