Files
growstuff/app/views/gardens/_card.html.haml
Daniel O'Connor 5be0153c74 Activities (#3646)
* Implement activities

* Add activities to timeline

* Add factory

* Add coverage

* Fix misc issues

* Activities display

* Add activities to garden and plantings

* Add activities to garden and plantings

* Add planting

* Add to planting, harvest show

* More CRUD

* More CRUD

* index

* index

* Extract card view

* Permissions

* Add edit

* Remove workaround fro vs code

* Fix title

* CSV

* CSV

* Add RSS, ical

* Extend ical slightly

* Cleanup

* Rubocop

* Remove doubled form

* Change icon

* Fix short description

* Add menus

* Put homepage widget in

* Add activity icon - MIT licenced - https://www.svgrepo.com/svg/336823/plan

* Naming

* Missing files

* Revert VS Code lag induced change

* Update app/views/home/_harvests.html.haml

* Update activities_controller.rb

* Update activities_controller.rb

* Update app/controllers/activities_controller.rb

* Update index.html.haml

* Apply suggestions from code review

* Apply suggestions from code review

* Typo

* Translation

* Apply suggestions from code review

* Update app/views/plantings/index.ics.erb

* Update app/models/activity.rb

* Update plantings_spec.rb

* Update plantings_spec.rb

* We are now rendering an extra event, so check the next one for the old behaviour
2024-03-10 11:36:24 +10:30

38 lines
1013 B
Plaintext

.card
.card-header
.row
.col-12.col-md-3
%h2= link_to garden.name, garden, name: "garden-#{garden.id}"
.row
.col-md-3
- if @owner.blank?
owner:
= render 'members/tiny', member: garden.owner
= image_tag garden_image_path(garden), alt: garden.name, class: 'img-card'
.col-md-9
%section
= render 'gardens/actions', garden: garden
- active_plantings = garden.plantings.active
%section
- if active_plantings.perennial.any?
%strong Perennials:
- active_plantings.perennial.each do |planting|
= link_to planting do
= crop_icon planting.crop
= planting.crop
- else
%p No perennial plantings
%hr
%section
- if active_plantings.annual.any?
= render 'plantings/progress_list', plantings: garden.plantings.active.annual
- else
%p No annual plantings