2014-05-08 08:38:17 -04:00
|
|
|
%h3.page-title
|
2015-12-02 08:27:29 -05:00
|
|
|
New Merge Request
|
2014-05-08 08:38:17 -04:00
|
|
|
%p.slead
|
2015-09-30 23:50:53 -04:00
|
|
|
- source_title, target_title = format_mr_branch_names(@merge_request)
|
2014-05-08 08:38:17 -04:00
|
|
|
From
|
2015-09-30 23:50:53 -04:00
|
|
|
%strong.label-branch #{source_title}
|
2014-07-30 15:58:20 -04:00
|
|
|
%span into
|
2015-09-30 23:50:53 -04:00
|
|
|
%strong.label-branch #{target_title}
|
2014-05-08 08:38:17 -04:00
|
|
|
|
|
|
|
%span.pull-right
|
2015-05-06 08:13:11 -04:00
|
|
|
= link_to 'Change branches', mr_change_branches_path(@merge_request)
|
2015-05-06 09:19:09 -04:00
|
|
|
%hr
|
2015-06-26 21:53:17 -04:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], html: { class: 'merge-request-form form-horizontal gfm-form js-requires-input' } do |f|
|
2015-12-02 08:38:14 -05:00
|
|
|
= 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-05-08 08:38:17 -04:00
|
|
|
|
2014-12-29 14:14:51 -05:00
|
|
|
.mr-compare.merge-request
|
2015-12-02 08:48:51 -05:00
|
|
|
%ul.merge-request-tabs.center-top-menu.no-top.no-bottom
|
2015-05-27 22:39:11 -04:00
|
|
|
%li.commits-tab
|
2015-12-08 14:47:28 -05:00
|
|
|
= link_to url_for(params), data: {target: 'div#commits', action: 'commits', toggle: 'tab'} do
|
2014-12-29 14:14:51 -05:00
|
|
|
Commits
|
|
|
|
%span.badge= @commits.size
|
2015-08-11 08:33:31 -04:00
|
|
|
%li.diffs-tab.active
|
2015-12-08 14:47:28 -05:00
|
|
|
= link_to url_for(params), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do
|
2014-12-29 14:14:51 -05:00
|
|
|
Changes
|
|
|
|
%span.badge= @diffs.size
|
2015-12-08 16:28:28 -05:00
|
|
|
- if @ci_commit
|
|
|
|
%li.builds-tab.active
|
|
|
|
= link_to url_for(params), data: {target: 'div#builds', action: 'builds', toggle: 'tab'} do
|
|
|
|
Builds
|
|
|
|
%span.badge= @statuses.size
|
2014-05-08 08:52:59 -04:00
|
|
|
|
2015-05-27 22:39:11 -04:00
|
|
|
.tab-content
|
|
|
|
#commits.commits.tab-pane
|
2015-12-02 08:48:51 -05:00
|
|
|
= render "projects/merge_requests/show/commits"
|
2015-08-11 08:33:31 -04:00
|
|
|
#diffs.diffs.tab-pane.active
|
2015-05-27 22:39:11 -04:00
|
|
|
- if @diffs.present?
|
|
|
|
= render "projects/diffs/diffs", diffs: @diffs, project: @project
|
|
|
|
- elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
|
|
|
|
.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
|
|
|
|
.alert.alert-danger
|
|
|
|
%h4 This comparison includes a huge diff.
|
|
|
|
%p To preserve performance the line changes are not shown.
|
2015-12-08 16:28:28 -05:00
|
|
|
- if @ci_commit
|
|
|
|
#builds.builds.tab-pane
|
|
|
|
= render "projects/merge_requests/show/builds"
|
2014-05-08 08:52:59 -04:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$('.assign-to-me-link').on('click', function(e){
|
|
|
|
$('#merge_request_assignee_id').val("#{current_user.id}").trigger("change");
|
|
|
|
e.preventDefault();
|
|
|
|
});
|
2014-06-03 03:56:40 -04:00
|
|
|
|
2014-12-29 14:14:51 -05:00
|
|
|
:javascript
|
|
|
|
var merge_request
|
|
|
|
merge_request = new MergeRequest({
|
2015-05-29 00:27:56 -04:00
|
|
|
action: 'new',
|
2015-05-27 22:39:11 -04:00
|
|
|
diffs_loaded: true,
|
|
|
|
commits_loaded: true
|
2014-12-29 14:14:51 -05:00
|
|
|
});
|