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

118 lines
6.1 KiB
Text
Raw Normal View History

2016-06-02 11:05:42 +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
2016-09-13 17:45:13 +05:30
- content_for :page_specific_javascripts do
= page_specific_javascript_tag('diff_notes/diff_notes_bundle.js')
2016-09-13 17:45:13 +05:30
- if diff_view == :parallel
2015-09-25 12:07:36 +05:30
- fluid_layout true
2015-04-26 12:48:37 +05:30
.merge-request{'data-url' => merge_request_path(@merge_request)}
2015-12-23 02:04:40 +05:30
= render "projects/merge_requests/show/mr_title"
2016-06-02 11:05:42 +05:30
.merge-request-details.issuable-details{data: {id: @merge_request.project.id}}
2015-04-26 12:48:37 +05:30
= render "projects/merge_requests/show/mr_box"
2015-12-23 02:04:40 +05:30
.append-bottom-default.mr-source-target.prepend-top-default
2015-09-11 14:41:01 +05:30
- if @merge_request.open?
.pull-right
- if @merge_request.source_branch_exists?
2016-09-13 17:45:13 +05:30
- 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)
= link_to "#modal_merge_info", class: "btn inline btn-grouped btn-sm", "data-toggle" => "modal" do
2015-09-11 14:41:01 +05:30
Check out branch
2016-06-22 15:30:34 +05:30
%span.dropdown.inline.prepend-left-5
2015-09-11 14:41:01 +05:30
%a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
Download as
%span.caret
2016-06-22 15:30:34 +05:30
%ul.dropdown-menu.dropdown-menu-align-right
2015-09-11 14:41:01 +05:30
%li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
2015-10-24 18:46:33 +05:30
.normal
2015-09-11 14:41:01 +05:30
%span Request to merge
2015-12-23 02:04:40 +05:30
%span.label-branch= source_branch_with_namespace(@merge_request)
2015-09-11 14:41:01 +05:30
%span into
2016-06-02 11:05:42 +05:30
%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)
2015-04-26 12:48:37 +05:30
= render "projects/merge_requests/show/how_to_merge"
2015-09-11 14:41:01 +05:30
= render "projects/merge_requests/widget/show.html.haml"
- if @merge_request.source_branch_exists? && @merge_request.mergeable? && @merge_request.can_be_merged_by?(current_user)
2016-06-22 15:30:34 +05:30
.light.prepend-top-default.append-bottom-default
2015-09-11 14:41:01 +05:30
You can also accept this merge request manually using the
2015-10-24 18:46:33 +05:30
= succeed '.' do
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
2014-09-02 18:07:02 +05:30
2016-08-24 12:49:21 +05:30
- if @commits_count.nonzero?
%ul.merge-request-tabs.nav-links.no-top.no-bottom
2015-12-23 02:04:40 +05:30
%li.notes-tab
2016-09-13 17:45:13 +05:30
= link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#notes', action: 'notes', toggle: 'tab' } do
2015-12-23 02:04:40 +05:30
Discussion
%span.badge= @merge_request.mr_and_commit_notes.user.count
2015-12-23 02:04:40 +05:30
%li.commits-tab
2016-09-13 17:45:13 +05:30
= link_to commits_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#commits', action: 'commits', toggle: 'tab' } do
2015-12-23 02:04:40 +05:30
Commits
2016-08-24 12:49:21 +05:30
%span.badge= @commits_count
- if @pipeline
2016-09-13 17:45:13 +05:30
%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= @merge_request.all_pipelines.size
2015-12-23 02:04:40 +05:30
%li.builds-tab
2016-09-13 17:45:13 +05:30
= link_to builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#builds', action: 'builds', toggle: 'tab' } do
2015-12-23 02:04:40 +05:30
Builds
%span.badge= @statuses.size
%li.diffs-tab
2016-09-13 17:45:13 +05:30
= link_to diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: 'div#diffs', action: 'diffs', toggle: 'tab' } do
2015-12-23 02:04:40 +05:30
Changes
2016-06-02 11:05:42 +05:30
%span.badge= @merge_request.diff_size
2016-09-13 17:45:13 +05:30
%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",
":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 }} {{ discussionCount | pluralize 'discussion' }} resolved
= render "discussions/jump_to_next"
2015-12-23 02:04:40 +05:30
2016-09-13 17:45:13 +05:30
.tab-content#diff-notes-app
2015-12-23 02:04:40 +05:30
#notes.notes.tab-pane.voting_notes
2016-06-02 11:05:42 +05:30
.content-block.content-block-small.oneline-block
= render 'award_emoji/awards_block', awardable: @merge_request, inline: true
2015-12-23 02:04:40 +05:30
.row
2016-04-02 18:10:28 +05:30
%section.col-md-12
2015-12-23 02:04:40 +05:30
.issuable-discussion
= render "projects/merge_requests/discussion"
2014-09-02 18:07:02 +05:30
2015-12-23 02:04:40 +05:30
#commits.commits.tab-pane
- # This tab is always loaded via AJAX
#builds.builds.tab-pane
- # This tab is always loaded via AJAX
2016-09-13 17:45:13 +05:30
#pipelines.pipelines.tab-pane
- # This tab is always loaded via AJAX
2015-12-23 02:04:40 +05:30
#diffs.diffs.tab-pane
- # This tab is always loaded via AJAX
2015-04-26 12:48:37 +05:30
2015-12-23 02:04:40 +05:30
.mr-loading-status
= spinner
2014-09-02 18:07:02 +05:30
2016-04-02 18:10:28 +05:30
= render 'shared/issuable/sidebar', issuable: @merge_request
2016-06-02 11:05:42 +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
2016-04-02 18:10:28 +05:30
2014-09-02 18:07:02 +05:30
:javascript
var merge_request;
merge_request = new MergeRequest({
action: "#{controller.action_name}"
});