rosa-build/app/views/projects/git/trees/_show.html.haml

53 lines
1.7 KiB
Plaintext
Raw Normal View History

%h3= t("layout.projects.files_in_project")
.files
.l= render 'whereami'
= render 'fork'
.both
%table#myTable.tablesorter.project{:cellpadding => "0", :cellspacing => "0"}
%thead
%tr
%th.th1= t("layout.projects.filename")
%th.th2= t("layout.projects.age")
%th.th3= t("layout.projects.message")
%th.th4= t("layout.projects.author")
%tbody
- if @path.present?
%tr
%td
.pic= image_tag 'folder.png'
.name= link_to "..", tree_path(@project, @treeish, File.join([@path, ".."].compact))
%td==  
%td==  
%td==  
- @project.tree_info(@tree, @treeish, @path).each do |node, node_path, commit|
%tr
%td
2013-04-10 12:46:39 +01:00
- if node.is_a? Grit::Submodule
.pic= image_tag 'folder-submodule.png'
.name
- if url = submodule_url(node, @treeish)
= link_to(node.name, url, :class => 'files-see')
= '@'
= link_to(node.id[0..6], "#{url}/tree/#{node.id}", :class => 'files-see')
- else
= "#{node.name} @ #{node.id[0..6]}"
- else
2013-04-10 12:57:07 +01:00
- options = [@project, @treeish, node_path]
- if node.is_a?(Grit::Tree)
- pic = 'folder.png'
- path = tree_path *options
.pic= image_tag pic || 'code.png'
.name= link_to(node.name, path || blob_path(*options), :class => 'files-see')
2013-04-10 12:46:39 +01:00
2013-04-11 11:09:32 +01:00
- if commit
%td
%span{:style => "display: none;"}= date = commit.committed_date || commit.authored_date
= l(date, :format => :short)
%td= commit.short_message
%td= (commit.committer || commit.author).name
- else
%td
%td
%td