From 758b705b642dcb4a23ad200fb6f3e2f9262ceb48 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Fri, 14 Mar 2014 16:30:34 +1100 Subject: [PATCH] Removing non-existent images --- app/views/shop/shop/_modals.html.haml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/app/views/shop/shop/_modals.html.haml b/app/views/shop/shop/_modals.html.haml index 9567663d6e..d54822306b 100644 --- a/app/views/shop/shop/_modals.html.haml +++ b/app/views/shop/shop/_modals.html.haml @@ -1,31 +1,38 @@ - for producer in @producers .reveal-modal{id: "producer_details_#{producer.id}"} .row - .large-1.columns - %img.left{src: producer.logo.url(:thumb)} + - if producer.logo.exists? + .large-1.columns + %img.left{src: producer.logo.url(:thumb)} .large-11.columns %h2 = producer.name .row .large-8.columns = producer.long_description.andand.html_safe - .large-4.columns - %img.about.right{src: producer.promo_image.url(:large)} + + - if producer.promo_image.exists? + .large-4.columns + %img.about.right{src: producer.promo_image.url(:large)} %a.close-reveal-modal × + + - for group in @groups - for sibling in group.enterprises.except(current_distributor) .reveal-modal{id: "sibling_details_#{sibling.id}"} .row - .large-1.columns - %img.left{src: sibling.logo.url(:thumb)} + - if sibling.logo.exists? + .large-1.columns + %img.left{src: sibling.logo.url(:thumb)} .large-11.columns %h2 = sibling.name .row .large-8.columns = sibling.long_description.andand.html_safe - .large-4.columns - %img.about.right{src: sibling.promo_image.url(:large)} + - if sibling.promo_image.exists? + .large-4.columns + %img.about.right{src: sibling.promo_image.url(:large)} %a.close-reveal-modal ×