mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 03:09:06 -04:00
The dialog is mounted once in the layout and any link marked data-photo-dialog opens it, naming its record in the heading. The gardens and posts menus, the old planting card and add_photo_button now use it instead of going to the new-photo page. Part of #4933 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
17 lines
783 B
Plaintext
17 lines
783 B
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, harvest)
|
|
-# 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('harvest') do
|
|
= menu_modal_link(:edit, t('buttons.edit'), '#harvest-edit-modal')
|
|
= menu_add_photo_link(harvest)
|
|
.dropdown-divider
|
|
= menu_delete_button(harvest)
|
|
|
|
-# The dialog the Edit item opens. Outside the dropdown, so it is not torn
|
|
-# down with the menu when it closes.
|
|
= render 'harvests/edit_modal', harvest: harvest
|