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