blob: 780bb3404ccdbe9c6b2b2dab7231a5b0bb425dc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
- diff_file = local_assigns.fetch(:diff_file, nil)
- file_hash = hexdigest(diff_file.file_path)
.diff-content
- if diff_file.has_renderable?
.hidden{ id: "#raw-diff-#{file_hash}", data: { file_hash: file_hash, diff_toggle_entity: 'rawViewer' } }
= render 'projects/diffs/viewer', viewer: diff_file.viewer
%div{ id: "#rendered-diff-#{file_hash}", data: { file_hash: file_hash, diff_toggle_entity: 'renderedViewer' } }
= render 'projects/diffs/viewer', viewer: diff_file.rendered.viewer
- else
= render 'projects/diffs/viewer', viewer: diff_file.viewer
|