summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs/_stats.html.haml
blob: 9e49716f7a70de3a96c815ee8b6b056bd660a12a (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
.js-toggle-container
  .commit-stat-summary
    Showing
    = link_to '#', class: 'js-toggle-button' do
      %strong #{pluralize(diff_files.count, "changed file")}
    with
    %strong.cgreen #{additions} additions
    and
    %strong.cred #{deletions} deletions
  .file-stats.js-toggle-content.hide
    %ul
      - diff_files.each_with_index do |diff_file, i|
        %li
          - if diff_file.deleted_file
            %span.deleted-file
              %a{href: "#diff-#{i}"}
                %i.fa.fa-minus
                = diff_file.old_path
          - elsif diff_file.renamed_file
            %span.renamed-file
              %a{href: "#diff-#{i}"}
                %i.fa.fa-minus
                = diff_file.old_path
                →
                = diff_file.new_path
          - elsif diff_file.new_file
            %span.new-file
              %a{href: "#diff-#{i}"}
                %i.fa.fa-plus
                = diff_file.new_path
          - else
            %span.edit-file
              %a{href: "#diff-#{i}"}
                %i.fa.fa-adjust
                = diff_file.new_path