>
<%
end
@opened_dirs &&= @opened_dirs.dup
@closed_dirs &&= @closed_dirs.dup
for dir in @dirs
path = dir.full_path
if @opened_dirs && @opened_dirs.delete(path)
@parent = dir
@dirs = dir.directory_nodes(:user=>@user)
@closed = @closed_dirs && @closed_dirs.delete(path)
%>
<%= render(:partial => "children") %>
<%
else
unless dir.parent
%>
<%= path.sub(/@.*$/,"") %>
<%
end
if dir.has_directory_nodes?(:user=>@user)
hash = {:url => {:action => "children", :path => path},
:loading => "progressText.start();",
:complete => "progressText.stop();"
}
image_folder = link_to_remote(
image_tag('tree/plus.gif', :id => "dir_img#{path}", :class => 'tree', :border => 0, :align => "middle"),
hash)
hash[:url][:selected] = true
link = link_to_remote(h(dir.name), hash, :class => "tree", :id => "dir_name#{path}")
else
image_folder = image_tag('tree/folder_close.gif', :id => "dir_img#{path}", :class => 'tree', :border => 0, :align => "middle")
link = link_to_function(h(dir.name), "tree.dirSelected('#{path}',true)",
:class => "tree", :id => "dir_name#{path}")
end
%>
<% unless dir.name =~ /^[.]/ %>
<%= tree_lines(dir, @user) %>
<%= image_folder %>
<%= link %>
<% end %>
<%
end
end
unless ppath == ""
%>