##// END OF EJS Templates
Adds links to repository directories in the browser (#1094)....
Jean-Philippe Lang -
r1530:597c1e6c09f5
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
@@ -1,26 +1,18
1 1 <% @entries.each do |entry| %>
2 2 <% tr_id = Digest::MD5.hexdigest(entry.path)
3 3 depth = params[:depth].to_i %>
4 <tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry">
5 <td class="filename">
6 <%= if entry.is_dir?
7 link_to_remote h(entry.name),
8 {:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
4 <tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry <%= entry.kind %>">
5 <td style="padding-left: <%=18 * depth%>px;" class="filename">
6 <% if entry.is_dir? %>
7 <span class="expander" onclick="<%= remote_function :url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
9 8 :update => { :success => tr_id },
10 9 :position => :after,
11 10 :success => "scmEntryLoaded('#{tr_id}')",
12 :condition => "scmEntryClick('#{tr_id}')"
13 },
14 {:href => url_for({:action => 'browse', :id => @project, :path => entry.path, :rev => @rev}),
15 :class => ('icon icon-folder'),
16 :style => "margin-left: #{18 * depth}px;"
17 }
18 else
19 link_to h(entry.name),
11 :condition => "scmEntryClick('#{tr_id}')"%>">&nbsp</span>
12 <% end %>
13 <%= link_to h(entry.name),
20 14 {:action => (entry.is_dir? ? 'browse' : 'changes'), :id => @project, :path => entry.path, :rev => @rev},
21 :class => 'icon icon-file',
22 :style => "margin-left: #{18 * depth}px;"
23 end %>
15 :class => (entry.is_dir? ? 'icon icon-folder' : 'icon icon-file')%>
24 16 </td>
25 17 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
26 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>
@@ -97,6 +97,10 tr.entry td.size { text-align: right; font-size: 90%; }
97 97 tr.entry td.revision, tr.entry td.author { text-align: center; }
98 98 tr.entry td.age { text-align: right; }
99 99
100 tr.entry span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
101 tr.entry.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}
102 tr.entry.file td.filename a { margin-left: 16px; }
103
100 104 tr.changeset td.author { text-align: center; width: 15%; }
101 105 tr.changeset td.committed_on { text-align: center; width: 15%; }
102 106
General Comments 0
You need to be logged in to leave comments. Login now