Smaller photos on crop page. Fits in the predictions data

This commit is contained in:
Brenda Wallace
2017-11-05 17:47:19 +13:00
parent b3fd8e32d0
commit 136c082003
2 changed files with 11 additions and 13 deletions

View File

@@ -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?

View File

@@ -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)