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
31
32
|
<%= render "shared/page_actions",
:title => t(".title"),
:icon_name => "photo-plus",
:label => t(".create_asset"),
:options => [[t(".create_asset"), new_asset_path]] %>
<%= render "shared/search_form", :placeholder => t(".search_placeholder") %>
<%= will_paginate @assets %>
<table class="assets_table">
<tr class="header">
<th><%= t("admin.columns.preview") %></th>
<th><%= t("admin.columns.name") %></th>
<th><%= t("admin.columns.type") %></th>
<th></th>
<th></th>
<th></th>
</tr>
<% @assets.each do |asset| %>
<tr>
<td><% if asset.has_variant?(:thumb) %><%= image_tag asset.upload.url(:thumb), style: "max-width: 100px; max-height: 100px;" %><% end %></td>
<td><%= link_to asset.name, asset.upload.url %></td>
<td><%= asset.upload.content_type %></td>
<td><%= link_to t("admin.common.show"), asset %></td>
<td><%= link_to t("admin.common.edit"), edit_asset_path(asset) %></td>
<td><%= button_to asset, method: :delete, form: { data: { confirm: t("admin.common.confirm_sure") }, class: 'button_to destructive' } do %>
<%= icon("trash", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.destroy") %>
<% end %></td>
</tr>
<% end %>
</table>
|