summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-26 11:54:10 +0000
committerRémy Coutable <remy@rymai.me>2016-07-27 13:24:57 +0200
commit16f0b9c5b153dca90600893f4251aea79b8da198 (patch)
tree487ecaf8f58b6a131ceb722a3c53ace0c0d47b33
parent5dc2cadf3aa8fbbba09c2b914dd9c647b9b49ff0 (diff)
downloadgitlab-ce-16f0b9c5b153dca90600893f4251aea79b8da198.tar.gz
Merge branch '20241-expand-all-button-breaks-diff-comparison-view' into 'master'
Fix expand all diffs button in compare view ## What does this MR do? Fix the expand all diffs button in compare view. ## Are there points in the code the reviewer needs to double check? Don't think so. ## Why was this MR needed? We can't reuse the existing value of the format parameter, because on the merge request page that's 'json', so the link would go to a JSON file. We can't set it to HTML, because that adds '.html' to the URL, which breaks the compare view (and looks bad). Setting it to `nil` uses the default format, which in all of these cases is HTML anyway. ## What are the relevant issue numbers? Closes #20241. See merge request !5500 Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/projects/diffs/_diffs.html.haml2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 88ae55a19c6..6290e6f9544 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,7 @@ v 8.10.2 (unreleased)
- Added `*.js.es6 gitlab-language=javascript` to `.gitattributes`. !5486
- Don't show comment button in gutter of diffs on MR discussion tab. !5493
- Rescue Rugged::OSError (lock exists) when creating references. !5497
+ - Fix expand all diffs button in compare view. !5500
v 8.10.1
- Refactor repository storages documentation. !5428
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml
index 8ae433b4823..4bf3ccace20 100644
--- a/app/views/projects/diffs/_diffs.html.haml
+++ b/app/views/projects/diffs/_diffs.html.haml
@@ -7,7 +7,7 @@
.content-block.oneline-block.files-changed
.inline-parallel-buttons
- if !expand_all_diffs? && diff_files.any? { |diff_file| diff_file.collapsed? }
- = link_to 'Expand all', url_for(params.merge(expand_all_diffs: 1, format: 'html')), class: 'btn btn-default'
+ = link_to 'Expand all', url_for(params.merge(expand_all_diffs: 1, format: nil)), class: 'btn btn-default'
- if show_whitespace_toggle
- if current_controller?(:commit)
= commit_diff_whitespace_link(@project, @commit, class: 'hidden-xs')