diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 568137391..87b153b17 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -83,6 +83,7 @@ submit the change with your pull request. - Jeff Kingswood / [ancyentmariner](https://github.com/ancyentmariner) - Logan Gingerich / [logangingerich](https://github.com/logangingerich) - Mark Taffman / [mftaff](https://github.com/mftaff) +- Jennifer Kruse / [jenkr55](https://github.com/jenkr55) ## Bots diff --git a/app/assets/stylesheets/overrides.sass b/app/assets/stylesheets/overrides.sass index 6a97975fb..71dc96630 100644 --- a/app/assets/stylesheets/overrides.sass +++ b/app/assets/stylesheets/overrides.sass @@ -73,10 +73,16 @@ p.stats display: flex flex: none flex-wrap: wrap - justify-content: space-between + +.seeds-row + display: grid + grid-template-columns: 50% 50% + grid-gap: 25px + grid-row-gap: 5px .member-thumbnail padding: .25em + margin: 1em div width: 5em diff --git a/app/helpers/photos_helper.rb b/app/helpers/photos_helper.rb index b77f35bd9..6087a9c74 100644 --- a/app/helpers/photos_helper.rb +++ b/app/helpers/photos_helper.rb @@ -17,7 +17,7 @@ module PhotosHelper def planting_image_path(planting) if planting.photos.present? - planting.photos.first.thumbnail_url + planting.photos.order(date_taken: :desc).first.thumbnail_url else placeholder_image end @@ -25,9 +25,9 @@ module PhotosHelper def harvest_image_path(harvest) if harvest.photos.present? - harvest.photos.first.thumbnail_url - elsif harvest.planting.present? && harvest.planting.photos.present? - harvest.planting.photos.first.thumbnail_url + harvest.photos.order(date_taken: :desc).first.thumbnail_url + elsif harvest.planting.present? + planting_image_path(harvest.planting) else placeholder_image end diff --git a/app/views/harvests/_planting.haml b/app/views/harvests/_planting.haml index 085f24c7c..6e6ba03c2 100644 --- a/app/views/harvests/_planting.haml +++ b/app/views/harvests/_planting.haml @@ -3,7 +3,7 @@ planting_path(@harvest.planting) in = link_to @harvest.planting.garden, garden_path(@harvest.planting.garden) -- elsif @matching_plantings && @harvest.owner == current_member +- elsif @matching_plantings && @matching_plantings.any? && @harvest.owner == current_member Is this from one of these plantings? = form_for(@harvest) do |f| - @matching_plantings.each do |planting| diff --git a/app/views/seeds/index.html.haml b/app/views/seeds/index.html.haml index e7e1ec3e3..0be394edf 100644 --- a/app/views/seeds/index.html.haml +++ b/app/views/seeds/index.html.haml @@ -24,10 +24,10 @@ = page_entries_info @seeds = will_paginate @seeds -.row +.seeds-row - unless @seeds.empty? - @seeds.each do |seed| - .col-md-6 + .seedcard = render 'seeds/card', seed: seed .pagination