Orbit/app/views/admin/assets/index.html.erb

44 lines
1.3 KiB
Plaintext
Raw Normal View History

<% content_for :secondary do %>
<div class="assets_setup">
<ul class="list">
<li><%= link_to t(:new_asset, :scope => :admin), new_admin_asset_path, :class => 'button positive' %></li>
</ul>
</div>
<% end -%>
<div class="main2">
<h1><%= t('admin.list_assets') %></h1>
<table>
<thead>
<tr>
<td><%= t('admin.id') %></th>
<td><%= t('admin.file_name') %></th>
<td><%= t('admin.description') %></th>
<td><%= t('admin.format') %></th>
<td><%= t('admin.orig_upload_file') %></th>
<td><%= t('admin.file_size') %></th>
<td><%= t('admin.action') %></th>
</tr>
</thead>
<% @assets.each do |asset| %>
<tr class="have">
<td><%= asset.id %></td>
<td><div class="assets_pic"><%= image_tag(asset.data.url) %></div>
<%#= 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 class="action">
<%= link_to t(:edit), edit_admin_asset_path(asset), :class => 'edit' %>
<%= link_to t(:delete), admin_asset_path(asset), :confirm => t('sure?'), :method => :delete, :class => 'delete' %>
</td>
</tr>
<tr>
<td colspan="5"></td>
</tr>
<% end %>
</table>
</div>