Commit 59c3ec4e authored by Douwe Maan's avatar Douwe Maan

Use file-type specific file icon in blame view and diff item

parent a3da3d8e
......@@ -6,7 +6,7 @@
#tree-holder.tree-holder
.file-holder
.file-title
%i.fa.fa-file
= blob_icon @blob.mode, @blob.name
%strong
= @path
%small= number_to_human_size @blob.size
......@@ -43,4 +43,3 @@
- blame_group[:lines].each do |line|
:erb
<%= highlight(@blob.name, line, nowrap: true, continue: true).html_safe %>
......@@ -2,19 +2,27 @@
.diff-header{id: "file-path-#{hexdigest(diff_file.file_path)}"}
- if diff_file.diff.submodule?
%span
= icon('archive fw')
- submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path)
%strong
= submodule_link(submodule_item, @commit.id, project.repository)
- else
%span
= blob_icon blob.mode, blob.name
= link_to "#diff-#{i}" do
%strong
= diff_file.new_path
- if diff_file.deleted_file
= "#{diff_file.old_path} deleted"
deleted
- elsif diff_file.renamed_file
= "#{diff_file.old_path} renamed to #{diff_file.new_path}"
- else
= diff_file.new_path
renamed from
%strong
= diff_file.old_path
- if diff_file.mode_changed?
%span.file-mode= "#{diff_file.diff.a_mode}#{diff_file.diff.b_mode}"
%small
= "#{diff_file.diff.a_mode}#{diff_file.diff.b_mode}"
.diff-controls
- if blob.text?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment