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

14 lines
627 B
Plaintext
Raw Normal View History

- edit = local_assigns.key?(:edit) ? edit : true
%li{ :class => (asset.new_record? ? 'new-asset' : 'asset') }
%em
%strong= link_to asset.local_path(!edit), edit ? edit_admin_theme_asset_path(asset) : asset.source.url, :'data-local-path' => asset.local_path
.more
%span.size= number_to_human_size(asset.size)
—
%span!= t('.updated_at')
%span.date= l asset.updated_at, :format => :short
- if edit && can?(:destroy, asset)
= link_to image_tag('admin/list/icons/trash.png'), admin_theme_asset_path(asset), :class => 'remove', :confirm => t('locomotive.messages.confirm'), :method => :delete