211 Commits

Author SHA1 Message Date
Daniel O'Connor
035210197f Prompt for updated planting rating when harvesting (#4608)
* Update planting rating when recording a harvest

- Added virtual attribute `overall_rating` to `Harvest` model.
- Updated `HarvestsController` to permit `overall_rating` and synchronize it to the associated `Planting`.
- Added a rating range field (1-5) to the harvest form.
- Added controller tests to verify that the planting rating is updated.
- Refined feature tests for harvesting.

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

* I have updated the system to allow for recording a planting rating when a harvest is logged. Here is a summary of the changes:

- Added a virtual attribute `overall_rating` to the `Harvest` model.
- Updated `HarvestsController` to permit `overall_rating` and synchronize it to the associated `Planting`.
- Added a rating range field (1-5) to the harvest form.
- Added controller tests to verify that the planting rating is updated correctly.
- Updated feature tests to ensure the harvest form functions as expected.

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

* Update database.yml

* Apply suggestions from code review

Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>

* Adjust wording

* Change harvest modal

* Fix tests

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-05-03 14:47:00 +09:30
Daniel O'Connor
4ac0dcb05b Merge branch 'dev' of https://github.com/Growstuff/growstuff into links-wrong 2026-04-28 04:03:44 +00:00
Daniel O'Connor
60390fcc06 Fix links further 2026-04-28 04:03:27 +00:00
Daniel O'Connor
55e6d99979 Merge pull request #4599 from Growstuff/links-wrong
Fix various breadcrumb links to avoid passing ?owner, which doesn't actually filter
2026-04-28 13:23:36 +09:30
Daniel O'Connor
f24ca80394 Fix various breadcrumb links to avoid passing ?owner, which doesn't actually filter 2026-04-28 03:46:47 +00:00
google-labs-jules[bot]
0df7589feb Optimize Harvests with memoization and fragment caching
- Memoize display methods in `Harvest` model.
- Memoize calculation methods in `PredictHarvest` concern using `defined?` for nil safety.
- Add fragment caching to `app/views/harvests/_popover.html.haml`.
- Add fragment caching to `app/views/crops/_harvests.html.haml` with daily expiration for relative time strings.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-04-28 02:59:06 +00:00
google-labs-jules[bot]
91e1f1c004 feat: Add dynamic meta descriptions
This commit improves the meta descriptions for several pages by making them dynamic and object-specific.

- The default meta description in `app/views/layouts/_head.html.haml` has been updated to include a mention of open data.
- The `show.html.haml` views for crops, seeds, plantings, harvests, and members now have a `content_for :meta_description` block. This block uses the object's description or bio if available, and falls back to a generated string if not.
2025-12-01 14:21:43 +00:00
google-labs-jules[bot]
2742dba7fa feat: Add meta descriptions to pages
Adds a meta description tag to the landing, crops, plantings, harvests, seeds, and comments pages.

Also creates a new index page for comments.
2025-12-01 13:54:54 +00:00
google-labs-jules[bot]
c45b75a967 feat: Add nutritional data partial to crops and harvests
This commit introduces a new partial to display nutritional data from the Australian Food Composition Database.

Key changes:
- Adds a database index to the `public_food_key` on the `crops` table.
- Establishes a `has_one` relationship between `Crop` and `AustralianFoodClassificationData`.
- Creates a `_nutritional_data.html.haml` partial to display a summary of key nutritional information.
- Renders the partial on the `show` pages for both crops and harvests.
2025-12-01 12:53:03 +00:00
Daniel O'Connor
b53bda136f Render less on some pages 2025-11-30 03:41:15 +00:00
Daniel O'Connor
58bad7eeb0 Add more schema.org 2025-11-30 03:02:10 +00:00
Daniel O'Connor
d22555ee42 Deep link to content when rating 2025-09-07 08:04:14 +00:00
Daniel O'Connor
9b1699b061 Merge pull request #4215 from Growstuff/activities-detail
Surface more Activities detail
2025-09-07 14:39:13 +09:30
Daniel O'Connor
c189e3b01a Merge pull request #4062 from Growstuff/feature/planting-rating
Add overall_rating to Plantings
2025-09-01 23:56:13 +09:30
Daniel O'Connor
58780ec199 Swap harvest to html5 date field (#3894)
* Update gardens to have a non 0 area

* Spec no longer possible through frontend

* Fix spec

* Swap harvest to html5 date field

* Fix spec
2024-10-14 00:09:30 +10:30
Daniel O'Connor
7acef18bc5 Merge pull request #3888 from Growstuff/required-help
Remove required text UI element
2024-10-13 22:47:21 +10:30
Daniel O'Connor
a7a5b6ef17 Remove required text UI element 2024-10-13 11:56:56 +00:00
Daniel O'Connor
c05ea9e651 Update _form.html.haml 2024-10-13 22:15:52 +10:30
Daniel O'Connor
c28b2c0c38 Likes: Add capability to Activities, Plantings, Harvests (#3805)
* Ability to like activities

* Ability to like activities

* Add likeable everywhere

* Refactor

* Remove extra newline

* Typo

* Use classes, not IDs

* Explicitly wait for ajax

* Fix tests

* Move likes under owner

* Add separation

* Move harvest likes near actions

* Rearrange harvests

* Render likes under owner

* Make harvest consistent with other views

* Move planting detail into header

* Move detail into header

* Move detail into header

* Revert

* Fix header

* Move likes into jumotrons

* Fix name

* Change all actions to be after likes and a span

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* i18n and accessibility

* Fix name

* Temporarily make ack into a div

* Update app/views/photos/_actions.html.haml
2024-07-24 17:07:56 +09:30
Bennett Zink
d149e25aec change harvest wording
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2024-04-07 11:05:35 -04:00
bennett-zink
c408687e36 added ux when none logged #3618 2024-04-06 20:08:31 +00:00
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
Daniel O'Connor
49284eb169 Fix haml preview (#3610)
* HAML

* rewrite

* Fix specs - but likely still wrong

* Return temple

* Trailing line

* Fix specs

* This was rearranged, apparently.

* Fix tests

* Retain escaping

* Fix specs

* Rubocop

* Attempt to fix rendering

* Fix output

* Move away from filter

* Move away from filter

* Fix spec

* Fix specs

* Fix structure to avoid nested paragraph tags
2024-02-04 15:08:18 +10:30
Daniel O'Connor
91f8c2e0b3 Harvests - Compare dates to dates when determing how long ago something was (#3585)
* Compare dates to dates

* Adjust timeline display to check if Date or Time
2024-01-21 15:20:32 +10:30
Daniel O'Connor
06c5e4b8e8 to_s 2022-11-07 23:20:49 +10:30
Daniel O'Connor
dae4cacb53 to_s 2022-11-07 23:20:49 +10:30
Brenda Wallace
35f8289b06 Turn off caching on modal form 2020-03-02 12:53:29 +13:00
Brenda Wallace
3c14496936 BUGFIX - caching on harvest form 2020-03-02 12:22:00 +13:00
Brenda
5c7b8254b0 plant_part is on harvest not planting 2020-03-01 08:32:53 +13:00
Brenda
7039240bdc always show photos section on harvests 2020-03-01 07:57:19 +13:00
Brenda
cc83cb23bc fix plant part selection bug on editing harvests 2020-03-01 07:57:04 +13:00
Brenda
88ac147dda Restore old labels on buttons 2020-03-01 07:56:34 +13:00
Brenda Wallace
52e28f4ae2 Link new harvest to planting 2020-02-29 20:07:30 +13:00
Brenda
f3cd341659 add an id to the harvest modal so the test can find it 2020-02-29 13:26:36 +13:00
Brenda
1503b39ad3 Seed saving modal 2020-02-29 11:19:19 +13:00
Brenda Wallace
6c94337047 Added Plantings modal form 2020-02-29 10:23:00 +13:00
Brenda Wallace
a6ce1e05cf Lower case in form title 2020-02-29 10:02:47 +13:00
Brenda
8955aab2bb caching plant parts 2020-02-29 09:59:44 +13:00
Brenda Wallace
5d43575eae Merge branch 'feature/crop-action-modals' of github.com:Br3nda/growstuff into feature/crop-action-modals
Conflicts:
app/views/harvests/_modal.html.haml
2020-02-29 09:38:21 +13:00
Brenda Wallace
b2ff247a31 Apply suggestions from code review
Co-Authored-By: Martina  <922964+simicic@users.noreply.github.com>
2020-02-29 09:36:05 +13:00
Brenda
d2509afca2 Harvest button on plantings 2020-02-29 09:33:40 +13:00
Brenda Wallace
33091fbadc Merge branch 'dev' into feature/crop-action-modals 2020-02-26 11:38:38 +13:00
Brenda
9abb84ccba Harvesting modal form 2020-02-24 11:51:37 +13:00
Brenda
435c164e15 Fixed typo error in view 2020-02-23 15:47:23 +13:00
Brenda Wallace
71ccd52c59 Fix harvest thumbnails 2020-02-23 12:03:14 +13:00
Brenda
36bad1cda0 Fix mobile display of member profiles 2020-02-23 11:42:07 +13:00
Brenda
9dfd6dbc73 Tidy up index pages 2020-02-10 14:21:03 +13:00
Brenda Wallace
abecbab6c5 Tidy up mobile display on homepage, including member cards changes (#2417)
* Tidy up mobile display on homepage, including member cards changes
2020-02-09 22:38:12 +13:00
Brenda Wallace
4f5245f7e7 Show all of a harvest's photos on harvest#show 2020-02-07 08:02:20 +13:00
Brenda Wallace
019d94f1cb Show the default photo for social media 2020-02-04 11:52:13 +13:00