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

31 lines
860 B
Plaintext

<h1>Listing assets</h1>
<table>
<tr>
<th>檔案</th>
<th>描述</th>
<th>格式</th>
<th>原上傳檔名</th>
<th>檔案大小</th>
<th></th>
<th></th>
</tr>
<% @assets.each do |asset| %>
<tr>
<td><%#= link_to asset.filename, admin_asset_path(asset) %>
<%= link_to asset.url, asset.url %>
</td>
<td><%= asset.description %></td>
<td><%= asset.data.content_type %></td>
<td><%= asset.data.file_name %></td>
<td><%= number_to_human_size(asset.data.file_size) %></td>
<td><%= link_to t(:edit), edit_admin_asset_path(asset) %></td>
<td><%= link_to t(:delete), admin_asset_path(asset), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to t(:new_asset, :scope => :admin), new_admin_asset_path, :class => 'button positive' %>