Files
growstuff/app/views/crops/_find_seeds.html.haml
T
Brenda WallaceandDaniel O'Connor 75595350bc Easier recording of harvests from the front page (#5077)
* Implement AddSeedsPicker component and enhance planting selection UI; update styles and serializers for better seed management

* Enhance PlantingPicker component: add hints and titles for harvest and seed actions; update test to reflect changes in seed saving behavior

* Enhance harvest recording: allow harvesting from crops without plantings; update forms and modals for better user experience

* Refactor code structure for improved readability and maintainability

* Remove AddSeedsPicker component and its associated tests

* Add planting picker functionality for harvesting and seed saving

- Introduced PlantingPickersController to handle JSON responses for member's plantings.
- Updated HomeHelper to include crop ID in planting picker properties.
- Refactored PlantPicker and PlantSomethingModal components to support multiple gardens.
- Created PlantingFlow component to manage planting actions (harvest and save seeds).
- Implemented RecordDialog component to handle server-rendered links for harvesting and seed saving.
- Updated various views to include data attributes for triggering the record dialog.
- Added routes for planting picker and corresponding request specs for testing.
- Adjusted styles in _plantings.scss for better layout and spacing.

* Add job management features including job creation and wishlist functionality

* Remove WishlistJobsController and associated views and tests

* Add suggestion links rendering and fix routes formatting

* Refactor AddJobModal and JobPicker components to simplify props and enhance user experience

* Update seed addition test to check dialog presence and current path

* Apply suggestion from @CloCkWeRX

---------

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-26 21:38:12 +10:30

35 lines
1.7 KiB
Plaintext

-# Sidebar content: the section around it supplies the box and the heading.
-# "You have N seeds of this crop" lived in the counts list that the hero's
-# headline numbers replaced; it belongs here, with the rest of the seeds.
- if member_signed_in?
%p.mb-2= link_to display_seed_availability(current_member, crop), member_seeds_path(current_member, crop_slug: crop.slug)
- if crop.seeds.empty?
%p.text-muted There are no seeds available to trade on Growstuff right now.
- else
%ul.list-group.list-group-flush
- crop.seeds.tradable.each do |seed|
%li.list-group-item
= link_to "#{seed.owner} will trade #{seed.tradable_to}.", seed_path(seed), class: 'card-link'
.float-end= render 'members/location', member: seed.owner
%li.list-group-item.d-flex.justify-content-between.align-items-center
= link_to crop_seeds_path(crop), class: 'card-link' do
= seed_icon
View all #{crop.name} seeds
%span.badge.text-bg-primary.rounded-pill= crop.seeds.size
%ul.list-group.list-group-flush
%li.list-group-item
= link_to crop_ebay_seeds_url(crop), class: 'card-link', target: "_blank", rel: "noopener noreferrer" do
= icon 'fas', 'money-check-alt'
Purchase seeds via Ebay
- if crop.approved?
- if current_member
%li.list-group-item
= link_to new_seed_path(crop_id: crop.id), class: 'card-link', data: { record_dialog: 'seeds', crop_id: crop.id, crop_name: crop.name } do
= seed_icon
List #{crop.name} seeds to trade
- else
%li.list-group-item.list-group-item-light
= icon 'fas', 'user'
= render partial: 'shared/signin_signup', locals: { to: 'list your seeds to trade' }