2021-01-29 00:20:46 +05:30
|
|
|
- if local_assigns.fetch(:show_toggle, true)
|
2021-02-22 17:27:13 +05:30
|
|
|
%span.diff-toggle-caret
|
|
|
|
= sprite_icon('chevron-right', css_class: 'chevron-right gl-display-none')
|
|
|
|
= sprite_icon('chevron-down', css_class: 'chevron-down gl-display-none')
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
- if diff_file.submodule?
|
2016-08-24 12:49:21 +05:30
|
|
|
%span
|
2021-01-03 14:25:43 +05:30
|
|
|
= sprite_icon('archive')
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
%strong.file-title-name
|
2021-01-29 00:20:46 +05:30
|
|
|
= submodule_link(diff_file.blob, diff_file.content_sha, diff_file.repository)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
= copy_file_path_button(diff_file.blob.path)
|
2016-08-24 12:49:21 +05:30
|
|
|
- else
|
|
|
|
= conditional_link_to url.present?, url do
|
|
|
|
= blob_icon diff_file.b_mode, diff_file.file_path
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
- if diff_file.renamed_file?
|
2016-08-24 12:49:21 +05:30
|
|
|
- old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path)
|
2021-01-29 00:20:46 +05:30
|
|
|
%strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.old_path, container: 'body' } }
|
2016-08-24 12:49:21 +05:30
|
|
|
= old_path
|
|
|
|
→
|
2021-01-29 00:20:46 +05:30
|
|
|
%strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.new_path, container: 'body' } }
|
2016-08-24 12:49:21 +05:30
|
|
|
= new_path
|
|
|
|
- else
|
2021-01-29 00:20:46 +05:30
|
|
|
%strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.file_path, container: 'body' } }
|
2017-09-10 17:25:29 +05:30
|
|
|
= diff_file.file_path
|
|
|
|
|
|
|
|
- if diff_file.deleted_file?
|
2019-02-15 15:39:39 +05:30
|
|
|
= _("deleted")
|
2016-08-24 12:49:21 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
= copy_file_path_button(diff_file.file_path)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2016-08-24 12:49:21 +05:30
|
|
|
- if diff_file.mode_changed?
|
2021-01-29 00:20:46 +05:30
|
|
|
%small.gl-mr-2
|
2017-08-17 22:00:37 +05:30
|
|
|
#{diff_file.a_mode} → #{diff_file.b_mode}
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
- if diff_file.stored_externally? && diff_file.external_storage == :lfs
|
2020-07-28 23:09:34 +05:30
|
|
|
%span.badge.label-lfs.gl-mr-2 LFS
|