2017-05-15 14:19:49 -04:00
|
|
|
- blob = diff_file.blob
|
2017-05-15 13:18:19 -04:00
|
|
|
|
|
|
|
.diff-content
|
2016-06-28 12:25:32 -04:00
|
|
|
- if diff_file.too_large?
|
|
|
|
.nothing-here-block This diff could not be displayed because it is too large.
|
2017-05-26 19:27:30 -04:00
|
|
|
- elsif blob.truncated?
|
2017-04-13 13:19:50 -04:00
|
|
|
.nothing-here-block The file could not be displayed because it is too large.
|
2017-04-13 12:57:43 -04:00
|
|
|
- elsif blob.readable_text?
|
2017-06-06 17:24:32 -04:00
|
|
|
- if !diff_file.diffable?
|
2016-06-28 12:25:32 -04:00
|
|
|
.nothing-here-block This diff was suppressed by a .gitattributes entry.
|
2016-07-15 03:04:18 -04:00
|
|
|
- elsif diff_file.collapsed?
|
2016-11-10 12:24:12 -05:00
|
|
|
- url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path, file_identifier: diff_file.file_identifier))
|
2016-12-26 05:47:16 -05:00
|
|
|
.nothing-here-block.diff-collapsed{ data: { diff_for_path: url } }
|
2016-09-02 10:26:45 -04:00
|
|
|
This diff is collapsed.
|
|
|
|
%a.click-to-expand
|
|
|
|
Click to expand it.
|
2016-06-28 12:25:32 -04:00
|
|
|
- elsif diff_file.diff_lines.length > 0
|
2017-05-15 14:19:49 -04:00
|
|
|
= render "projects/diffs/viewers/text", diff_file: diff_file
|
2016-06-28 12:25:32 -04:00
|
|
|
- else
|
|
|
|
- if diff_file.mode_changed?
|
|
|
|
.nothing-here-block File mode changed
|
2017-05-15 13:10:29 -04:00
|
|
|
- elsif diff_file.renamed_file?
|
2016-06-28 12:25:32 -04:00
|
|
|
.nothing-here-block File moved
|
|
|
|
- elsif blob.image?
|
2017-05-15 14:19:49 -04:00
|
|
|
= render "projects/diffs/viewers/image", diff_file: diff_file
|
2016-06-28 12:25:32 -04:00
|
|
|
- else
|
|
|
|
.nothing-here-block No preview for this file type
|