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

38 lines
1.3 KiB
Text
Raw Normal View History

- if local_assigns.fetch(:show_toggle, true)
%i.fa.diff-toggle-caret.fa-fw
2017-05-15 13:18:19 -04:00
- if diff_file.submodule?
%span
= sprite_icon('archive')
2017-03-14 13:58:52 -04:00
%strong.file-title-name
= submodule_link(diff_file.blob, diff_file.content_sha, diff_file.repository)
2017-03-14 13:58:52 -04:00
= copy_file_path_button(diff_file.blob.path)
- 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?
- old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path)
%strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.old_path, container: 'body' } }
= old_path
→
%strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.new_path, container: 'body' } }
= new_path
- else
%strong.file-title-name.has-tooltip.gl-word-break-all{ data: { title: diff_file.file_path, container: 'body' } }
2017-05-15 13:18:19 -04:00
= diff_file.file_path
- if diff_file.deleted_file?
= _("deleted")
2017-05-15 13:18:19 -04:00
= copy_file_path_button(diff_file.file_path)
- if diff_file.mode_changed?
%small.gl-mr-2
#{diff_file.a_mode} → #{diff_file.b_mode}
- if diff_file.stored_externally? && diff_file.external_storage == :lfs
%span.badge.label-lfs.gl-mr-2 LFS