diff options
author | Sean McGivern <sean@gitlab.com> | 2016-07-06 15:04:52 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-07-08 15:53:17 +0300 |
commit | c082d92fb959ee2344b90b7fd4e316019452c094 (patch) | |
tree | bdfad8463d79f98167b86c4f25957041cb30d693 /app/views/projects/diffs | |
parent | 90a6be190feea0966e9ed9b6731d930bcff32d68 (diff) |
Allow expanding all diffs at once
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r-- | app/views/projects/diffs/_content.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/diffs/_diffs.html.haml | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/views/projects/diffs/_content.html.haml b/app/views/projects/diffs/_content.html.haml index 9c6a17c0a8c..5f4572ab9b0 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -9,7 +9,7 @@ - if !project.repository.diffable?(blob) .nothing-here-block This diff was suppressed by a .gitattributes entry. - elsif diff_file.diff_lines.length > 0 - - if diff_file.collapsed_by_default? && !@expand_all + - if diff_file.collapsed_by_default? && !expand_all? - url = url_for(params.merge(action: :diff_for_path, path: diff_file.file_path, format: nil)) .nothing-here-block.diff-collapsed{data: { diff_for_path: url } } This diff is collapsed. Click to expand it. diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 1975287faee..7b530af0f4a 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -6,6 +6,8 @@ .content-block.oneline-block.files-changed .inline-parallel-buttons + - unless expand_all? + = link_to 'Expand all', url_for(params.merge(expand: 1, format: 'html')), class: 'btn btn-default' - if show_whitespace_toggle - if current_controller?(:commit) = commit_diff_whitespace_link(@project, @commit, class: 'hidden-xs') |