Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_viewer.html.haml « diffs « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 37ff03b4a593745caeea28b7cfc759fccc2ee9eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
- hidden = local_assigns.fetch(:hidden, false)

.diff-viewer{ data: { type: viewer.type }, class: ('hidden' if hidden) }
  - if viewer.render_error
    = render 'projects/diffs/render_error', viewer: viewer
  - else
    - viewer.prepare!

    -# In the rare case where the first kilobyte of the file looks like text,
    -# but the file turns out to actually be binary after loading all data,
    -# we fall back on the binary No Preview viewer.
    - viewer = DiffViewer::NoPreview.new(viewer.diff_file) if viewer.binary_detected_after_load?

    = render viewer.partial_path, viewer: viewer