rosa-build/app/views/git/repositories/show.html.haml

50 lines
1.5 KiB
Plaintext

.block
= render :partial => "git/shared/navigation"
= render :partial => "git/shared/info"
- if @commit
.block
.content
.inner
= render :partial => "git/commits/commits", :object => [@commit]
.block
.content
.inner
%h3= render_path
%table.table.git_tree
%tr
%th.icon
%th name
%th age
%th.last message
- if @path.present?
%tr.odd
%td
%td.icon
= link_to "..", tree_path(@project, @treeish, File.join([@path, ".."].compact))
%td==  
%td.last==  
- (@tree.trees + @tree.blobs).each do |entry|
%tr{ :class => cycle("even", "odd")}
%td.icon
- if entry.is_a?(Grit::Blob)
= image_tag("git/icons/text_document_16.png")
- else
= image_tag("git/icons/folder_16.png")
%td.tree_element
- entry_path = File.join([@path.present? ? @path.encode_to_default : nil, entry.name.encode_to_default].compact)
- if entry.is_a?(Grit::Blob)
= link_to entry.name.encode_to_default,
blob_path(@project, @treeish.encode_to_default, entry_path)
- else
= link_to "#{entry.name.encode_to_default}/",
tree_path(@project, @treeish.encode_to_default, entry_path)
%td==  
%td.last==  
- content_for :sidebar, render(:partial => 'git/shared/sidebar')