2017-01-05 16:07:13 -05:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2016-10-19 06:22:35 -04:00
|
|
|
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
|
2015-12-24 17:03:54 -05:00
|
|
|
- page_description @merge_request.description
|
|
|
|
- page_card_attributes @merge_request.card_attributes
|
2016-06-30 12:21:57 -04:00
|
|
|
- content_for :page_specific_javascripts do
|
2017-03-01 21:28:34 -05:00
|
|
|
= page_specific_javascript_bundle_tag('common_vue')
|
2016-11-03 17:38:54 -04:00
|
|
|
= page_specific_javascript_bundle_tag('diff_notes')
|
2015-09-17 06:16:24 -04:00
|
|
|
|
2017-02-08 09:58:08 -05:00
|
|
|
.merge-request{ 'data-url' => merge_request_path(@merge_request), 'data-project-path' => project_path(@merge_request.project) }
|
2015-12-16 10:13:22 -05:00
|
|
|
= render "projects/merge_requests/show/mr_title"
|
2015-12-16 16:18:19 -05:00
|
|
|
|
2016-12-26 05:47:16 -05:00
|
|
|
.merge-request-details.issuable-details{ data: { id: @merge_request.project.id } }
|
2015-12-17 04:34:15 -05:00
|
|
|
= render "projects/merge_requests/show/mr_box"
|
|
|
|
.append-bottom-default.mr-source-target.prepend-top-default
|
|
|
|
- if @merge_request.open?
|
|
|
|
.pull-right
|
|
|
|
- if @merge_request.source_branch_exists?
|
2016-07-25 23:59:39 -04:00
|
|
|
- if koding_enabled? && @repository.koding_yml
|
|
|
|
= link_to koding_project_url(@merge_request.source_project, @merge_request.source_branch, @merge_request.commits.first.short_id), class: "btn inline btn-grouped btn-sm", target: '_blank' do
|
|
|
|
Run in IDE (Koding)
|
2016-06-08 10:20:07 -04:00
|
|
|
= link_to "#modal_merge_info", class: "btn inline btn-grouped btn-sm", "data-toggle" => "modal" do
|
2015-12-17 04:34:15 -05:00
|
|
|
Check out branch
|
2015-08-08 15:17:43 -04:00
|
|
|
|
2016-06-14 09:45:01 -04:00
|
|
|
%span.dropdown.inline.prepend-left-5
|
2015-12-17 04:34:15 -05:00
|
|
|
%a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
|
|
|
|
Download as
|
2016-08-23 12:02:52 -04:00
|
|
|
= icon('caret-down')
|
2016-06-14 09:45:01 -04:00
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right
|
2015-12-17 04:34:15 -05:00
|
|
|
%li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
|
|
|
|
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
|
2016-10-19 11:53:12 -04:00
|
|
|
.normal
|
|
|
|
%span Request to merge
|
|
|
|
%span.label-branch= source_branch_with_namespace(@merge_request)
|
|
|
|
%span into
|
|
|
|
%span.label-branch
|
2016-12-03 16:45:48 -05:00
|
|
|
= link_to_if @merge_request.target_branch_exists?, @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch)
|
2016-10-19 11:53:12 -04:00
|
|
|
- if @merge_request.open? && @merge_request.diverged_from_target_branch?
|
|
|
|
%span (#{pluralize(@merge_request.diverged_commits_count, 'commit')} behind)
|
2012-06-29 14:55:22 -04:00
|
|
|
|
2016-10-19 12:13:04 -04:00
|
|
|
- if @merge_request.source_branch_exists?
|
|
|
|
= render "projects/merge_requests/show/how_to_merge"
|
|
|
|
|
2016-10-19 11:53:12 -04:00
|
|
|
= render "projects/merge_requests/widget/show.html.haml"
|
2012-06-29 14:55:22 -04:00
|
|
|
|
2016-01-05 10:24:42 -05:00
|
|
|
- if @merge_request.source_branch_exists? && @merge_request.mergeable? && @merge_request.can_be_merged_by?(current_user)
|
2017-01-02 09:12:39 -05:00
|
|
|
.merge-manually.light.prepend-top-default
|
2015-12-17 04:34:15 -05:00
|
|
|
You can also accept this merge request manually using the
|
|
|
|
= succeed '.' do
|
|
|
|
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
|
2015-08-11 13:55:01 -04:00
|
|
|
|
2017-01-05 16:07:13 -05:00
|
|
|
.content-block.content-block-small.emoji-list-container
|
2016-12-28 17:13:23 -05:00
|
|
|
= render 'award_emoji/awards_block', awardable: @merge_request, inline: true
|
|
|
|
|
2016-12-28 09:53:18 -05:00
|
|
|
.merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') }
|
2017-01-27 10:41:19 -05:00
|
|
|
.merge-request-tabs-container
|
2016-12-28 09:53:18 -05:00
|
|
|
%ul.merge-request-tabs.nav-links.no-top.no-bottom
|
|
|
|
%li.notes-tab
|
|
|
|
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#notes', action: 'notes', toggle: 'tab' } do
|
|
|
|
Discussion
|
|
|
|
%span.badge= @merge_request.related_notes.user.count
|
|
|
|
- if @merge_request.source_project
|
|
|
|
%li.commits-tab
|
|
|
|
= link_to commits_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#commits', action: 'commits', toggle: 'tab' } do
|
|
|
|
Commits
|
|
|
|
%span.badge= @commits_count
|
|
|
|
- if @pipelines.any?
|
|
|
|
%li.pipelines-tab
|
|
|
|
= link_to pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#pipelines', action: 'pipelines', toggle: 'tab' } do
|
|
|
|
Pipelines
|
|
|
|
%span.badge= @pipelines.size
|
|
|
|
%li.diffs-tab
|
|
|
|
= link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#diffs', action: 'diffs', toggle: 'tab' } do
|
|
|
|
Changes
|
|
|
|
%span.badge= @merge_request.diff_size
|
|
|
|
%li#resolve-count-app.line-resolve-all-container.pull-right.prepend-top-10.hidden-xs{ "v-cloak" => true }
|
|
|
|
%resolve-count{ "inline-template" => true, ":logged-out" => "#{current_user.nil?}" }
|
|
|
|
%div
|
|
|
|
.line-resolve-all{ "v-show" => "discussionCount > 0",
|
|
|
|
":class" => "{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }" }
|
|
|
|
%span.line-resolve-btn.is-disabled{ type: "button",
|
|
|
|
":class" => "{ 'is-active': resolvedDiscussionCount === discussionCount }" }
|
|
|
|
= render "shared/icons/icon_status_success.svg"
|
|
|
|
%span.line-resolve-text
|
|
|
|
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
|
|
|
|
= render "discussions/jump_to_next"
|
2014-12-22 13:36:15 -05:00
|
|
|
|
2016-12-28 09:53:18 -05:00
|
|
|
.tab-content#diff-notes-app
|
|
|
|
#notes.notes.tab-pane.voting_notes
|
|
|
|
.row
|
|
|
|
%section.col-md-12
|
|
|
|
.issuable-discussion
|
|
|
|
= render "projects/merge_requests/discussion"
|
2015-12-10 13:04:58 -05:00
|
|
|
|
2016-12-28 09:53:18 -05:00
|
|
|
#commits.commits.tab-pane
|
2017-01-16 09:57:33 -05:00
|
|
|
-# This tab is always loaded via AJAX
|
2016-12-28 09:53:18 -05:00
|
|
|
#pipelines.pipelines.tab-pane
|
2017-02-03 10:14:20 -05:00
|
|
|
- if @pipelines.any?
|
2017-02-13 22:27:32 -05:00
|
|
|
= render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
|
2016-12-28 09:53:18 -05:00
|
|
|
#diffs.diffs.tab-pane
|
2017-01-16 09:57:33 -05:00
|
|
|
-# This tab is always loaded via AJAX
|
2014-12-25 07:32:49 -05:00
|
|
|
|
2016-12-28 09:53:18 -05:00
|
|
|
.mr-loading-status
|
|
|
|
= spinner
|
2014-02-18 13:09:31 -05:00
|
|
|
|
2016-01-27 17:38:19 -05:00
|
|
|
= render 'shared/issuable/sidebar', issuable: @merge_request
|
2016-04-20 07:30:13 -04:00
|
|
|
- if @merge_request.can_be_reverted?(current_user)
|
2016-04-18 03:39:07 -04:00
|
|
|
= render "projects/commit/change", type: 'revert', commit: @merge_request.merge_commit, title: @merge_request.title
|
2016-04-20 07:30:13 -04:00
|
|
|
- if @merge_request.can_be_cherry_picked?
|
2016-04-18 03:39:07 -04:00
|
|
|
= render "projects/commit/change", type: 'cherry-pick', commit: @merge_request.merge_commit, title: @merge_request.title
|
2016-01-27 17:38:19 -05:00
|
|
|
|
2012-06-29 14:55:22 -04:00
|
|
|
:javascript
|
2017-01-13 16:54:16 -05:00
|
|
|
$(function () {
|
|
|
|
new MergeRequest({
|
|
|
|
action: "#{controller.action_name}"
|
|
|
|
});
|
2013-05-02 07:36:53 -04:00
|
|
|
});
|
2016-12-21 05:32:37 -05:00
|
|
|
|
2016-12-30 14:49:59 -05:00
|
|
|
var mrRefreshWidgetUrl = "#{mr_widget_refresh_url(@merge_request)}";
|