debian-mirror-gitlab/app/views/projects/diffs/_content.html.haml

13 lines
567 B
Text
Raw Normal View History

2022-01-26 12:08:38 +05:30
- diff_file = local_assigns.fetch(:diff_file, nil)
2022-05-07 20:08:51 +05:30
- file_hash = hexdigest(diff_file.file_path)
2017-09-10 17:25:29 +05:30
.diff-content
2022-05-07 20:08:51 +05:30
- if diff_file.has_renderable?
%div{ id: "#raw-diff-#{file_hash}", data: { file_hash: file_hash, diff_toggle_entity: 'toHide' } }
= render 'projects/diffs/viewer', viewer: diff_file.viewer
%div{ id: "#rendered-diff-#{file_hash}", data: { file_hash: file_hash, diff_toggle_entity: 'toShow' } }
= render 'projects/diffs/viewer', viewer: diff_file.rendered.viewer
- else
= render 'projects/diffs/viewer', viewer: diff_file.viewer