mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-11 01:05:01 -04:00
23 lines
777 B
Plaintext
23 lines
777 B
Plaintext
%h2 Previously planted in this garden
|
|
|
|
- if @finished_plantings.any?
|
|
- year = nil
|
|
- @finished_plantings.where.not(planted_at: nil).order(planted_at: :desc).each do |planting|
|
|
- if year != planting.planted_at.year
|
|
- year = planting.planted_at.year
|
|
%h4= year
|
|
= render "plantings/tiny", planting: planting
|
|
|
|
- if @finished_plantings.where(planted_at: nil).any?
|
|
%h4 Unknown year
|
|
- @finished_plantings.where(planted_at: nil).each do |planting|
|
|
= render "plantings/tiny", planting: planting
|
|
- else
|
|
.col-md-12
|
|
%p Nothing has been planted here.
|
|
|
|
- if @finished_activities&.size&.positive?
|
|
%h2 Finished activities in garden
|
|
.index-cards
|
|
- @finished_activities.each do |activity|
|
|
= render "activities/card", activity: activity |