summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-21 17:37:33 -0700
committerStan Hu <stanhu@gmail.com>2015-07-23 12:53:54 -0700
commitae3f869fd1f4326e26805606197dea4ea15c67bb (patch)
tree725ec9afb838a3b083db5ad97a6d1dbd4ba46b8a /app/views
parent5dd4dea93baa6386ed860a50125dce3ca3890f16 (diff)
downloadgitlab-ce-ae3f869fd1f4326e26805606197dea4ea15c67bb.tar.gz
Fix the "Reload with full diff" URL button
On the first load, the merge request tabs would be requested in JSON format to render the HTML. This would cause the "Reload with full diff" button to create a link to diff.json. Closes #2041
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/diffs/_warning.html.haml2
-rw-r--r--app/views/projects/merge_requests/_show.html.haml6
2 files changed, 3 insertions, 5 deletions
diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml
index da3d4be84ba..caed0e69dc8 100644
--- a/app/views/projects/diffs/_warning.html.haml
+++ b/app/views/projects/diffs/_warning.html.haml
@@ -3,7 +3,7 @@
Too many changes to show.
.pull-right
- unless diff_hard_limit_enabled?
- = link_to "Reload with full diff", url_for(params.merge(force_show_diff: true)), class: "btn btn-sm btn-warning"
+ = link_to "Reload with full diff", url_for(params.merge(force_show_diff: true, format: :html)), class: "btn btn-sm btn-warning"
- if current_controller?(:commit) or current_controller?(:merge_requests)
- if current_controller?(:commit)
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index faaa85896cf..c57eee14143 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -66,11 +66,9 @@
#notes.notes.tab-pane.voting_notes
= render "projects/merge_requests/discussion"
#commits.commits.tab-pane
- - if current_page?(action: 'commits')
- = render "projects/merge_requests/show/commits"
+ - # This tab is always loaded via AJAX
#diffs.diffs.tab-pane
- - if current_page?(action: 'diffs')
- = render "projects/merge_requests/show/diffs"
+ - # This tab is always loaded via AJAX
.mr-loading-status
= spinner