Files
growstuff/app/views/gardens/_actions.html.haml
T
Brenda Wallace a0b24381ac Refactor activities to jobs across the application
- Renamed all instances of 'Activity' to 'Job' in views, controllers, and models.
- Updated routes to reflect the change from activities to jobs.
- Modified database schema to rename the activities table to jobs and adjusted related columns.
- Updated locale files to change activity-related translations to jobs.
- Adjusted tests to ensure they reference jobs instead of activities.
- Removed the category field from jobs as they are now a plain list.
- Updated seed data and sample data generation to create jobs instead of activities.
2026-10-22 17:16:25 +13:00

20 lines
1.1 KiB
Plaintext

- if can?(:edit, garden)
= actions_menu('garden') do
- if garden.active
= menu_link_to :planting, t('buttons.plant_something_here'), new_planting_path(garden_id: garden.id)
= menu_link_to :job, t('buttons.new_job'), new_job_path(garden_id: garden.id)
- if garden.nursery?
= menu_link_to :garden, t('buttons.stop_nursery'), stop_nursery_garden_path(garden), method: :post
- else
= menu_link_to :garden, t('buttons.make_nursery'), make_nursery_garden_path(garden), method: :post
= menu_link_to :archive, t('buttons.mark_as_inactive'), garden_path(garden, garden: { active: 0 }),
method: :put, data: { confirm: t('gardens.confirm_deactivate') }
- else
= menu_link_to :planting, t('buttons.mark_as_active'), garden_path(garden, garden: { active: 1 }),
method: :put
= menu_link_to :edit, t('buttons.edit'), edit_garden_path(garden)
= menu_add_photo_link(garden)
- if can?(:destroy, garden)
.dropdown-divider
= menu_delete_button(garden, message: 'gardens.confirm_delete')