diff --git a/app/views/crops/_index_card.html.haml b/app/views/crops/_index_card.html.haml index 0d9180dee..92da22965 100644 --- a/app/views/crops/_index_card.html.haml +++ b/app/views/crops/_index_card.html.haml @@ -13,22 +13,22 @@ %b Scientific name: = crop.default_scientific_name - - unless crop.median_lifespan.nil? + - if crop.annual? && crop.median_lifespan.present? %p Median Lifespan %b= crop.median_lifespan days - unless crop.median_first_harvest.nil? %p - First harvest expected after + First harvest expected %b= crop.median_first_harvest - days + days after planting - - if crop.perennial == false && crop.median_last_harvest.present? + - if crop.annual? && crop.median_last_harvest.present? %p - Last harvest expected after + Last harvest expected %b= crop.median_last_harvest - days + days after planting - if can? :create, Planting = link_to 'Plant this', new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary' diff --git a/app/views/crops/_predictions.html.haml b/app/views/crops/_predictions.html.haml index 765bcc49d..47f69e9b5 100644 --- a/app/views/crops/_predictions.html.haml +++ b/app/views/crops/_predictions.html.haml @@ -12,18 +12,18 @@ - unless crop.median_lifespan.nil? %p - Median Lifespan of #{crop.name} plants is + Median lifespan of #{crop.name} plants is %b= crop.median_lifespan days - unless crop.median_first_harvest.nil? %p - First harvest expected after + First harvest expected %b= crop.median_first_harvest - days + days after planting - if crop.perennial == false && crop.median_last_harvest.present? %p - Last harvest expected after + Last harvest expected %b= crop.median_last_harvest - days + days after planting diff --git a/app/views/plantings/_progress.html.haml b/app/views/plantings/_progress.html.haml index 876259b85..d5683b9c2 100644 --- a/app/views/plantings/_progress.html.haml +++ b/app/views/plantings/_progress.html.haml @@ -1,4 +1,4 @@ -- if planting.crop.perennial +- if planting.crop.perennial == true %p Perennial - elsif !planting.planted? - if show_explanation == true diff --git a/app/views/plantings/show.html.haml b/app/views/plantings/show.html.haml index 74d0508f2..ff8a08144 100644 --- a/app/views/plantings/show.html.haml +++ b/app/views/plantings/show.html.haml @@ -54,14 +54,14 @@ %dt Expected Lifespan: %dd #{@planting.crop.median_lifespan} days - if @planting.lifespan.present? - %dt Lifespan: + %dt Actual Lifespan: %dd #{@planting.lifespan} days - if @planting.first_harvest.present? %dt First Harvest: - %dd #{@planting.first_harvest} days old + %dd #{@planting.first_harvest} days after planting - if @planting.last_harvest.present? %dt Last Harvest: - %dd #{@planting.last_harvest} days old + %dd #{@planting.last_harvest} days after planting %p= render 'plantings/harvests', planting: @planting %p= render 'plantings/progress', planting: @planting, show_explanation: true