gitlab-org--gitlab-foss/app/views/projects/diffs/_stats.html.haml

38 lines
1.2 KiB
Text
Raw Normal View History

.js-toggle-container
.commit-stat-summary
Showing
2015-03-18 22:11:27 -04:00
= link_to '#', class: 'js-toggle-button' do
%strong #{pluralize(diff_files.size, "changed file")}
with
%strong.cgreen #{diff_files.sum(&:added_lines)} additions
and
%strong.cred #{diff_files.sum(&:removed_lines)} deletions
.file-stats.js-toggle-content.hide
%ul
- diff_files.each do |diff_file|
- file_hash = hexdigest(diff_file.file_path)
%li
- if diff_file.deleted_file
%span.deleted-file
%a{href: "##{file_hash}"}
2014-10-01 18:21:29 -04:00
%i.fa.fa-minus
= diff_file.old_path
- elsif diff_file.renamed_file
%span.renamed-file
%a{href: "##{file_hash}"}
2014-10-01 18:21:29 -04:00
%i.fa.fa-minus
= diff_file.old_path
→
= diff_file.new_path
- elsif diff_file.new_file
%span.new-file
%a{href: "##{file_hash}"}
2014-10-01 18:21:29 -04:00
%i.fa.fa-plus
= diff_file.new_path
- else
%span.edit-file
%a{href: "##{file_hash}"}
2014-10-01 18:21:29 -04:00
%i.fa.fa-adjust
= diff_file.new_path