gitlab-org--gitlab-foss/app/views/projects/diffs/_stats.html.haml

37 lines
1.6 KiB
Text
Raw Normal View History

2017-07-27 10:53:04 -04:00
- sum_added_lines = diff_files.sum(&:added_lines)
- sum_removed_lines = diff_files.sum(&:removed_lines)
.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", class: "prepend-left-5")
%span.diff-stats-additions-deletions-expanded#diff-stats
2017-07-27 10:53:04 -04:00
with
%strong.cgreen #{sum_added_lines} additions
and
%strong.cred #{sum_removed_lines} deletions
.diff-stats-additions-deletions-collapsed.pull-right.hidden-xs.hidden-sm{ "aria-hidden": "true", "aria-describedby": "diff-stats" }
2017-07-27 10:53:04 -04:00
%strong.cgreen<
+#{sum_added_lines}
%strong.cred<
\-#{sum_removed_lines}
.dropdown-menu.diff-file-changes
= dropdown_filter("Search files")
.dropdown-content
%ul
- diff_files.each do |diff_file|
%li
%a.diff-changed-file{ href: "##{hexdigest(diff_file.file_path)}", title: diff_file.new_path }
2017-11-14 05:49:04 -05:00
= sprite_icon(diff_file_changed_icon(diff_file), size: 16, css_class: "#{diff_file_changed_icon_color(diff_file)} diff-file-changed-icon append-right-8")
%span.diff-changed-file-content.append-right-8
%strong.diff-changed-file-name= diff_file.blob.name
%span.diff-changed-file-path.prepend-top-5= diff_file.new_path
%span.diff-changed-stats
2017-07-27 10:30:57 -04:00
%span.cgreen<
+#{diff_file.added_lines}
2017-07-27 10:30:57 -04:00
%span.cred<
\-#{diff_file.removed_lines}
%li.dropdown-menu-empty-item.hidden
%a
No files found.