debian-mirror-gitlab/app/views/projects/diffs/_content.html.haml
2023-06-20 00:43:36 +05:30

12 lines
604 B
Text

- diff_file = local_assigns.fetch(:diff_file, nil)
- file_hash = hexdigest(diff_file.file_path)
.diff-content.gl-rounded-bottom-base
- 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