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

_file.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: 3b758a1ec4ecf22011148e50e2c4165045fef9c2 (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
.diff-file.file-holder{id: "diff-#{i}", data: diff_file_html_data(project, diff_file)}
  .file-title{id: "file-path-#{hexdigest(diff_file.file_path)}"}
    = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "#diff-#{i}"

    - unless diff_file.submodule?
      .file-actions.hidden-xs
        - if blob_text_viewable?(blob)
          = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip btn-file-option', title: "Toggle comments for this file" do
            = icon('comment')
          \

        - if editable_diff?(diff_file)
          = edit_blob_link(@merge_request.source_project,
              @merge_request.source_branch, diff_file.new_path,
              from_merge_request_id: @merge_request.id)

        = view_file_btn(diff_commit.id, diff_file, project)

  .diff-content.diff-wrap-lines
    - # Skip all non non-supported blobs
    - return unless blob.respond_to?(:text?)
    - if diff_file.too_large?
      .nothing-here-block This diff could not be displayed because it is too large.
    - elsif blob.only_display_raw?
      .nothing-here-block This file is too large to display.
    - elsif blob_text_viewable?(blob)
      - if !project.repository.diffable?(blob)
        .nothing-here-block This diff was suppressed by a .gitattributes entry.
      - elsif diff_file.diff_lines.length > 0
        - if diff_view == 'parallel'
          = render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob, index: i
        - else
          = render "projects/diffs/text_file", diff_file: diff_file, index: i
      - else
        - if diff_file.mode_changed?
          .nothing-here-block File mode changed
        - elsif diff_file.renamed_file
          .nothing-here-block File moved
    - elsif blob.image?
      - old_blob = diff_file.old_blob(diff_commit)
      = render "projects/diffs/image", diff_file: diff_file, old_file: old_blob, file: blob, index: i
    - else
      .nothing-here-block No preview for this file type