2017-05-08 19:52:55 -04:00
|
|
|
- show_toggle = local_assigns.fetch(:show_toggle, true)
|
|
|
|
|
|
|
|
- if show_toggle
|
|
|
|
%i.fa.diff-toggle-caret.fa-fw
|
|
|
|
|
2017-05-15 13:18:19 -04:00
|
|
|
- if diff_file.submodule?
|
2017-05-15 14:19:49 -04:00
|
|
|
- blob = diff_file.blob
|
2016-06-20 12:57:10 -04:00
|
|
|
%span
|
|
|
|
= icon('archive fw')
|
2017-03-14 13:58:52 -04:00
|
|
|
|
|
|
|
%strong.file-title-name
|
2017-05-15 14:19:49 -04:00
|
|
|
= submodule_link(blob, diff_file.content_sha, diff_file.repository)
|
2017-03-14 13:58:52 -04:00
|
|
|
|
|
|
|
= copy_file_path_button(blob.path)
|
2016-06-20 12:57:10 -04:00
|
|
|
- else
|
|
|
|
= conditional_link_to url.present?, url do
|
|
|
|
= blob_icon diff_file.b_mode, diff_file.file_path
|
|
|
|
|
2017-05-15 13:18:19 -04:00
|
|
|
- if diff_file.renamed_file?
|
2016-06-20 12:57:10 -04:00
|
|
|
- old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path)
|
2017-02-20 08:22:44 -05:00
|
|
|
%strong.file-title-name.has-tooltip{ data: { title: diff_file.old_path, container: 'body' } }
|
2016-06-20 12:57:10 -04:00
|
|
|
= old_path
|
|
|
|
→
|
2017-02-20 08:22:44 -05:00
|
|
|
%strong.file-title-name.has-tooltip{ data: { title: diff_file.new_path, container: 'body' } }
|
2016-06-20 12:57:10 -04:00
|
|
|
= new_path
|
|
|
|
- else
|
2017-05-15 13:18:19 -04:00
|
|
|
%strong.file-title-name.has-tooltip{ data: { title: diff_file.file_path, container: 'body' } }
|
|
|
|
= diff_file.file_path
|
|
|
|
|
|
|
|
- if diff_file.deleted_file?
|
2016-06-20 12:57:10 -04:00
|
|
|
deleted
|
|
|
|
|
2017-05-15 13:18:19 -04:00
|
|
|
= copy_file_path_button(diff_file.file_path)
|
2016-10-31 12:52:30 -04:00
|
|
|
|
2016-06-20 12:57:10 -04:00
|
|
|
- if diff_file.mode_changed?
|
|
|
|
%small
|
2017-01-15 11:20:13 -05:00
|
|
|
#{diff_file.a_mode} → #{diff_file.b_mode}
|
2018-01-10 06:00:33 -05:00
|
|
|
|
|
|
|
- if diff_file.stored_externally? && diff_file.external_storage == :lfs
|
2018-04-13 15:33:27 -04:00
|
|
|
%span.badge.label-lfs.append-right-5 LFS
|