gitlabhq/app/views/refs/_tree_item.html.haml
2012-02-14 23:48:42 +02:00

19 lines
960 B
Plaintext

- file = params[:path] ? File.join(params[:path], content.name) : content.name
- content_commit = @project.commits(@commit.id, file, 1).last
- return unless content_commit
%tr{ :class => "tree-item", :url => tree_file_project_ref_path(@project, @ref, file) }
%td.tree-item-file-name
- if content.is_a?(Grit::Blob)
= image_tag "txt.png"
- else
= image_tag "dir.png"
= link_to truncate(content.name, :length => 40), tree_file_project_ref_path(@project, @ref || @commit.id, file), :remote => :true
%td.cgray
= time_ago_in_words(content_commit.committed_date)
ago
%td.commit
- tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name)
- if tm
= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
= link_to truncate(content_commit.safe_message, :length => tm ? 30 : 50), project_commit_path(@project, content_commit.id), :class => "tree-commit-link"