diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 13:18:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 13:18:24 +0000 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/views/projects/diffs | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) | |
download | gitlab-ce-0653e08efd039a5905f3fa4f6e9cef9f5d2f799c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r-- | app/views/projects/diffs/_stats.html.haml | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml index 8edaacf7552..fe9658a440a 100644 --- a/app/views/projects/diffs/_stats.html.haml +++ b/app/views/projects/diffs/_stats.html.haml @@ -1,41 +1 @@ -- 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", display: "static" } }< - = pluralize(diff_files.size, "changed file") - = sprite_icon("chevron-down", css_class: "gl-ml-2") - %span.diff-stats-additions-deletions-expanded#diff-stats - with - %strong.cgreen= pluralize(sum_added_lines, 'addition') - and - %strong.cred= pluralize(sum_removed_lines, 'deletion') - .diff-stats-additions-deletions-collapsed.float-right.d-none{ "aria-hidden": "true", "aria-describedby": "diff-stats" } - %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 } - = sprite_icon(diff_file_changed_icon(diff_file), css_class: "#{diff_file_changed_icon_color(diff_file)} diff-file-changed-icon gl-mr-3") - %span.diff-changed-file-content.gl-mr-3 - - if diff_file.file_path - %strong.diff-changed-file-name - = diff_file.file_path - - else - %strong.diff-changed-blank-file-name - = s_('Diffs|No file name available') - %span.diff-changed-file-path.gl-mt-2= diff_file_path_text(diff_file) - %span.diff-changed-stats - %span.cgreen< - +#{diff_file.added_lines} - %span.cred< - \-#{diff_file.removed_lines} - %li.dropdown-menu-empty-item.hidden - %a - = _("No files found.") +.js-diff-stats-dropdown{ data: { changed: diff_files.size, added: diff_files.sum(&:added_lines), deleted: diff_files.sum(&:removed_lines), files: diff_files_data(diff_files) } } |