|
@@
-1,26
+1,18
|
|
1
|
<% @entries.each do |entry| %>
|
|
1
|
<% @entries.each do |entry| %>
|
|
2
|
<% tr_id = Digest::MD5.hexdigest(entry.path)
|
|
2
|
<% tr_id = Digest::MD5.hexdigest(entry.path)
|
|
3
|
depth = params[:depth].to_i %>
|
|
3
|
depth = params[:depth].to_i %>
|
|
4
|
<tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry">
|
|
4
|
<tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry <%= entry.kind %>">
|
|
5
|
<td class="filename">
|
|
5
|
<td style="padding-left: <%=18 * depth%>px;" class="filename">
|
|
6
|
<%= if entry.is_dir?
|
|
6
|
<% if entry.is_dir? %>
|
|
7
|
link_to_remote h(entry.name),
|
|
7
|
<span class="expander" onclick="<%= remote_function :url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
|
|
8
|
{:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
|
|
|
|
|
9
|
:update => { :success => tr_id },
|
|
8
|
:update => { :success => tr_id },
|
|
10
|
:position => :after,
|
|
9
|
:position => :after,
|
|
11
|
:success => "scmEntryLoaded('#{tr_id}')",
|
|
10
|
:success => "scmEntryLoaded('#{tr_id}')",
|
|
12
|
:condition => "scmEntryClick('#{tr_id}')"
|
|
11
|
:condition => "scmEntryClick('#{tr_id}')"%>"> </span>
|
|
13
|
},
|
|
12
|
<% end %>
|
|
14
|
{:href => url_for({:action => 'browse', :id => @project, :path => entry.path, :rev => @rev}),
|
|
13
|
<%= link_to h(entry.name),
|
|
15
|
:class => ('icon icon-folder'),
|
|
|
|
|
16
|
:style => "margin-left: #{18 * depth}px;"
|
|
|
|
|
17
|
}
|
|
|
|
|
18
|
else
|
|
|
|
|
19
|
link_to h(entry.name),
|
|
|
|
|
20
|
{:action => (entry.is_dir? ? 'browse' : 'changes'), :id => @project, :path => entry.path, :rev => @rev},
|
|
14
|
{:action => (entry.is_dir? ? 'browse' : 'changes'), :id => @project, :path => entry.path, :rev => @rev},
|
|
21
|
:class => 'icon icon-file',
|
|
15
|
:class => (entry.is_dir? ? 'icon icon-folder' : 'icon icon-file')%>
|
|
22
|
:style => "margin-left: #{18 * depth}px;"
|
|
|
|
|
23
|
end %>
|
|
|
|
|
24
|
</td>
|
|
16
|
</td>
|
|
25
|
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
|
|
17
|
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
|
|
26
|
<td class="revision"><%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td>
|
|
18
|
<td class="revision"><%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td>
|