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
|
2016-07-26 08:44:51 -04:00
|
|
|
= page_specific_javascript_tag('diff_notes/diff_notes_bundle.js')
|
2015-09-17 06:16:24 -04:00
|
|
|
|
2015-02-25 22:34:16 -05:00
|
|
|
.merge-request{'data-url' => merge_request_path(@merge_request)}
|
2015-12-16 10:13:22 -05:00
|
|
|
= render "projects/merge_requests/show/mr_title"
|
2015-12-16 16:18:19 -05:00
|
|
|
|
2016-03-11 00:28:10 -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-09-02 09:36:59 -04:00
|
|
|
- unless @merge_request.closed_without_fork?
|
|
|
|
.normal
|
|
|
|
%span Request to merge
|
|
|
|
%span.label-branch= source_branch_with_namespace(@merge_request)
|
|
|
|
%span into
|
|
|
|
%span.label-branch
|
|
|
|
= link_to @merge_request.target_branch, namespace_project_commits_path(@project.namespace, @project, @merge_request.target_branch)
|
|
|
|
- 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-09-02 09:36:59 -04:00
|
|
|
- unless @merge_request.closed_without_source_project?
|
|
|
|
= render "projects/merge_requests/show/how_to_merge"
|
|
|
|
= 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)
|
2016-06-15 11:51:15 -04:00
|
|
|
.light.prepend-top-default.append-bottom-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
|
|
|
|
2016-07-05 12:27:07 -04:00
|
|
|
- if @commits_count.nonzero?
|
2016-10-10 08:13:07 -04:00
|
|
|
%ul.merge-request-tabs.nav-links.no-top.no-bottom{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') }
|
2015-12-17 04:34:15 -05:00
|
|
|
%li.notes-tab
|
2016-08-15 16:53:09 -04:00
|
|
|
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#notes', action: 'notes', toggle: 'tab' } do
|
2015-12-17 04:34:15 -05:00
|
|
|
Discussion
|
2016-04-16 15:09:08 -04:00
|
|
|
%span.badge= @merge_request.mr_and_commit_notes.user.count
|
2016-09-02 09:36:59 -04:00
|
|
|
- unless @merge_request.closed_without_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
|
2016-06-03 10:27:50 -04:00
|
|
|
- if @pipeline
|
2016-07-22 20:28:39 -04:00
|
|
|
%li.pipelines-tab
|
2016-08-15 16:53:09 -04:00
|
|
|
= link_to pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#pipelines', action: 'pipelines', toggle: 'tab' } do
|
2016-07-22 20:28:39 -04:00
|
|
|
Pipelines
|
2016-10-17 07:55:30 -04:00
|
|
|
%span.badge= @pipelines.size
|
2015-12-17 04:34:15 -05:00
|
|
|
%li.builds-tab
|
2016-08-15 16:53:09 -04:00
|
|
|
= link_to builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#builds', action: 'builds', toggle: 'tab' } do
|
2015-12-17 04:34:15 -05:00
|
|
|
Builds
|
|
|
|
%span.badge= @statuses.size
|
|
|
|
%li.diffs-tab
|
2016-08-15 16:53:09 -04:00
|
|
|
= link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#diffs', action: 'diffs', toggle: 'tab' } do
|
2015-12-17 04:34:15 -05:00
|
|
|
Changes
|
2016-03-03 12:38:44 -05:00
|
|
|
%span.badge= @merge_request.diff_size
|
2016-08-01 12:00:00 -04:00
|
|
|
%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?}" }
|
|
|
|
.line-resolve-all{ "v-show" => "discussionCount > 0",
|
2016-08-04 21:01:32 -04:00
|
|
|
":class" => "{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }" }
|
2016-08-01 12:00:00 -04:00
|
|
|
%span.line-resolve-btn.is-disabled{ type: "button",
|
2016-08-04 21:01:32 -04:00
|
|
|
":class" => "{ 'is-active': resolvedDiscussionCount === discussionCount }" }
|
2016-08-09 13:49:22 -04:00
|
|
|
= render "shared/icons/icon_status_success.svg"
|
2016-08-01 12:00:00 -04:00
|
|
|
%span.line-resolve-text
|
2016-08-04 21:01:32 -04:00
|
|
|
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ discussionCount | pluralize 'discussion' }} resolved
|
2016-08-01 12:00:00 -04:00
|
|
|
= render "discussions/jump_to_next"
|
2014-12-22 13:36:15 -05:00
|
|
|
|
2016-07-26 08:44:51 -04:00
|
|
|
.tab-content#diff-notes-app
|
2015-12-17 04:34:15 -05:00
|
|
|
#notes.notes.tab-pane.voting_notes
|
2016-09-06 13:54:42 -04:00
|
|
|
.content-block.content-block-small
|
2016-04-16 15:09:08 -04:00
|
|
|
= render 'award_emoji/awards_block', awardable: @merge_request, inline: true
|
2015-12-10 13:04:58 -05:00
|
|
|
|
2015-12-17 04:34:15 -05:00
|
|
|
.row
|
2016-01-27 17:38:19 -05:00
|
|
|
%section.col-md-12
|
2015-12-17 04:34:15 -05:00
|
|
|
.issuable-discussion
|
|
|
|
= render "projects/merge_requests/discussion"
|
2015-12-10 13:04:58 -05:00
|
|
|
|
2015-12-17 04:34:15 -05:00
|
|
|
#commits.commits.tab-pane
|
|
|
|
- # This tab is always loaded via AJAX
|
|
|
|
#builds.builds.tab-pane
|
|
|
|
- # This tab is always loaded via AJAX
|
2016-07-22 20:28:39 -04:00
|
|
|
#pipelines.pipelines.tab-pane
|
|
|
|
- # This tab is always loaded via AJAX
|
2015-12-17 04:34:15 -05:00
|
|
|
#diffs.diffs.tab-pane
|
|
|
|
- # This tab is always loaded via AJAX
|
2014-12-25 07:32:49 -05:00
|
|
|
|
2015-12-17 04:34:15 -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
|
2013-01-04 20:18:39 -05:00
|
|
|
var merge_request;
|
2012-06-29 14:55:22 -04:00
|
|
|
|
2013-05-02 07:36:53 -04:00
|
|
|
merge_request = new MergeRequest({
|
|
|
|
action: "#{controller.action_name}"
|
|
|
|
});
|