_stats.html.haml 1.14 KB
Newer Older
1 2 3
.js-toggle-container
  .commit-stat-summary
    Showing
4 5
    = link_to '#', class: 'js-toggle-button' do
      %strong #{pluralize(diffs.count, "changed file")}
6 7 8 9 10 11 12
    - if current_controller?(:commit)
      - unless @commit.has_zero_stats?
        with
        %strong.cgreen #{@commit.stats.additions} additions
        and
        %strong.cred #{@commit.stats.deletions} deletions
  .file-stats.js-toggle-content.hide
13
    %ul
14 15 16 17 18
      - diffs.each_with_index do |diff, i|
        %li
          - if diff.deleted_file
            %span.deleted-file
              %a{href: "#diff-#{i}"}
19
                %i.fa.fa-minus
20 21 22 23
                = diff.old_path
          - elsif diff.renamed_file
            %span.renamed-file
              %a{href: "#diff-#{i}"}
24
                %i.fa.fa-minus
25
                = diff.old_path
26
                →
27 28 29 30
                = diff.new_path
          - elsif diff.new_file
            %span.new-file
              %a{href: "#diff-#{i}"}
31
                %i.fa.fa-plus
32 33 34 35
                = diff.new_path
          - else
            %span.edit-file
              %a{href: "#diff-#{i}"}
36
                %i.fa.fa-adjust
37 38
                = diff.new_path