BigW Consortium Gitlab

_stats.html.haml 1.2 KB
Newer Older
1 2 3
.js-toggle-container
  .commit-stat-summary
    Showing
4
    %button.diff-stats-summary-toggler.js-toggle-button{ type: "button" }
5
      %strong= pluralize(diff_files.size, "changed file")
6
    with
7
    %strong.cgreen #{diff_files.sum(&:added_lines)} additions
8
    and
9
    %strong.cred #{diff_files.sum(&:removed_lines)} deletions
10
  .file-stats.js-toggle-content.hide
11
    %ul
12 13
      - diff_files.each do |diff_file|
        - file_hash = hexdigest(diff_file.file_path)
14
        %li
15
          - if diff_file.deleted_file
16
            %span.deleted-file
17
              %a{ href: "##{file_hash}" }
18
                %i.fa.fa-minus
19 20
                = diff_file.old_path
          - elsif diff_file.renamed_file
21
            %span.renamed-file
22
              %a{ href: "##{file_hash}" }
23
                %i.fa.fa-minus
24
                = diff_file.old_path
25
                →
26 27
                = diff_file.new_path
          - elsif diff_file.new_file
28
            %span.new-file
29
              %a{ href: "##{file_hash}" }
30
                %i.fa.fa-plus
31
                = diff_file.new_path
32 33
          - else
            %span.edit-file
34
              %a{ href: "##{file_hash}" }
35
                %i.fa.fa-adjust
36
                = diff_file.new_path