Sha256: 5e32e0408a7dc91818547e2845395bd0f284ef0a126513a28da3a87d7ad801ab
Contents?: true
Size: 1.9 KB
Versions: 7
Compression:
Stored size: 1.9 KB
Contents
<%- unless content.essence.picture.nil? -%> <%- img_tag = image_tag( alchemy.show_picture_path( :id => content.essence.picture.id, :name => content.essence.picture.urlname, :size => options[:image_size], :crop => options[:crop] ? 'crop' : nil, :crop_from => options[:crop] && !content.essence.crop_from.blank? ? content.essence.crop_from : nil, :crop_size => options[:crop] && !content.essence.crop_size.blank? ? content.essence.crop_size : nil, :upsample => options[:upsample], :padding => options[:padding], :format => options[:format], :effects => options[:effects].blank? ? nil : options[:effects] ), { :alt => (content.essence.alt_tag.blank? ? nil : content.essence.alt_tag), :title => (content.essence.title.blank? ? nil : content.essence.title), :id => dom_id(content.essence.picture), :style => (options[:crop] && !options[:image_size].blank?) || (!options[:crop] && options[:image_size].blank?) ? "width: #{options[:image_size].blank? ? content.essence.picture.image_width : options[:image_size].split('x')[0]}px; height: #{options[:image_size].blank? ? content.essence.picture.image_height : options[:image_size].split('x')[1]}px" : nil }.merge(html_options) ) -%> <%- caption = (content_tag("div", content.essence.caption, :id => "#{dom_id(content.essence.picture)}_caption", :class => "image_caption") unless (options[:show_caption] == false)) -%> <%- if content.essence.link.blank? || options[:disable_link] -%> <%= img_tag %> <%- unless content.essence.caption.blank? -%> <%= caption %> <%- end -%> <%- else -%> <%= link_to( content.essence.caption.blank? || options[:show_caption] == false ? img_tag : img_tag + caption, url_for(content.essence.link), :title => content.essence.link_title, :target => (content.essence.link_target == "blank" ? "_blank" : nil), 'data-link-target' => content.essence.link_target ) %> <%- end -%> <%- end -%>
Version data entries
7 entries across 7 versions & 1 rubygems