summaryrefslogtreecommitdiff
path: root/app/views/assets/index.html.erb
blob: 6591091e45abc369e6c8ad37d59c2f919efa1b7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<h1>Assets</h1>

<%= link_to 'New asset', new_asset_path, class: 'action_button' %>

<%= will_paginate @assets %>

<table class="assets_table">
  <tr class="header">
    <th>Preview</th>
    <th>Name</th>
    <th>Type</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>
<% @assets.each do |asset| %>
  <tr>
    <td><%= image_tag asset.upload.url(:thumb), style: "max-width: 100px; max-height: 100px;" %></td>
    <td><%= link_to asset.name, asset.upload.url %></td>
    <td><%= asset.upload.content_type %></td>
    <td><%= link_to 'Show', asset %></td>
    <td><%= link_to 'Edit', edit_asset_path(asset) %></td>
    <td><%= button_to 'Destroy', asset, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } %></td>
  </tr>
<% end %>
</table>