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