mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-01 18:59:13 -05:00
Rename the past gardens page to inactive gardens throughout (label, route, action, view, styles). Move its link on the gardens page to below the member's card, with a line saying what it holds, and add an explanation to the page itself. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
24 lines
1005 B
Plaintext
24 lines
1005 B
Plaintext
- crops = garden.plantings.map(&:crop).uniq
|
|
- shown = 8
|
|
.card.h-100.inactive-garden-card
|
|
= link_to garden_path(garden) do
|
|
= image_tag garden_image_path(garden), alt: "Image of #{garden.name}", class: 'card-img-top'
|
|
.card-body
|
|
%h2.h5.card-title= link_to garden.name, garden_path(garden)
|
|
%p.inactive-garden-meta= garden_history_summary(garden)
|
|
- if garden.description.present?
|
|
%p.card-text= truncate(garden.description, length: 130, separator: ' ', omission: '...')
|
|
- if crops.any?
|
|
%ul.inactive-garden-crops.list-unstyled{'aria-label': 'Grown here'}
|
|
- crops.first(shown).each do |crop|
|
|
%li
|
|
= link_to crop_path(crop) do
|
|
.chip.crop-chip
|
|
= crop_icon(crop)
|
|
= crop.name
|
|
- if crops.size > shown
|
|
%li.inactive-garden-more= "and #{crops.size - shown} more"
|
|
- if can?(:edit, garden)
|
|
.card-footer
|
|
= garden_mark_active_button(garden, classes: 'btn btn-sm btn-outline-success')
|