Sha256: 5604343effd7f68be00e8cfbeab1ba4d868ad457cd8cb44d8f143969127afa1f
Contents?: true
Size: 1.46 KB
Versions: 4
Compression:
Stored size: 1.46 KB
Contents
<% if content.essence.picture.present? %> <% img_tag = image_tag( show_alchemy_picture_url(content.essence.picture, options.merge( :size => options.delete(:image_size), :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 ).delete_if { |k,v| v.blank? || k.to_sym == :show_caption || k.to_sym == :disable_link } ), { :alt => (content.essence.alt_tag.blank? ? nil : content.essence.alt_tag), :title => (content.essence.title.blank? ? nil : content.essence.title), :class => (content.essence.css_class.blank? ? nil : content.essence.css_class) }.merge(html_options) ) %> <% if content.essence.caption.present? && options[:show_caption] %> <% caption = content_tag(:figcaption, content.essence.caption, :id => "#{dom_id(content.essence.picture)}_caption", :class => "image_caption") %> <figure> <% end %> <% if content.essence.link.blank? || options[:disable_link] %> <%= caption ? img_tag + caption : img_tag %> <% else %> <%= link_to(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 }) do %> <%= caption ? img_tag + caption : img_tag %> <% end %> <% end %> <% if caption %></figure><% end %> <% end %>
Version data entries
4 entries across 4 versions & 1 rubygems