##// 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
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -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}')"%>">&nbsp</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>
@@ -97,6 +97,10 tr.entry td.size { text-align: right; font-size: 90%; }
97 tr.entry td.revision, tr.entry td.author { text-align: center; }
97 tr.entry td.revision, tr.entry td.author { text-align: center; }
98 tr.entry td.age { text-align: right; }
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 tr.changeset td.author { text-align: center; width: 15%; }
104 tr.changeset td.author { text-align: center; width: 15%; }
101 tr.changeset td.committed_on { text-align: center; width: 15%; }
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