blob: 8c355617071f2c4898f5b2458536c6ef2d86d867 (
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
27
28
29
30
|
<h1>Assets</h1>
<%= link_to new_asset_path, class: 'action_button' do %>
<%= icon("plus", library: "tabler", "aria-hidden": true) %> Create asset
<% end %>
<%= 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 asset, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } do %>
<%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
<% end %></td>
</tr>
<% end %>
</table>
|