debian-mirror-gitlab/app/views/projects/diffs/_file_header.html.haml

32 lines
1 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
%i.fa.diff-toggle-caret.fa-fw
2016-08-24 12:49:21 +05:30
- if defined?(blob) && blob && diff_file.submodule?
%span
= icon('archive fw')
2017-08-17 22:00:37 +05:30
%strong.file-title-name
2016-08-24 12:49:21 +05:30
= submodule_link(blob, diff_commit.id, project.repository)
2017-08-17 22:00:37 +05:30
= copy_file_path_button(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
- if diff_file.renamed_file
- old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path)
2017-08-17 22:00:37 +05:30
%strong.file-title-name.has-tooltip{ data: { title: diff_file.old_path, container: 'body' } }
2016-08-24 12:49:21 +05:30
= old_path
→
2017-08-17 22:00:37 +05:30
%strong.file-title-name.has-tooltip{ data: { title: diff_file.new_path, container: 'body' } }
2016-08-24 12:49:21 +05:30
= new_path
- else
2017-08-17 22:00:37 +05:30
%strong.file-title-name.has-tooltip{ data: { title: diff_file.new_path, container: 'body' } }
2016-08-24 12:49:21 +05:30
= diff_file.new_path
- if diff_file.deleted_file
deleted
2017-08-17 22:00:37 +05:30
= copy_file_path_button(diff_file.new_path)
2016-08-24 12:49:21 +05:30
- if diff_file.mode_changed?
%small
2017-08-17 22:00:37 +05:30
#{diff_file.a_mode} → #{diff_file.b_mode}