Integration of pop-up and generic js.erb

This commit is contained in:
chris2tof committed 2011-12-28 20:49:53 +08:00
1 parent 62aaf79491
commit 245def9cb6
14 files changed
+1613 -54

No files matched your search

+15 -31
View File
@@ -1,7 +1,7 @@
<% 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>
<li><%= link_to t(:new_asset, :scope => :admin), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
</ul>
</div>
<% end -%>
@@ -10,35 +10,19 @@
<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 %>
<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>
<tbody id='asset_tbody'>
<%= render :partial => 'asset', :collection => @assets %>
<tbody>
</table>
</div>