Files
growstuff/app/views/crops/_plantings.html.haml
T
Brenda WallaceandClaude Sonnet 5.5 2374501758 Tidy the garden chooser and the crop page's "who's planted" list
The garden chooser lines names and notes up on the left and uses the shared
dialog padding. Under "who's planted" each row is the grower, then their
garden and place, without repeating the crop name, and the plant button
opens the garden chooser over the page.

Part of #4933

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 22:21:26 +13:00

26 lines
1.2 KiB
Plaintext

-# Sidebar content: the section around it supplies the box and the heading.
-# Each row is who planted it, and under that where: this is the crop's own
-# page, so the crop's name isn't repeated on every line.
- if crop.plantings.any?
%ul.list-group.list-group-flush.crop-planting-list
- crop.plantings.includes(:owner, :garden).order(planted_at: :desc).limit(5).each do |planting|
%li.list-group-item.crop-planting
= link_to planting_path(planting), class: 'crop-planting-owner' do
= planting_icon
= planting.owner
%span.crop-planting-where
= planting.garden.name
- if planting.owner.location.present?
·
= link_to planting.owner.location.truncate(24, separator: ' '), place_path(planting.owner.location)
- else
%p.text-muted Nobody has planted this crop yet.
- if crop.approved?
- if current_member
-# The dialog is rendered with the crop's actions.
%a.btn.btn-secondary.btn-sm{ href: '#', 'data-bs-toggle': 'modal', 'data-bs-target': '#modelPlantingForm' }
= menu_icon(:planting)
Plant #{crop.name}
- else
= render partial: 'shared/signin_signup', locals: { to: "track your #{crop.name} plantings" }