2011-11-01 20:11:24 +00:00
|
|
|
#tree-breadcrumbs
|
|
|
|
%h2.icon
|
|
|
|
%span
|
|
|
|
%d
|
2011-11-16 05:38:53 +00:00
|
|
|
= link_to tree_project_ref_path(@project, @ref, :path => nil), :remote => true do
|
2011-11-25 23:42:42 +00:00
|
|
|
= @project.code
|
2011-12-12 20:12:37 +00:00
|
|
|
- tree.breadcrumbs(3) do |link|
|
2011-11-20 20:32:12 +00:00
|
|
|
\/
|
|
|
|
= link
|
|
|
|
|
2011-11-01 20:11:24 +00:00
|
|
|
.clear
|
2011-10-08 21:36:38 +00:00
|
|
|
#tree-content-holder
|
2011-11-20 20:32:12 +00:00
|
|
|
- if tree.is_blob?
|
2011-11-16 05:38:53 +00:00
|
|
|
= render :partial => "refs/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree }
|
2011-10-08 21:36:38 +00:00
|
|
|
- else
|
|
|
|
- contents = tree.contents
|
|
|
|
%table#tree-slider.round-borders
|
2011-11-01 20:11:24 +00:00
|
|
|
%thead
|
2011-10-08 21:36:38 +00:00
|
|
|
%th Name
|
|
|
|
%th Last Update
|
|
|
|
%th
|
|
|
|
Last commit
|
2011-11-20 20:32:12 +00:00
|
|
|
= link_to "history", tree.history_path, :class => "right"
|
2011-12-12 16:42:07 +00:00
|
|
|
|
2011-11-20 20:32:12 +00:00
|
|
|
- if tree.up_dir?
|
|
|
|
%tr{ :class => "tree-item", :url => tree.up_dir_path }
|
2011-10-08 21:36:38 +00:00
|
|
|
%td.tree-item-file-name
|
|
|
|
= image_tag "dir.png"
|
2011-11-20 20:32:12 +00:00
|
|
|
= link_to "..", tree.up_dir_path, :remote => :true
|
2011-10-23 07:17:57 +00:00
|
|
|
%td
|
|
|
|
%td
|
2011-10-08 21:36:38 +00:00
|
|
|
|
|
|
|
- contents.select{ |i| i.is_a?(Grit::Tree)}.each do |content|
|
2011-11-16 05:38:53 +00:00
|
|
|
= render :partial => "refs/tree_item", :locals => { :content => content }
|
2011-10-08 21:36:38 +00:00
|
|
|
- contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content|
|
2011-11-16 05:38:53 +00:00
|
|
|
= render :partial => "refs/tree_item", :locals => { :content => content }
|
2011-10-08 21:36:38 +00:00
|
|
|
|
2011-12-13 11:25:58 +00:00
|
|
|
- if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }.first
|
2011-12-12 16:42:07 +00:00
|
|
|
#tree-readme-holder
|
|
|
|
%h3= content.name
|
|
|
|
.readme
|
2011-12-13 11:25:58 +00:00
|
|
|
- if content.name =~ /\.(md|markdown)$/i
|
|
|
|
= markdown(encode content.data)
|
|
|
|
- else
|
|
|
|
= simple_format(encode content.data)
|
2011-12-12 16:42:07 +00:00
|
|
|
|
2011-10-08 21:36:38 +00:00
|
|
|
:javascript
|
|
|
|
$(function(){
|
|
|
|
$('select#branch').selectmenu({style:'popup', width:200});
|
|
|
|
$('select#tag').selectmenu({style:'popup', width:200});
|
|
|
|
});
|