2014-07-15 11:28:21 -04:00
|
|
|
.js-toggle-container
|
|
|
|
.commit-stat-summary
|
|
|
|
Showing
|
2015-03-18 22:11:27 -04:00
|
|
|
= link_to '#', class: 'js-toggle-button' do
|
|
|
|
%strong #{pluralize(diffs.count, "changed file")}
|
2014-07-15 11:28:21 -04:00
|
|
|
- if current_controller?(:commit)
|
|
|
|
- unless @commit.has_zero_stats?
|
|
|
|
with
|
|
|
|
%strong.cgreen #{@commit.stats.additions} additions
|
|
|
|
and
|
|
|
|
%strong.cred #{@commit.stats.deletions} deletions
|
|
|
|
.file-stats.js-toggle-content.hide
|
2015-09-08 11:22:26 -04:00
|
|
|
%ul
|
2014-07-15 11:28:21 -04:00
|
|
|
- diffs.each_with_index do |diff, i|
|
|
|
|
%li
|
|
|
|
- if diff.deleted_file
|
|
|
|
%span.deleted-file
|
|
|
|
%a{href: "#diff-#{i}"}
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-minus
|
2014-07-15 11:28:21 -04:00
|
|
|
= diff.old_path
|
|
|
|
- elsif diff.renamed_file
|
|
|
|
%span.renamed-file
|
|
|
|
%a{href: "#diff-#{i}"}
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-minus
|
2014-07-15 11:28:21 -04:00
|
|
|
= diff.old_path
|
2015-02-20 11:55:23 -05:00
|
|
|
→
|
2014-07-15 11:28:21 -04:00
|
|
|
= diff.new_path
|
|
|
|
- elsif diff.new_file
|
|
|
|
%span.new-file
|
|
|
|
%a{href: "#diff-#{i}"}
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-plus
|
2014-07-15 11:28:21 -04:00
|
|
|
= diff.new_path
|
|
|
|
- else
|
|
|
|
%span.edit-file
|
|
|
|
%a{href: "#diff-#{i}"}
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-adjust
|
2014-07-15 11:28:21 -04:00
|
|
|
= diff.new_path
|
|
|
|
|