<%
end
when "variable"
%>
<%= link_to("Add this variable for analysis/visualization",
{:controller => "finder", :action => "add_to_list", :path => path, :type => "var"}, :class => "description") %>
<%
when "image"
url = @dl_url
%>
<%=h anc[-1][:name] %>
<%
if @type == "directory"
if @plain_file
%>
[plain file]
<% else %>
[directory]
<% end %>
<%= path %>
<% end %>
<%=h anc[-1][:title] %>
<% if @mode %>
<%= render :partial => "mode" %>
<% end %>
<% if @type == "directory" %>
Children
<% [["Directories",@directories],["Variables",@variables],["Images",@images]].each{|ntitle,nodes| %>
<%= ntitle %>
<%= nodes.collect{|dir|
link_to(dir.name, data_url(:path => dir.path.sub(/^\//,""),:format=>"html")) }.join(", ") %>
<% } %>
<% end %>
Ancestors
<%= render :partial => "ancestors" %>
<% if %w(variable image knowledge).include?(@type) %>
Link:
<%
refs = @references
l_imgs = @link_images
l_vars = @link_variables
if (refs | l_imgs | l_vars).length == 0
%>
no link
<% else %>
<% if refs.length > 0 %>
<% end %>
<% if l_imgs.length > 0 %>
Images:
<% end %>
<% if l_vars.length > 0 %>
Variables:
<% end %>
<% end %>
Linked From:
<%
refs = @referenced_by
l_klgs = @linked_knowledges
if (refs | l_klgs).length == 0
%>
no link
<% else %>
<% if refs.length > 0 %>
<% end %>
<% if l_klgs.length > 0 %>
Knowledges:
<% l_klgs.each{|klg| %>
-
<%= link_to h(klg["title"]), :controller => 'knowledge', :action => 'show', :path => klg["path"] %>
<% } %>
<% end %>
<% end %>
<% end %>