2014-09-02 18:07:02 +05:30
|
|
|
%h3.page-title
|
2015-12-23 02:04:40 +05:30
|
|
|
New Merge Request
|
2014-09-02 18:07:02 +05:30
|
|
|
%p.slead
|
2015-10-24 18:46:33 +05:30
|
|
|
- source_title, target_title = format_mr_branch_names(@merge_request)
|
2014-09-02 18:07:02 +05:30
|
|
|
From
|
2015-10-24 18:46:33 +05:30
|
|
|
%strong.label-branch #{source_title}
|
2014-09-02 18:07:02 +05:30
|
|
|
%span into
|
2015-10-24 18:46:33 +05:30
|
|
|
%strong.label-branch #{target_title}
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
%span.pull-right
|
2015-09-11 14:41:01 +05:30
|
|
|
= link_to 'Change branches', mr_change_branches_path(@merge_request)
|
|
|
|
%hr
|
2016-06-02 11:05:42 +05:30
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], html: { class: 'merge-request-form form-horizontal common-note-form js-requires-input' } do |f|
|
2015-12-23 02:04:40 +05:30
|
|
|
= render 'shared/issuable/form', f: f, issuable: @merge_request
|
|
|
|
= f.hidden_field :source_project_id
|
|
|
|
= f.hidden_field :source_branch
|
|
|
|
= f.hidden_field :target_project_id
|
|
|
|
= f.hidden_field :target_branch
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
.mr-compare.merge-request
|
2016-01-19 16:12:03 +05:30
|
|
|
%ul.merge-request-tabs.nav-links.no-top.no-bottom
|
2015-09-11 14:41:01 +05:30
|
|
|
%li.commits-tab
|
2015-12-23 02:04:40 +05:30
|
|
|
= link_to url_for(params), data: {target: 'div#commits', action: 'commits', toggle: 'tab'} do
|
2015-04-26 12:48:37 +05:30
|
|
|
Commits
|
|
|
|
%span.badge= @commits.size
|
2016-06-16 23:09:34 +05:30
|
|
|
- if @pipeline
|
2015-12-23 02:04:40 +05:30
|
|
|
%li.builds-tab.active
|
|
|
|
= link_to url_for(params), data: {target: 'div#builds', action: 'builds', toggle: 'tab'} do
|
|
|
|
Builds
|
|
|
|
%span.badge= @statuses.size
|
2015-09-25 12:07:36 +05:30
|
|
|
%li.diffs-tab.active
|
2015-12-23 02:04:40 +05:30
|
|
|
= link_to url_for(params), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do
|
2015-04-26 12:48:37 +05:30
|
|
|
Changes
|
2016-06-02 11:05:42 +05:30
|
|
|
%span.badge= @diffs.real_size
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-09-11 14:41:01 +05:30
|
|
|
.tab-content
|
|
|
|
#commits.commits.tab-pane
|
2015-12-23 02:04:40 +05:30
|
|
|
= render "projects/merge_requests/show/commits"
|
2015-09-25 12:07:36 +05:30
|
|
|
#diffs.diffs.tab-pane.active
|
2016-06-02 11:05:42 +05:30
|
|
|
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
|
2015-09-11 14:41:01 +05:30
|
|
|
.alert.alert-danger
|
|
|
|
%h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
|
|
|
|
%p To preserve performance the line changes are not shown.
|
|
|
|
- else
|
2016-06-02 11:05:42 +05:30
|
|
|
= render "projects/diffs/diffs", diffs: @diffs, project: @project, diff_refs: @merge_request.diff_refs, show_whitespace_toggle: false
|
2016-06-16 23:09:34 +05:30
|
|
|
- if @pipeline
|
2015-12-23 02:04:40 +05:30
|
|
|
#builds.builds.tab-pane
|
|
|
|
= render "projects/merge_requests/show/builds"
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
:javascript
|
|
|
|
$('.assign-to-me-link').on('click', function(e){
|
|
|
|
$('#merge_request_assignee_id').val("#{current_user.id}").trigger("change");
|
|
|
|
e.preventDefault();
|
|
|
|
});
|
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
:javascript
|
|
|
|
var merge_request
|
|
|
|
merge_request = new MergeRequest({
|
2015-09-11 14:41:01 +05:30
|
|
|
action: 'new',
|
|
|
|
diffs_loaded: true,
|
|
|
|
commits_loaded: true
|
2015-04-26 12:48:37 +05:30
|
|
|
});
|