_stats.html.haml 1.03 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.commit-stat-summary.dropdown
  Showing
  %button.diff-stats-summary-toggler.js-diff-stats-dropdown{ type: "button", data: { toggle: "dropdown" } }<
    = pluralize(diff_files.size, "changed file")
    = icon("caret-down fw")
  with
  %strong.cgreen #{diff_files.sum(&:added_lines)} additions
  and
  %strong.cred #{diff_files.sum(&:removed_lines)} deletions
  .dropdown-menu.diff-file-changes
    = dropdown_filter("Search file")
    .dropdown-content
      %ul
        - diff_files.each do |diff_file|
          - file_hash = hexdigest(diff_file.file_path)
          - added_lines = diff_file.added_lines
          - removed_lines = diff_file.removed_lines
          %li
            %a{ href: "##{file_hash}", title: diff_file.new_path }
              = icon("#{diff_file_changed_icon(diff_file)} fw", class: "#{diff_file_changed_icon_color(diff_file)} append-right-5")
              %span.diff-file-changes-path= diff_file.new_path
              .pull-right
                %span.cgreen= "+#{added_lines}"
                %span.cred= "-#{removed_lines}"