From 90ca5ec13beb42adc88fd3a5ea9dc2b005bc42d5 Mon Sep 17 00:00:00 2001 From: Shiho Takagi Date: Fri, 13 Feb 2015 23:39:31 +1100 Subject: [PATCH] added thumbnails of crops mentioned on post page --- app/views/posts/_single.html.haml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/views/posts/_single.html.haml b/app/views/posts/_single.html.haml index 8f5cc5507..e301ed76a 100644 --- a/app/views/posts/_single.html.haml +++ b/app/views/posts/_single.html.haml @@ -21,6 +21,14 @@ :growstuff_markdown #{ strip_tags post.body } + - unless post.crops.empty? + .hidden-xs + %h3 Crops mentioned in this post + - post.crops.each do |c| + - unless c.photos.empty? + .col-md-2{:style => 'padding-bottom: 6px'} + = render :partial => 'crops/image_with_popover', :locals => { :crop => c } + .col-md-11 - unless defined?(hide_comments) .post-comments %ul.list-inline