2020-09-30 11:09:46 -04:00
|
|
|
- sum_added_lines = diff_files.sum(&:added_lines)
|
|
|
|
- sum_removed_lines = diff_files.sum(&:removed_lines)
|
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")
|
2020-12-07 04:09:42 -05:00
|
|
|
= sprite_icon("chevron-down", css_class: "gl-ml-2")
|
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')
|
2020-11-12 13:09:26 -05:00
|
|
|
.diff-stats-additions-deletions-collapsed.float-right.d-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 }
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon(diff_file_changed_icon(diff_file), css_class: "#{diff_file_changed_icon_color(diff_file)} diff-file-changed-icon gl-mr-3")
|
2020-06-01 11:08:16 -04:00
|
|
|
%span.diff-changed-file-content.gl-mr-3
|
2019-09-26 05:06:04 -04:00
|
|
|
- if diff_file.file_path
|
2018-01-04 13:54:34 -05:00
|
|
|
%strong.diff-changed-file-name
|
2019-09-26 05:06:04 -04:00
|
|
|
= diff_file.file_path
|
2018-01-04 13:54:34 -05:00
|
|
|
- else
|
|
|
|
%strong.diff-changed-blank-file-name
|
|
|
|
= s_('Diffs|No file name available')
|
2020-07-09 17:09:33 -04:00
|
|
|
%span.diff-changed-file-path.gl-mt-2= 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.")
|