2011-10-08 17:36:38 -04:00
|
|
|
- file = params[:path] ? File.join(params[:path], content.name) : content.name
|
2011-11-27 10:35:49 -05:00
|
|
|
- content_commit = @project.commits(@commit.id, file, 1).last
|
2011-10-08 17:36:38 -04:00
|
|
|
- return unless content_commit
|
2011-11-16 00:38:53 -05:00
|
|
|
%tr{ :class => "tree-item", :url => tree_file_project_ref_path(@project, @ref, file) }
|
2011-10-08 17:36:38 -04:00
|
|
|
%td.tree-item-file-name
|
|
|
|
- if content.is_a?(Grit::Blob)
|
2012-03-12 17:52:10 -04:00
|
|
|
- if content.text?
|
|
|
|
= image_tag "file_txt.png"
|
|
|
|
- elsif content.image?
|
|
|
|
= image_tag "file_img.png"
|
2012-06-03 18:37:27 -04:00
|
|
|
- else
|
2012-03-12 17:52:10 -04:00
|
|
|
= image_tag "file_bin.png"
|
2011-10-08 17:36:38 -04:00
|
|
|
- else
|
2012-03-12 17:52:10 -04:00
|
|
|
= image_tag "file_dir.png"
|
2011-11-16 00:38:53 -05:00
|
|
|
= link_to truncate(content.name, :length => 40), tree_file_project_ref_path(@project, @ref || @commit.id, file), :remote => :true
|
2012-01-17 17:04:27 -05:00
|
|
|
%td.cgray
|
2011-10-08 17:36:38 -04:00
|
|
|
= time_ago_in_words(content_commit.committed_date)
|
|
|
|
ago
|
2011-11-06 15:21:48 -05:00
|
|
|
%td.commit
|
2011-11-06 15:38:08 -05:00
|
|
|
- tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name)
|
|
|
|
- if tm
|
2012-02-27 13:51:12 -05:00
|
|
|
%strong= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
|
2012-02-14 16:48:42 -05:00
|
|
|
= link_to truncate(content_commit.safe_message, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link"
|