gitlab-org--gitlab-foss/app/views/projects/merge_requests/_new_submit.html.haml

70 lines
2.5 KiB
Text
Raw Normal View History

%h3.page-title
2015-12-02 08:27:29 -05:00
New Merge Request
%p.slead
- source_title, target_title = format_mr_branch_names(@merge_request)
From
%strong.label-branch #{source_title}
%span into
%strong.label-branch #{target_title}
%span.pull-right
= link_to 'Change branches', mr_change_branches_path(@merge_request)
%hr
2016-04-05 05:39:16 -04:00
= 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-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
.mr-compare.merge-request
2016-09-13 17:05:16 -04:00
- if @commits.empty?
.commits-empty
%h4
There are no commits yet.
= custom_icon ('illustration_no_commits')
- else
%ul.merge-request-tabs.nav-links.no-top.no-bottom
%li.commits-tab.active
= link_to url_for(params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do
Commits
%span.badge= @commits.size
- if @pipelines.any?
2016-08-30 16:25:41 -04:00
%li.builds-tab
= link_to url_for(params), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tab'} do
Pipelines
%span.badge= @pipelines.size
2016-09-13 17:05:16 -04:00
%li.builds-tab
= link_to url_for(params), data: {target: 'div#builds', action: 'builds', toggle: 'tab'} do
Builds
%span.badge= @statuses.size
%li.diffs-tab
= link_to url_for(params.merge(action: 'new_diffs')), data: {target: 'div#diffs', action: 'new/diffs', toggle: 'tab'} do
Changes
%span.badge= @merge_request.diff_size
2016-09-13 17:05:16 -04:00
.tab-content
#commits.commits.tab-pane.active
= render "projects/merge_requests/show/commits"
#diffs.diffs.tab-pane
- # This tab is always loaded via AJAX
- if @pipelines.any?
2016-09-13 17:05:16 -04:00
#builds.builds.tab-pane
= render "projects/merge_requests/show/builds"
2016-08-30 16:25:41 -04:00
#pipelines.pipelines.tab-pane
= render "projects/merge_requests/show/pipelines"
.mr-loading-status
= spinner
:javascript
$('.assign-to-me-link').on('click', function(e){
$('#merge_request_assignee_id').val("#{current_user.id}").trigger("change");
e.preventDefault();
});
:javascript
var merge_request = new MergeRequest({
action: "#{(@show_changes_tab ? 'new/diffs' : 'new')}",
buildsLoaded: "#{@pipelines.any? ? 'true' : 'false'}"
});