app/views/caboose/blocks/_image2.html.erb in caboose-cms-0.5.225 vs app/views/caboose/blocks/_image2.html.erb in caboose-cms-0.5.226

- old
+ new

@@ -1,11 +1,6 @@ <% -Caboose.log(block.id) -image_src = block.child('image_src') -Caboose.log(image_src) -Caboose.log(image_src.media_id) - img = block.child_value('image_src') img_style = block.child_value('image_style') link = block.child_value('link') align = block.child_value('align') width = block.child_value('width') @@ -17,18 +12,11 @@ mt.downcase! if mt mr.downcase! if mr mb.downcase! if mb ml.downcase! if ml url = img ? img.url(img_style.downcase.to_sym) : nil -url = nil -if image_src && image_src.media - url = image_src.media.image.url(img_style.downcase.to_sym) -elsif img - url = img.url(img_style.downcase.to_sym) -end - img = nil alt = block.child_value('alt_text').blank? ? "" : block.child_value('alt_text') if url && !url.include?('missing.png') style = [] if align == 'Center' @@ -60,10 +48,10 @@ img = "<a href='#{link}'>#{img}</a>" end end end if editing && img.nil? - %><p id='block_<%= block.id %>'>TPlease upload an image.</p><% + %><p id='block_<%= block.id %>'>Please upload an image.</p><% else %><%= raw img %><% end %> \ No newline at end of file