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

_replaced_image_diff.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: 1f9533ade832fe24edd9847b2d6cab203f6af9c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
- blob = diff_file.blob
- old_blob = diff_file.old_blob
- blob_raw_url = diff_file_blob_raw_url(diff_file)
- old_blob_raw_url = diff_file_old_blob_raw_url(diff_file)
- click_to_comment = local_assigns.fetch(:click_to_comment, true)
- diff_view_data = local_assigns.fetch(:diff_view_data, '')
- class_name = ''

- if click_to_comment
  - class_name = 'js-add-image-diff-note-button click-to-comment'

.image.js-replaced-image{ data: diff_view_data }
  .two-up.view
    .wrap
      .frame.deleted
        = image_tag(old_blob_raw_url, alt: diff_file.old_path, lazy: false)
      %p.image-info.gl-display-none
        %span.meta-filesize= number_to_human_size(old_blob.size)
        |
        %strong W:
        %span.meta-width
        |
        %strong H:
        %span.meta-height
    .wrap
      = render partial: "projects/diffs/image_diff_frame", locals: { class_name: "added js-image-frame #{class_name}", position: position, note_type: DiffNote.name, image_path: blob_raw_url, alt: diff_file.new_path }
      %p.image-info.gl-display-none
        %span.meta-filesize= number_to_human_size(blob.size)
        |
        %strong W:
        %span.meta-width
        |
        %strong H:
        %span.meta-height

  .swipe.view.gl-display-none
    .swipe-frame
      .frame.deleted.old-diff
        = image_tag(old_blob_raw_url, alt: diff_file.old_path, lazy: false)
      .swipe-wrap.left-oriented
        = render partial: "projects/diffs/image_diff_frame", locals: { class_name: "added old-diff js-image-frame #{class_name}", position: position, note_type: DiffNote.name, image_path: blob_raw_url, alt: diff_file.new_path }
      %span.swipe-bar
        %span.top-handle
        %span.bottom-handle

  .onion-skin.view.gl-display-none
    .onion-skin-frame
      .frame.deleted
        = image_tag(old_blob_raw_url, alt: diff_file.old_path, lazy: false)
      = render partial: "projects/diffs/image_diff_frame", locals: { class_name: "added js-image-frame #{class_name}", position: position, note_type: DiffNote.name, image_path: blob_raw_url, alt: diff_file.new_path }
      .controls
        .transparent
        .drag-track
          .dragger{ :style => "left: 0px;" }
        .opaque

.view-modes.gl-display-none
  %ul.view-modes-menu
    %li.two-up{ data: { mode: 'two-up' } } 2-up
    %li.swipe{ data: { mode: 'swipe' } } Swipe
    %li.onion-skin{ data: { mode: 'onion-skin' } } Onion skin