Files
growstuff/app/views/seeds/_actions.html.haml
Daniel O'Connor 7d63234841 Upgrade to bootstrap 5 (#3605)
* Upgrade boostrap

* Remove deprecated bootstrap toggles

* Migrate other details

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Avoid accidentally including bootstrap twice

* Fix spec

* Fix spec, where the size of the screen has gone to a partial breakpoint/you can't click on your own name in tablet view

* Fix spec

* Cleanup

* Cleanup
2024-03-10 11:49:22 +10:30

16 lines
809 B
Plaintext

- if can?(:edit, seed)
.dropdown.seed-actions
%a#seed-actions-button.btn.btn-info.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-bs-toggle" => "dropdown", type: "button", href: '#'}
Actions
.dropdown-menu.dropdown-menu-xs{"aria-labelledby" => "seed-actions-button"}
- if can?(:create, Planting) && can?(:update, seed) && seed.active
= link_to new_planting_path(seed_id: seed), class: 'dropdown-item success-color' do
= seed_icon
Plant seeds
= seed_edit_button(seed, classes: 'dropdown-item')
= add_photo_button(seed, classes: 'dropdown-item')
- if seed.active
= seed_finish_button(seed, classes: 'dropdown-item')
.dropdown-divider
= delete_button(seed, classes: 'dropdown-item text-danger')