2018-02-27 19:10:43 -05:00
|
|
|
- @gfm_form = true
|
2017-06-13 18:12:31 -04:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2017-08-17 05:42:04 -04:00
|
|
|
- add_to_breadcrumbs "Merge Requests", project_merge_requests_path(@project)
|
|
|
|
- breadcrumb_title @merge_request.to_reference
|
2017-06-13 18:12:31 -04:00
|
|
|
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
|
|
|
|
- page_description @merge_request.description
|
2018-04-16 11:09:19 -04:00
|
|
|
- page_card_attributes @merge_request.card_attributes
|
2018-12-17 16:58:00 -05:00
|
|
|
- suggest_changes_help_path = help_page_path('user/discussions/index.md', anchor: 'suggest-changes')
|
2018-02-27 19:10:43 -05:00
|
|
|
|
2019-01-24 18:31:14 -05:00
|
|
|
.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-06-13 18:12:31 -04:00
|
|
|
= render "projects/merge_requests/mr_title"
|
|
|
|
|
|
|
|
.merge-request-details.issuable-details{ data: { id: @merge_request.project.id } }
|
|
|
|
= render "projects/merge_requests/mr_box"
|
|
|
|
|
|
|
|
- if @merge_request.source_branch_exists?
|
|
|
|
= render "projects/merge_requests/how_to_merge"
|
|
|
|
|
2017-07-27 04:30:14 -04:00
|
|
|
-# haml-lint:disable InlineJavaScript
|
2017-06-13 18:12:31 -04:00
|
|
|
:javascript
|
2017-08-03 16:31:53 -04:00
|
|
|
window.gl = window.gl || {};
|
2017-12-07 16:56:59 -05:00
|
|
|
window.gl.mrWidgetData = #{serialize_issuable(@merge_request, serializer: 'widget')}
|
2017-06-13 18:12:31 -04:00
|
|
|
|
2018-05-29 05:51:43 -04:00
|
|
|
window.gl.mrWidgetData.squash_before_merge_help_path = '#{help_page_path("user/project/merge_requests/squash_and_merge")}';
|
2018-11-26 03:36:18 -05:00
|
|
|
window.gl.mrWidgetData.troubleshooting_docs_path = '#{help_page_path('user/project/merge_requests/index.md', anchor: 'troubleshooting')}';
|
2018-05-29 05:51:43 -04:00
|
|
|
|
2017-06-13 18:12:31 -04:00
|
|
|
#js-vue-mr-widget.mr-widget
|
|
|
|
|
2018-02-27 19:10:43 -05:00
|
|
|
.content-block.content-block-small.emoji-list-container.js-noteable-awards
|
2017-06-13 18:12:31 -04:00
|
|
|
= render 'award_emoji/awards_block', awardable: @merge_request, inline: true
|
|
|
|
|
|
|
|
.merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') }
|
|
|
|
.merge-request-tabs-container
|
|
|
|
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
|
|
|
|
.fade-left= icon('angle-left')
|
|
|
|
.fade-right= icon('angle-right')
|
2018-06-13 09:41:36 -04:00
|
|
|
%ul.merge-request-tabs.nav-tabs.nav.nav-links.scrolling-tabs
|
2018-10-17 01:10:26 -04:00
|
|
|
%li.notes-tab.qa-notes-tab
|
2018-06-13 09:41:36 -04:00
|
|
|
= tab_link_for @merge_request, :show, force_link: @commit.present? do
|
|
|
|
Discussion
|
|
|
|
%span.badge.badge-pill= @merge_request.related_notes.user.count
|
|
|
|
- if @merge_request.source_project
|
|
|
|
%li.commits-tab
|
|
|
|
= tab_link_for @merge_request, :commits do
|
|
|
|
Commits
|
|
|
|
%span.badge.badge-pill= @commits_count
|
|
|
|
- if @pipelines.any?
|
|
|
|
%li.pipelines-tab
|
|
|
|
= tab_link_for @merge_request, :pipelines do
|
|
|
|
Pipelines
|
|
|
|
%span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size
|
2018-10-17 01:10:26 -04:00
|
|
|
%li.diffs-tab.qa-diffs-tab
|
2018-06-13 09:41:36 -04:00
|
|
|
= tab_link_for @merge_request, :diffs do
|
|
|
|
Changes
|
|
|
|
%span.badge.badge-pill= @merge_request.diff_size
|
2018-10-23 05:49:45 -04:00
|
|
|
.d-inline-flex.flex-wrap
|
|
|
|
#js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@merge_request),
|
|
|
|
notes_filters: UserPreference.notes_filters.to_json } }
|
|
|
|
#js-vue-discussion-counter
|
2017-06-13 18:12:31 -04:00
|
|
|
|
|
|
|
.tab-content#diff-notes-app
|
|
|
|
#notes.notes.tab-pane.voting_notes
|
|
|
|
.row
|
|
|
|
%section.col-md-12
|
2018-02-27 19:10:43 -05:00
|
|
|
%script.js-notes-data{ type: "application/json" }= initial_notes_data(true).to_json.html_safe
|
|
|
|
.issuable-discussion.js-vue-notes-event
|
2018-10-06 13:16:40 -04:00
|
|
|
#js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request).to_json,
|
2018-06-21 08:22:40 -04:00
|
|
|
noteable_data: serialize_issuable(@merge_request),
|
|
|
|
noteable_type: 'MergeRequest',
|
|
|
|
target_type: 'merge_request',
|
2018-12-17 16:58:00 -05:00
|
|
|
help_page_path: suggest_changes_help_path,
|
2018-06-21 08:22:40 -04:00
|
|
|
current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json} }
|
2017-06-13 18:12:31 -04:00
|
|
|
|
|
|
|
#commits.commits.tab-pane
|
|
|
|
-# This tab is always loaded via AJAX
|
|
|
|
#pipelines.pipelines.tab-pane
|
|
|
|
- if @pipelines.any?
|
2017-06-29 13:06:35 -04:00
|
|
|
= render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request)
|
2018-06-21 08:22:40 -04:00
|
|
|
#js-diffs-app.diffs.tab-pane{ data: { "is-locked" => @merge_request.discussion_locked?,
|
|
|
|
endpoint: diffs_project_merge_request_path(@project, @merge_request, 'json', request.query_parameters),
|
2018-12-17 16:58:00 -05:00
|
|
|
help_page_path: suggest_changes_help_path,
|
2018-06-26 14:49:22 -04:00
|
|
|
current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json,
|
2018-12-13 05:57:45 -05:00
|
|
|
project_path: project_path(@merge_request.project),
|
|
|
|
changes_empty_state_illustration: image_path('illustrations/merge_request_changes_empty.svg') } }
|
2017-06-13 18:12:31 -04:00
|
|
|
|
|
|
|
.mr-loading-status
|
|
|
|
= spinner
|
|
|
|
|
2018-11-29 21:33:02 -05:00
|
|
|
= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees
|
2018-11-27 11:53:16 -05:00
|
|
|
|
2017-06-13 18:12:31 -04:00
|
|
|
- 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
|