This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/assets/index.html.erb

35 lines
1.1 KiB
Plaintext

<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t(:new_asset, :scope => :admin), new_admin_asset_path, :class => 'button positive' %></li>
</ul>
<% end -%>
<h1><%= t('admin.list_assets') %></h1>
<table>
<tr>
<th><%= t('admin.id') %></th>
<th><%= t('admin.file_name') %></th>
<th><%= t('admin.description') %></th>
<th><%= t('admin.format') %></th>
<th><%= t('admin.orig_upload_file') %></th>
<th><%= t('admin.file_size') %></th>
<th><%= t('admin.action') %></th>
</tr>
<% @assets.each do |asset| %>
<tr>
<td><%= asset.id %></td>
<td><%= link_to asset.filename, asset.data.url, :target => '_blank' %></td>
<td><%= asset.description %></td>
<td><%= asset.data.file.content_type %></td>
<td><%= asset.data_filename %></td>
<td><%= number_to_human_size(asset.data.file.file_length) %></td>
<td>
<%= link_to t(:edit), edit_admin_asset_path(asset) %> |
<%= link_to t(:delete), admin_asset_path(asset), :confirm => t('sure?'), :method => :delete %>
</td>
</tr>
<% end %>
</table>