2764: Add wget-friendly Collections file page.
[arvados.git] / apps / workbench / app / views / collections / show_file_links.html.erb
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <title>
6     <% if content_for? :page_title %>
7     <%= yield :page_title %> / <%= Rails.configuration.site_name %>
8     <% else %>
9     <%= Rails.configuration.site_name %>
10     <% end %>
11   </title>
12   <meta name="description" content="">
13   <meta name="author" content="">
14   <meta name="robots" content="NOINDEX">
15 </head>
16 <body>
17 <% content_for :page_title do %>
18   <%= (@object.respond_to?(:properties) ? @object.properties[:page_title] : nil) ||
19         @object.friendly_link_name %>
20 <% end %>
21
22 <% if @object.andand.files.andand.any? %>
23   <% link_opts = {controller: 'collections', action: 'show_file',
24                   uuid: @object.uuid, reader_token: params[:reader_token]} %>
25   <ul>
26   <% @object.files.map { |spec|
27        CollectionsHelper::file_path(spec)
28      }.each do |path| %>
29     <li><%= link_to(path, link_opts.merge(file: path)) %></li>
30   <% end %>
31   </ul>
32 <% else %>
33   <p>No files in this collection.</p>
34 <% end %>
35 </body>
36 </html>