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

_diffs.html.haml « commits « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e3aa45d6344050e580f863f531ded0487d06fdce (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
.file_stats
  = render "commits/diff_head", :diffs => diffs

- diffs.each_with_index do |diff, i|
  - next if diff.diff.empty?
  - file = (@commit.tree / diff.b_path)
  - file = (@commit.prev_commit.tree / diff.a_path) unless file
  - next unless file
  .diff_file
    .diff_file_header
      - if diff.deleted_file
        %strong{:id => "#{diff.a_path}"}= diff.a_path
      - else
        = link_to tree_file_project_ref_path(@project, @commit.id, diff.b_path) do
          %strong{:id => "#{diff.b_path}"}= diff.b_path
      %br/
    .diff_file_content
      - if file.text?
        = render :partial => "commits/text_file", :locals => { :diff => diff, :index => i }
      - elsif file.image?
        .diff_file_content_image
          %img{:src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
      - else
        %p
          %center No preview for this file type