summaryrefslogtreecommitdiff
path: root/app/views/projects/merge_requests/_new_submit.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/merge_requests/_new_submit.html.haml')
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml43
1 files changed, 23 insertions, 20 deletions
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
index 24a9563dd4d..e83b7649928 100644
--- a/app/views/projects/merge_requests/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -19,30 +19,31 @@
.mr-compare.merge-request
%ul.nav.nav-tabs.merge-request-tabs
- %li.commits-tab{data: {action: 'commits', toggle: 'tab'}}
- = link_to url_for(params) do
- %i.fa.fa-history
+ %li.commits-tab
+ = link_to '#commits', data: {action: 'commits', toggle: 'tab'} do
+ = icon('history')
Commits
%span.badge= @commits.size
- %li.diffs-tab{data: {action: 'diffs', toggle: 'tab'}}
- = link_to url_for(params) do
- %i.fa.fa-list-alt
+ %li.diffs-tab
+ = link_to '#diffs', data: {action: 'diffs', toggle: 'tab'} do
+ = icon('list-alt')
Changes
%span.badge= @diffs.size
- .commits.tab-content
- = render "projects/commits/commits", project: @project
- .diffs.tab-content
- - 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.
+ .tab-content
+ #commits.commits.tab-pane
+ = render "projects/commits/commits", project: @project
+ #diffs.diffs.tab-pane
+ - 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.
:javascript
$('.assign-to-me-link').on('click', function(e){
@@ -55,6 +56,8 @@
:javascript
var merge_request
merge_request = new MergeRequest({
- action: 'commits'
+ action: 'diffs',
+ diffs_loaded: true,
+ commits_loaded: true
});