<%= link_to_confirmation_window( "", _("confirm_to_delete_image"), admin_essence_picture_path( :id => content, :options => options ), { :title => _("delete_image"), :class => "picture_delete" } ) -%> <%- if content.ingredient.nil? -%>

<%= image_tag('alchemy/placeholder.png') %>
<%= _('Image missing') %><%= '*' if content.has_validations? %>

<%- else -%>
<%= image_tag("alchemy/image_loader.gif", :alt => '') %>
<%= image_tag( thumbnail_path( :id => content.ingredient, :size => content.ingredient.cropped_thumbnail_size(content.essence.render_size.blank? ? options[:image_size] : content.essence.render_size), :crop_from => content.essence.crop_from.blank? ? nil : content.essence.crop_from, :crop_size => content.essence.crop_size.blank? ? nil : content.essence.crop_size, :crop => content.essence.crop_size.blank? && content.essence.crop_from.blank? ? 'crop' : nil ), :alt => content.ingredient.name, :class => 'img_paddingtop', :title => _("image_name") + ": #{content.ingredient.name}", :onload => "Alchemy.fadeImage(this, '##{content_dom_id(content)} .picture_content_spinner');", :style => "display: none;" ) %>
<%= hidden_field_tag content.form_field_name(:picture_id), content.ingredient.id %>
<%- end -%> <%- unless options[:css_class].blank? || content.essence.css_class.blank? -%>
<%= t("alchemy.essence_pictures.css_classes.#{content.essence.css_class}", :default => content.essence.css_class.camelcase) %>
<%- end -%>
<%= render( :partial => 'essences/essence_picture_tools', :locals => { :content => content, :options => options } ) %>
<%= hidden_field_tag content.form_field_name(:link), content.essence.link %> <%= hidden_field_tag content.form_field_name(:link_title), content.essence.link_title %> <%= hidden_field_tag content.form_field_name(:link_class_name), content.essence.link_class_name %> <%= hidden_field_tag content.form_field_name(:link_target), content.essence.link_target %>