<%# todo: some smart resizing for 1-3+ images %> <%# todo: lightbox on click %> <% raw_model = content.is_a?(ContentSerializer) ? content.raw_model : content %> <% raw_model.image_uploads.each do |image| %>
<%= link_to image.src(:original), class: 'z-depth-1 hoverable right', target: '_new' do %> <%= image_tag image.src(:small) %> <% end %>
Uploaded image <%= Filesize.from("#{image.src_file_size}B").to_f('KB').round(2) %> KB
<%= link_to 'Open', image.src(:original), class: 'btn white black-text', target: '_new' %> <%= link_to 'Delete', image_deletion_path(image.id), class: 'btn white black-text js-remove-image', method: 'delete', remote: true, data: { confirm: "Are you sure? This can't be undone." } %>
<% end %> <% if @basil_images.any? %> <% @basil_images.each do |commission| %>
<%= link_to commission.image, class: 'z-depth-1 hoverable right', target: '_new' do %> <%= image_tag commission.image, style: 'max-width: 100%' %> <% end %>
Generated with <%= link_to 'Basil', basil_path %> <%# Filesize.from("#{commission.image.src_file_size}B").to_f('KB').round(2) %>
<%= link_to 'Open', commission.image, class: 'btn white black-text', target: '_new' %> <%= link_to 'Delete', basil_delete_path(commission), class: 'btn white black-text js-remove-image', method: 'delete', remote: true, data: { confirm: "Are you sure? This can't be undone." } %>
<% end %> <% end %>