Merge branch 'dev' into SecondCommentButton

This commit is contained in:
Jennifer Kruse
2018-04-18 20:47:53 -05:00
committed by GitHub
5 changed files with 15 additions and 8 deletions

View File

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

View File

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

View File

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

View File

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

View File

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