From 19085ed2372e3cee6bdeda8ae49fc4746dd7b502 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 27 Jun 2019 21:54:29 +1200 Subject: [PATCH] fixed link to harvest or plantings photos --- app/views/harvests/show.html.haml | 3 ++- app/views/plantings/_photos.haml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/harvests/show.html.haml b/app/views/harvests/show.html.haml index 2e8ec3260..89587294b 100644 --- a/app/views/harvests/show.html.haml +++ b/app/views/harvests/show.html.haml @@ -49,7 +49,8 @@ .row .col-md-6= render @harvest.default_photo .col-md-6 - = link_to 'View all photos >>', planting_photos_path(@harvest), class: 'text-right' + %p.text-right + = link_to 'View all photos >>', harvest_photos_path(@harvest), class: 'btn' .row - @harvest.photos.order(date_taken: :desc).limit(3).each do |photo| .col-md-3= render('photos/thumbnail', photo: photo) \ No newline at end of file diff --git a/app/views/plantings/_photos.haml b/app/views/plantings/_photos.haml index 00141c76f..f27f2864d 100644 --- a/app/views/plantings/_photos.haml +++ b/app/views/plantings/_photos.haml @@ -3,7 +3,8 @@ = render 'photos/gallery', photos: photos - if can?(:edit, planting) && can?(:create, Photo) %p.text-right= add_photo_button(planting) - %p.text-right= link_to 'more photos', planting_photos_path(@planting), class: 'btn' + %p.text-right + = link_to 'more photos', planting_photos_path(planting), class: 'btn' - else %p No photos. - if can?(:edit, planting) && can?(:create, Photo)