diff --git a/app/views/harvests/_card.html.haml b/app/views/harvests/_card.html.haml index 0d51fbb40..0d06351c9 100644 --- a/app/views/harvests/_card.html.haml +++ b/app/views/harvests/_card.html.haml @@ -1,11 +1,12 @@ -.card - = link_to harvest do - = image_tag harvest_image_path(harvest), alt: harvest, class: 'img-card' - .card-body - %h5 - = crop_icon(harvest.crop) - %strong - = link_to harvest.crop, harvest - %span.badge.badge-pill= harvest.plant_part - .card-footer - .float-right=render 'members/tiny', member: harvest.owner \ No newline at end of file +- cache harvest do + .card + = link_to harvest do + = image_tag harvest_image_path(harvest), alt: harvest, class: 'img-card' + .card-body + %h5 + = crop_icon(harvest.crop) + %strong + = link_to harvest.crop, harvest + %span.badge.badge-pill= harvest.plant_part + .card-footer + .float-right=render 'members/tiny', member: harvest.owner \ No newline at end of file diff --git a/app/views/harvests/_harvest.haml b/app/views/harvests/_harvest.haml index 7341875cf..f67725164 100644 --- a/app/views/harvests/_harvest.haml +++ b/app/views/harvests/_harvest.haml @@ -1,6 +1,4 @@ - if local_assigns[:full] - - cache harvest do - = render 'harvests/card', harvest: harvest + = render 'harvests/card', harvest: harvest - else - - cache harvest do - = render 'harvests/thumbnail', harvest: harvest \ No newline at end of file + = render 'harvests/thumbnail', harvest: harvest \ No newline at end of file diff --git a/app/views/harvests/_thumbnail.html.haml b/app/views/harvests/_thumbnail.html.haml index 8539d72d8..5dfe125c3 100644 --- a/app/views/harvests/_thumbnail.html.haml +++ b/app/views/harvests/_thumbnail.html.haml @@ -1,9 +1,10 @@ -.card.harvest-thumbnail - = link_to image_tag(harvest_image_path(harvest), - alt: harvest, - class: 'img img-card'), - harvest +- cache harvest do + .card.harvest-thumbnail + = link_to image_tag(harvest_image_path(harvest), + alt: harvest, + class: 'img img-card'), + harvest - .text - %h3.harvest-plant-part= link_to harvest.plant_part, harvest - %h5.harvest-crop= harvest.crop + .text + %h3.harvest-plant-part= link_to harvest.plant_part, harvest + %h5.harvest-crop= harvest.crop diff --git a/app/views/harvests/index.html.haml b/app/views/harvests/index.html.haml index f2a5cb044..eb485d87c 100644 --- a/app/views/harvests/index.html.haml +++ b/app/views/harvests/index.html.haml @@ -32,5 +32,6 @@ %h2 = page_entries_info @harvests = will_paginate @harvests - .index-cards=render @harvests, full: true + .index-cards + = render @harvests, full: true = will_paginate @harvests