Sha256: 6261932a3deff53bacdb4d7bc5467e44ef23b87f42657d76bf65912f2fb7973d

Contents?: true

Size: 790 Bytes

Versions: 6

Compression:

Stored size: 790 Bytes

Contents

<%= content_tag :div, :class => 'spud_media_picker_item',
  'data-id' => media.id,
  'data-type' => (media.is_image? ? 'img' : 'file'),
  'data-url' => media.attachment.url,
  'data-name' => media.attachment_file_name,
  'data-size' => media.attachment_file_size,
  'data-lastmod' => media.attachment_updated_at.blank? == false ? media.attachment_updated_at.strftime("%l:%M %p, %D") : '',
  'data-protected' => (media.is_protected ? 'Yes' : 'No') do %>
  <span class="spud_media_picker_item_thumb">
    <% if media.is_protected && media.is_image? %>
      <img src="<%= media.image_from_type %>"/>
    <% else %>
      <%= image_tag(media.image_from_type) %>
    <% end %>
  </span>
  <span class="spud_media_picker_item_filename">
    <%= media.attachment_file_name %>
  </span>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tb_media-1.0.6 app/views/admin/media_picker/_media.html.erb
tb_media-1.0.5 app/views/admin/media_picker/_media.html.erb
tb_media-1.0.4 app/views/admin/media_picker/_media.html.erb
tb_media-1.0.3 app/views/admin/media_picker/_media.html.erb
tb_media-1.0.2 app/views/admin/media_picker/_media.html.erb
tb_media-1.0.1 app/views/admin/media_picker/_media.html.erb