From 136c082003d6611ec3ee7f0676b5c794f103dad8 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 5 Nov 2017 17:47:19 +1300 Subject: [PATCH] Smaller photos on crop page. Fits in the predictions data --- app/views/crops/_index_card.html.haml | 4 +--- app/views/crops/_photos.html.haml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/app/views/crops/_index_card.html.haml b/app/views/crops/_index_card.html.haml index 6bfb95cfe..4083a72a8 100644 --- a/app/views/crops/_index_card.html.haml +++ b/app/views/crops/_index_card.html.haml @@ -13,9 +13,7 @@ %b Scientific name: = crop.default_scientific_name %p - %b - Planted - = pluralize(crop.plantings.size, "time") + %b Planted #{pluralize(crop.plantings.size, "time")} by #{ENV['GROWSTUFF_SITE_NAME']} members - unless crop.median_lifespan.nil? diff --git a/app/views/crops/_photos.html.haml b/app/views/crops/_photos.html.haml index 8bd6cf169..0d06daf3c 100644 --- a/app/views/crops/_photos.html.haml +++ b/app/views/crops/_photos.html.haml @@ -1,15 +1,15 @@ -%h2 Photos of #{crop.name} harvests -.row - - unless crop.harvest_photos.empty? - - crop.harvest_photos.includes(:owner).first(3).each do |p| - .col-md-4 +- unless crop.harvest_photos.empty? + %h3 Photos of #{crop.name} harvests + .row + - crop.harvest_photos.includes(:owner).first(6).each do |p| + .col-xs-6.col-md-2 = render "photos/thumbnail", photo: p -%h2 Photos of #{crop.name} plants -.row - - unless crop.photos.empty? - - crop.photos.includes(:owner).first(3).each do |p| - .col-md-4 +- unless crop.photos.empty? + %h3 Photos of #{crop.name} plants + .row + - crop.photos.includes(:owner).first(6).each do |p| + .col-xs-6.col-md-2 = render "photos/thumbnail", photo: p .row = link_to "more photos", crop_photos_path(crop_id: crop.id)