2011-10-08 21:36:38 +00:00
|
|
|
- file = params[:path] ? File.join(params[:path], content.name) : content.name
|
2012-07-10 19:52:38 +00:00
|
|
|
%tr{ :class => "tree-item file_#{Digest::SHA1.hexdigest(content.name)}", :url => tree_file_project_ref_path(@project, @ref, file) }
|
2011-10-08 21:36:38 +00:00
|
|
|
%td.tree-item-file-name
|
|
|
|
- if content.is_a?(Grit::Blob)
|
2012-03-12 21:52:10 +00:00
|
|
|
- if content.text?
|
2012-07-10 19:52:38 +00:00
|
|
|
= image_tag "file_txt.png", :class => "tree-ico"
|
2012-03-12 21:52:10 +00:00
|
|
|
- elsif content.image?
|
2012-07-10 19:52:38 +00:00
|
|
|
= image_tag "file_img.png", :class => "tree-ico"
|
2012-06-03 22:37:27 +00:00
|
|
|
- else
|
2012-07-10 19:52:38 +00:00
|
|
|
= image_tag "file_bin.png", :class => "tree-ico"
|
2011-10-08 21:36:38 +00:00
|
|
|
- else
|
2012-07-10 19:52:38 +00:00
|
|
|
= image_tag "file_dir.png", :class => "tree-ico"
|
2011-11-16 05:38:53 +00:00
|
|
|
= link_to truncate(content.name, :length => 40), tree_file_project_ref_path(@project, @ref || @commit.id, file), :remote => :true
|
2012-07-06 13:42:13 +00:00
|
|
|
%td.tree_time_ago.cgray
|
|
|
|
%td.tree_commit
|