2018-08-27 11:31:01 -04:00
|
|
|
- sum_added_lines = diff_files.sum(&:added_lines) # rubocop: disable CodeReuse/ActiveRecord
|
|
|
|
- sum_removed_lines = diff_files.sum(&:removed_lines) # rubocop: disable CodeReuse/ActiveRecord
|
2017-07-27 06:01:09 -04:00
|
|
|
.commit-stat-summary.dropdown
|
|
|
|
Showing
|
2018-04-23 15:30:22 -04:00
|
|
|
%button.diff-stats-summary-toggler.js-diff-stats-dropdown{ type: "button", data: { toggle: "dropdown", display: "static" } }<
|
2017-07-27 06:01:09 -04:00
|
|
|
= pluralize(diff_files.size, "changed file")
|
2017-07-28 07:11:05 -04:00
|
|
|
= icon("caret-down", class: "prepend-left-5")
|
2017-07-28 06:54:51 -04:00
|
|
|
%span.diff-stats-additions-deletions-expanded#diff-stats
|
2017-07-27 10:53:04 -04:00
|
|
|
with
|
2018-03-19 07:53:35 -04:00
|
|
|
%strong.cgreen= pluralize(sum_added_lines, 'addition')
|
2017-07-27 10:53:04 -04:00
|
|
|
and
|
2018-03-19 07:53:35 -04:00
|
|
|
%strong.cred= pluralize(sum_removed_lines, 'deletion')
|
2018-04-18 15:18:16 -04:00
|
|
|
.diff-stats-additions-deletions-collapsed.float-right.d-none.d-sm-none{ "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}
|
2017-07-27 06:01:09 -04:00
|
|
|
.dropdown-menu.diff-file-changes
|
2017-07-28 07:11:05 -04:00
|
|
|
= dropdown_filter("Search files")
|
2017-07-27 06:01:09 -04:00
|
|
|
.dropdown-content
|
|
|
|
%ul
|
|
|
|
- diff_files.each do |diff_file|
|
|
|
|
%li
|
2017-09-11 08:00:55 -04:00
|
|
|
%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")
|
2017-11-14 05:36:45 -05:00
|
|
|
%span.diff-changed-file-content.append-right-8
|
2018-01-04 13:54:34 -05:00
|
|
|
- if diff_file.blob&.name
|
|
|
|
%strong.diff-changed-file-name
|
|
|
|
= diff_file.blob.name
|
|
|
|
- else
|
|
|
|
%strong.diff-changed-blank-file-name
|
|
|
|
= s_('Diffs|No file name available')
|
2018-01-08 05:45:56 -05:00
|
|
|
%span.diff-changed-file-path.prepend-top-5= diff_file_path_text(diff_file)
|
2017-11-14 05:36:45 -05:00
|
|
|
%span.diff-changed-stats
|
2017-07-27 10:30:57 -04:00
|
|
|
%span.cgreen<
|
2017-08-01 12:56:09 -04:00
|
|
|
+#{diff_file.added_lines}
|
2017-07-27 10:30:57 -04:00
|
|
|
%span.cred<
|
2017-08-01 12:56:09 -04:00
|
|
|
\-#{diff_file.removed_lines}
|
2017-08-29 12:55:47 -04:00
|
|
|
%li.dropdown-menu-empty-item.hidden
|
|
|
|
%a
|
2018-11-20 05:38:52 -05:00
|
|
|
= _("No files found.")
|