Move show-object content into tabs.
[arvados.git] / apps / workbench / app / views / collections / _show_files.html.erb
1 <table class="table table-bordered" style="table-layout: fixed">
2   <thead>
3     <tr>
4       <th>path</th>
5       <th>file</th>
6       <th style="width:1.5em">d/l</th>
7       <th style="width: 7em; text-align:right">size</th>
8     </tr>
9   </thead><tbody>
10     <% if @object then @object.files.sort_by{|f|f[1]}.each do |file| %>
11     <% file_path = "#{file[0]}/#{file[1]}" %>
12     <tr>
13       <td>
14         <%= file[0] %>
15       </td>
16
17       <td>
18         <%= link_to file[1], {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, {title: 'View in browser'} %>
19       </td>
20
21       <td>
22         <div style="display:inline-block">
23           <%= link_to raw('<i class="icon-download"></i>'), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'attachment'}, {class: 'label label-info', title: 'Download'} %>
24         </div>
25       </td>
26
27       <td style="text-align:right">
28         <%= raw(human_readable_bytes_html(file[2])) %>
29       </td>
30
31     </tr>
32     <% end; end %>
33   </tbody>
34 </table>