debian-mirror-gitlab/app/views/projects/diffs/_stats.html.haml

37 lines
1.2 KiB
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
.js-toggle-container
.commit-stat-summary
Showing
2017-08-17 22:00:37 +05:30
%button.diff-stats-summary-toggler.js-toggle-button{ type: "button" }
%strong= pluralize(diff_files.size, "changed file")
2015-10-24 18:46:33 +05:30
with
%strong.cgreen #{diff_files.sum(&:added_lines)} additions
and
%strong.cred #{diff_files.sum(&:removed_lines)} deletions
2014-09-02 18:07:02 +05:30
.file-stats.js-toggle-content.hide
2015-09-25 12:07:36 +05:30
%ul
2017-08-17 22:00:37 +05:30
- diff_files.each do |diff_file|
- file_hash = hexdigest(diff_file.file_path)
2014-09-02 18:07:02 +05:30
%li
2015-10-24 18:46:33 +05:30
- if diff_file.deleted_file
2014-09-02 18:07:02 +05:30
%span.deleted-file
2017-08-17 22:00:37 +05:30
%a{ href: "##{file_hash}" }
2015-04-26 12:48:37 +05:30
%i.fa.fa-minus
2015-10-24 18:46:33 +05:30
= diff_file.old_path
- elsif diff_file.renamed_file
2014-09-02 18:07:02 +05:30
%span.renamed-file
2017-08-17 22:00:37 +05:30
%a{ href: "##{file_hash}" }
2015-04-26 12:48:37 +05:30
%i.fa.fa-minus
2015-10-24 18:46:33 +05:30
= diff_file.old_path
2015-04-26 12:48:37 +05:30
→
2015-10-24 18:46:33 +05:30
= diff_file.new_path
- elsif diff_file.new_file
2014-09-02 18:07:02 +05:30
%span.new-file
2017-08-17 22:00:37 +05:30
%a{ href: "##{file_hash}" }
2015-04-26 12:48:37 +05:30
%i.fa.fa-plus
2015-10-24 18:46:33 +05:30
= diff_file.new_path
2014-09-02 18:07:02 +05:30
- else
%span.edit-file
2017-08-17 22:00:37 +05:30
%a{ href: "##{file_hash}" }
2015-04-26 12:48:37 +05:30
%i.fa.fa-adjust
2015-10-24 18:46:33 +05:30
= diff_file.new_path