Clearer message that predctions are for days after planting

This commit is contained in:
Brenda Wallace
2017-11-06 23:10:55 +13:00
parent 1e86cf7662
commit 1d64d4d1d2
4 changed files with 15 additions and 15 deletions

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
- if planting.crop.perennial
- if planting.crop.perennial == true
%p Perennial
- elsif !planting.planted?
- if show_explanation == true

View File

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