Files
growstuff/app/views/plantings/_menu.html.haml
T
d19fd9657b Replace bootstrap datepicker with native HTML5 date inputs (#5057)
* Replace bootstrap datepicker with native HTML5 date inputs

Convert planting and seed date text fields to native HTML5 date fields
(`f.date_field`), matching existing date inputs across the app. Remove
bootstrap-datepicker JS/CSS imports, legacy site wrapper scripts,
package dependency, and update test specs.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Fix spec

* Fix spec

* Fix spec

* Drop expectations about removed control

* Fix specs

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-10-26 19:52:50 +10:30

21 lines
1.1 KiB
Plaintext

-# A planting's actions, for the card and for the row in a progress list: edit,
-# add photo, the state changes, then delete last under a divider.
- if can?(:edit, planting)
- slug = planting.slug
= actions_menu('planting', id: planting.id, label: "Actions for #{planting.display_name}", align: :start) do
- if local_assigns[:view]
= menu_link_to :view, t('buttons.view'), planting_path(slug:)
= menu_link_to :edit, t('buttons.edit'), edit_planting_path(slug:)
= menu_add_photo_link(planting)
- if planting.active
- if can?(:create, Harvest)
= menu_link_to :harvest, t('buttons.record_harvest'), new_planting_harvest_path(planting_slug: slug)
- unless planting.failed?
= menu_link_to :seeds, t('buttons.save_seeds'), new_planting_seed_path(planting_slug: slug)
= menu_link_to :finish, t('buttons.mark_as_finished'), planting_path(slug:, planting: { finished: 1 }),
method: :put
= menu_link_to :failed, t('buttons.mark_as_failed'), planting_path(slug:, planting: { failed: 1 }), method: :put
- if can?(:destroy, planting)
.dropdown-divider
= menu_delete_button(planting)