Commit 3abffb2b authored by Sean McGivern's avatar Sean McGivern

Fix expand all diffs button in compare view

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' 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.
parent e9946f19
...@@ -22,6 +22,7 @@ v 8.10.2 (unreleased) ...@@ -22,6 +22,7 @@ v 8.10.2 (unreleased)
- Use project ID in repository cache to prevent stale data from persisting across projects. !5460 - Use project ID in repository cache to prevent stale data from persisting across projects. !5460
- Ensure relative paths for video are rewritten as we do for images. !5474 - Ensure relative paths for video are rewritten as we do for images. !5474
- Ensure current user can retry a build before showing the 'Retry' button. !5476 - Ensure current user can retry a build before showing the 'Retry' button. !5476
- Fix expand all diffs button in compare view
v 8.10.1 v 8.10.1
- Refactor repository storages documentation. !5428 - Refactor repository storages documentation. !5428
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.content-block.oneline-block.files-changed .content-block.oneline-block.files-changed
.inline-parallel-buttons .inline-parallel-buttons
- if !expand_all_diffs? && diff_files.any? { |diff_file| diff_file.collapsed? } - 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 show_whitespace_toggle
- if current_controller?(:commit) - if current_controller?(:commit)
= commit_diff_whitespace_link(@project, @commit, class: 'hidden-xs') = commit_diff_whitespace_link(@project, @commit, class: 'hidden-xs')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment