gitlab-org--gitlab-foss/app/views/projects/_tree_item.html.haml

16 lines
733 B
Text
Raw Normal View History

2011-10-08 17:36:38 -04:00
- file = params[:path] ? File.join(params[:path], content.name) : content.name
- content_commit = @project.repo.log(@commit.id, file, :max_count => 1).last
2011-10-08 17:36:38 -04:00
- return unless content_commit
%tr{ :class => "tree-item", :url => tree_file_project_path(@project, @commit.id, 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_path(@project, @commit.id, file, :branch => @branch, :tag => @tag), :remote => :true
2011-10-08 17:36:38 -04:00
%td
= time_ago_in_words(content_commit.committed_date)
ago
%td
2011-10-24 15:38:03 -04:00
= link_to content_commit.truncated_message(40), project_commit_path(@project, content_commit)