engine/app/views/admin/theme_assets/_asset.html.haml

12 lines
609 B
Plaintext

- per_row = local_assigns[:per_row] || 6
- asset_counter = local_assigns[:asset_counter] || 0
- edit = local_assigns.key?(:edit) ? edit : true
%li{ :class => "#{asset.new_record? ? 'new-asset' : 'asset'} #{'last' if (asset_counter + 1) % per_row == 0}"}
%h4= link_to truncate(asset.slug, :length => 18), edit ? edit_admin_theme_asset_path(asset) : asset.source.url
.image
.inside
= vignette_tag(asset)
- if edit
.actions
= link_to image_tag('admin/list/icons/cross.png'), admin_theme_asset_path(asset), :class => 'remove', :confirm => t('admin.messages.confirm'), :method => :delete