2018-12-05 23:21:45 +05:30
|
|
|
- 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-09-10 17:25:29 +05:30
|
|
|
.commit-stat-summary.dropdown
|
|
|
|
Showing
|
2018-11-08 19:23:39 +05:30
|
|
|
%button.diff-stats-summary-toggler.js-diff-stats-dropdown{ type: "button", data: { toggle: "dropdown", display: "static" } }<
|
2017-09-10 17:25:29 +05:30
|
|
|
= pluralize(diff_files.size, "changed file")
|
2020-07-28 23:09:34 +05:30
|
|
|
= icon("caret-down", class: "gl-ml-2")
|
2017-09-10 17:25:29 +05:30
|
|
|
%span.diff-stats-additions-deletions-expanded#diff-stats
|
2015-10-24 18:46:33 +05:30
|
|
|
with
|
2018-05-09 12:01:36 +05:30
|
|
|
%strong.cgreen= pluralize(sum_added_lines, 'addition')
|
2015-10-24 18:46:33 +05:30
|
|
|
and
|
2018-05-09 12:01:36 +05:30
|
|
|
%strong.cred= pluralize(sum_removed_lines, 'deletion')
|
2018-11-08 19:23:39 +05:30
|
|
|
.diff-stats-additions-deletions-collapsed.float-right.d-none.d-sm-none{ "aria-hidden": "true", "aria-describedby": "diff-stats" }
|
2017-09-10 17:25:29 +05:30
|
|
|
%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
|
2018-03-17 18:26:18 +05:30
|
|
|
%a.diff-changed-file{ href: "##{hexdigest(diff_file.file_path)}", title: diff_file.new_path }
|
2020-10-24 23:57:45 +05:30
|
|
|
= 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-23 00:09:42 +05:30
|
|
|
%span.diff-changed-file-content.gl-mr-3
|
2019-12-21 20:55:43 +05:30
|
|
|
- if diff_file.file_path
|
2018-03-17 18:26:18 +05:30
|
|
|
%strong.diff-changed-file-name
|
2019-12-21 20:55:43 +05:30
|
|
|
= diff_file.file_path
|
2018-03-17 18:26:18 +05:30
|
|
|
- else
|
|
|
|
%strong.diff-changed-blank-file-name
|
|
|
|
= s_('Diffs|No file name available')
|
2020-07-28 23:09:34 +05:30
|
|
|
%span.diff-changed-file-path.gl-mt-2= diff_file_path_text(diff_file)
|
2018-03-17 18:26:18 +05:30
|
|
|
%span.diff-changed-stats
|
2017-09-10 17:25:29 +05:30
|
|
|
%span.cgreen<
|
|
|
|
+#{diff_file.added_lines}
|
|
|
|
%span.cred<
|
|
|
|
\-#{diff_file.removed_lines}
|
2018-03-17 18:26:18 +05:30
|
|
|
%li.dropdown-menu-empty-item.hidden
|
|
|
|
%a
|
2019-02-15 15:39:39 +05:30
|
|
|
= _("No files found.")
|