mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 03:09:06 -04:00
24 lines
1.2 KiB
Plaintext
24 lines
1.2 KiB
Plaintext
-# The same three-dot kebab as every other record page, in the top right of
|
|
-# the hero. Each item carries a green line icon; delete is red.
|
|
- if can?(:edit, seed)
|
|
-# One flex item, not three: this sits in the hero's justify-content-between
|
|
-# row, and a loose modal or island beside the dropdown would be distributed
|
|
-# across the row and drag the kebab in off the right edge.
|
|
.record-actions
|
|
= actions_menu('seed') do
|
|
= menu_modal_link(:edit, t('buttons.edit'), '#seed-edit-modal')
|
|
= menu_add_photo_link(seed)
|
|
- PhotoAssociation::LABELS['Seed'].each do |side|
|
|
= menu_add_photo_link(seed, text: t("seeds.packet.photo_#{side}"), label: side)
|
|
- if can?(:create, Planting) && can?(:update, seed) && seed.active
|
|
= menu_link_to :planting, 'Plant seeds', new_planting_path(seed_id: seed)
|
|
- if can?(:create, Planting) && seed.active
|
|
= menu_link_to :finish, t('buttons.mark_as_finished'), seed_path(seed, seed: { finished: 1 }),
|
|
method: :put
|
|
.dropdown-divider
|
|
= menu_delete_button(seed)
|
|
|
|
-# The dialog the Edit item opens. Outside the dropdown, so it is not torn
|
|
-# down with the menu when it closes.
|
|
= render 'seeds/edit_modal', seed: seed
|