diff options
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r-- | app/views/projects/diffs/_content.html.haml | 10 | ||||
-rw-r--r-- | app/views/projects/diffs/_diffs.html.haml | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/views/projects/diffs/_content.html.haml b/app/views/projects/diffs/_content.html.haml index 0c0424edffd..a1b071f130c 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -8,12 +8,12 @@ - elsif blob_text_viewable?(blob) - if !project.repository.diffable?(blob) .nothing-here-block This diff was suppressed by a .gitattributes entry. + - elsif diff_file.collapsed? + - url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path)) + .nothing-here-block.diff-collapsed{data: { diff_for_path: url } } + This diff is collapsed. Click to expand it. - elsif diff_file.diff_lines.length > 0 - - if diff_file.collapsed_by_default? && !expand_all_diffs? - - url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path)) - .nothing-here-block.diff-collapsed{data: { diff_for_path: url } } - This diff is collapsed. Click to expand it. - - elsif diff_view == 'parallel' + - if diff_view == 'parallel' = render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob - else = render "projects/diffs/text_file", diff_file: diff_file diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 20aaab5accf..8ae433b4823 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -6,7 +6,7 @@ .content-block.oneline-block.files-changed .inline-parallel-buttons - - unless expand_all_diffs? + - 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' - if show_whitespace_toggle - if current_controller?(:commit) |