app/views/plantings/_descendants.html.haml
%h2 Seeds saved
%a.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", role: "button"}
= seed_icon
= t('buttons.save_seeds')
.dropdown-menu.dropdown-secondary
- Seed::TRADABLE_TO_VALUES.each do |trade|
= link_to seeds_path(return: 'planting', seed: {crop_id: planting.crop.id, parent_planting_id: planting.id, tradable_to: trade}), method: :post, class: 'dropdown-item' do
Will trade:
= trade
- if planting.child_seeds.size.positive?
.index-cards
- planting.child_seeds.each do |seed|
= render 'seeds/card', seed: seed
- else
%p No seeds saved