mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 11:21:06 -04:00
- Introduced `@other_count` in SeedsController to track in-stock and finished seeds based on the filter applied. - Enhanced SeedsHelper with new methods: `seed_owner_label`, `seed_stacks`, and `seed_choice_link` for better organization and readability. - Updated views to utilize new helper methods, improving the display of seed information and filtering options. - Adjusted the Seed model to include methods for determining if a seed's sow-by date has passed and to return the heirloom type. - Improved tests for filters and helper methods to ensure accurate functionality and coverage.
10 lines
532 B
Plaintext
10 lines
532 B
Plaintext
-# Several packets of one variety, piled up with a count on top. One packet is
|
|
-# just the packet. A pile is a React island that opens out where it stands;
|
|
-# the top packet is what shows until it loads, and without JavaScript.
|
|
- show_owner = local_assigns[:show_owner]
|
|
- if packets.one?
|
|
= render 'seeds/packet', seed: packets.first, show_owner: show_owner
|
|
- else
|
|
= react_component 'SeedStack', seed_stack_props(packets, show_owner:) do
|
|
= render 'seeds/packet', seed: packets.first, packets: packets, show_owner: show_owner
|