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

37 lines
1.1 KiB
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
.js-toggle-container
.commit-stat-summary
Showing
2015-04-26 12:48:37 +05:30
= link_to '#', class: 'js-toggle-button' do
2016-09-13 17:45:13 +05:30
%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
2015-10-24 18:46:33 +05:30
- diff_files.each_with_index do |diff_file, i|
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
%a{href: "#diff-#{i}"}
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
%a{href: "#diff-#{i}"}
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
%a{href: "#diff-#{i}"}
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
%a{href: "#diff-#{i}"}
2015-04-26 12:48:37 +05:30
%i.fa.fa-adjust
2015-10-24 18:46:33 +05:30
= diff_file.new_path
2014-09-02 18:07:02 +05:30