fixed link to harvest or plantings photos

This commit is contained in:
Brenda Wallace
2019-06-27 21:54:29 +12:00
parent d1e7ba701b
commit 19085ed237
2 changed files with 4 additions and 2 deletions

View File

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

View File

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