Merge branch '11901-ws-db-conns'
[arvados.git] / apps / workbench / app / views / repositories / show_tree.html.erb
1 <%= render partial: 'repository_breadcrumbs' %>
2
3 <table class="table table-condensed table-hover">
4   <thead>
5     <tr>
6       <th>File</th>
7       <th class="data-size">Size</th>
8     </tr>
9   </thead>
10   <tbody>
11     <% @subtree.each do |mode, sha1, size, subpath| %>
12       <tr>
13         <td>
14           <span style="opacity: 0.6">
15             <% pathparts = subpath.sub(/^\//, '').split('/')
16                basename = pathparts.pop
17                parents = @path
18                pathparts.each do |pathpart| %>
19               <% parents = parents + '/' + pathpart %>
20               <%= link_to pathpart, url_for(path: parents) %>
21               /
22             <% end %>
23           </span>
24           <%= link_to basename, url_for(action: :show_blob, path: parents + '/' + basename) %>
25         </td>
26         <td class="data-size">
27           <%= human_readable_bytes_html(size) %>
28         </td>
29       </tr>
30     <% end %>
31     <% if @subtree.empty? %>
32       <tr>
33         <td>
34           No files found.
35         </td>
36       </tr>
37     <% end %>
38   </tbody>
39   <tfoot></tfoot>
40 </table>