220 Commits

Author SHA1 Message Date
Daniel O'Connor
1467ec9364 Add Wikidata climate attributes and integration to gardens (#4627)
* Add Wikidata integration for garden climate data

- Add location_wikidata_id, lowest_temp_c, and highest_temp_c to gardens.
- Implement WikidataService for fetching IDs and temperature properties.
- Map P6591 to highest_temp_c and P7422 to lowest_temp_c with unit conversion.
- Automatically populate Wikidata info on garden location change.
- Add manual "Fetch Wikidata info" button and opt-in prompt to garden show page.
- Update gardens_controller to permit new attributes and handle manual fetch.
- Update db/schema.rb manually to include new columns and migration version.

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

* Fix migration

* Improve display

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-05-12 18:07:35 +09:30
Daniel O'Connor
d7a50f86b5 Allow collaborators to remove themselves from gardens (#4630)
- Update Ability to grant destroy permission to collaborators for their own record
- Add 'Leave garden' link to garden show page
- Add specs for garden collaborator permissions

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-05-12 17:23:24 +09:30
Daniel O'Connor
2bc164bd2e Render history 2025-09-07 07:59:51 +00:00
Daniel O'Connor
186f07109c Add skip link 2025-09-07 05:17:14 +00:00
Daniel O'Connor
7dc66cb199 Merge pull request #4173 from Growstuff/translate-confirm
Garden Delete - Extract strings and fix missing translation bug
2025-08-31 14:39:32 +09:30
Daniel O'Connor
925bb582d3 Update gardens to have a non 0 area (#3885)
* Update gardens to have a non 0 area

* Spec no longer possible through frontend

* Fix spec
2024-10-13 22:53:51 +10:30
Daniel O'Connor
a7a5b6ef17 Remove required text UI element 2024-10-13 11:56:56 +00:00
Daniel O'Connor
1c97ba1495 Garden collaboration (small part of community gardens) (#3862)
* Add collaboration model

* Permissions and garden show

* List by owner, or where I am a collaborator

* Add index

* Add permissions

* Typo

* Typo

* Add route

* Update schema

* Update schema

* Add CRUD

* Add CRUD

* Add CRUD

* Factory

* Add validations

* Rubocop

* Rubocop

* Rubocop

* Unique index

* Fix

* Make CI more fine grained for faster feedback

* Swap order

* Fix path, fail-fast

* Fix spec

* Remove 'significant drop in coverage' as not everything runs in one giant run

* Fix tests?
2024-09-29 18:28:52 +09:30
Daniel O'Connor
c063a33e8b Garden show and edit: encourage descriptions, add more calls to action (#3846)
* Better edit links

* Prompt for more detail

* Better action links

* Better action links

* Update show.html.haml

* Apply suggestions from code review

* Apply suggestions from code review
2024-09-29 18:28:42 +09:30
Daniel O'Connor
79ef7347ad Avoid showing plantings which are finished 2024-09-08 02:26:11 +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
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
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
09a7ce6483 Wrap in label 2024-01-21 01:21:09 +00:00
Daniel O'Connor
78eaf0b4c9 Address minor accessibility issues: Image elements do not have [alt] attributes (#3561)
* Add alt tags

* Update app/views/members/_tiny.haml

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

* Use crop_name as this is a searchkick record
2024-01-17 22:02:09 +10:30
Daniel O'Connor
a112d8e126 Don't restrict format 2023-03-13 07:49:48 +00:00
Daniel O'Connor
1b3485733d Fix frontend validation 2023-03-13 07:47:42 +00:00
Brenda
20e878e9fe style "inactive" checkbox on gardens#index 2020-02-10 21:49:27 +13:00
Brenda Wallace
019d94f1cb Show the default photo for social media 2020-02-04 11:52:13 +13:00
Martina Simicic
3143f0c5ee Name variable to somthing more descriptive 2020-01-09 20:00:03 +13:00
Martina Simicic
58c7576360 Jump to is only shown when viewing own gardens 2020-01-09 20:00:03 +13:00
Martina Simicic
c546088e56 Unify design for gardens index page
Design of the page is now similar to index pages
for plantings and crops
2020-01-09 20:00:03 +13:00
Martina Simicic
905087ab8e Use positive statements 2020-01-07 21:31:48 +13:00
Martina Simicic
9aaa18c0d3 Show garden type for a garden 2020-01-07 21:31:48 +13:00
Martina Simicic
ba04c44742 Make garden type optional when editing garden 2020-01-03 09:50:33 +01:00
Brenda Wallace
72e348cdf6 Fix up specs 2019-11-19 14:16:50 +13:00
Brenda Wallace
69d9e1e76e Merge pull request #2271 from Br3nda/jump-to-garden
Link to jump to garden
2019-11-15 12:16:39 +13:00
Brenda Wallace
cfef6f5eb2 Link to jump to garden 2019-11-15 11:47:32 +13:00
Brenda Wallace
75037c7e21 Order the garden names 2019-11-15 11:32:13 +13:00
Brenda Wallace
8c694b3dca Only show companions of active plantings 2019-10-21 14:19:47 +13:00
Brenda Wallace
d81df50dc5 Suggest companions for a garden based on existing crops 2019-10-19 18:45:11 +13:00
Brenda Wallace
bb72d2b974 Fix bug showing plantings with no planted_at 2019-10-19 18:20:01 +13:00
Brenda Wallace
f2dc2aeaa0 Merge branch 'dev' into feature-2207 2019-10-19 16:01:11 +13:00
Brenda Wallace
0965168750 Group previous plantings by year 2019-10-19 11:25:19 +13:00
Brenda Wallace
a6cb81f4d1 Widen gardens on gardens#index 2019-10-19 09:41:43 +13:00
Brenda Wallace
b0c8b11246 📝 Inline editing and display tidy ups (#2200)
* Inline editing and display tidy ups
2019-10-08 11:06:53 +13:00
bestest-mensch
d39dc65c4e small ui tweak 2019-10-06 04:08:09 +00:00
Brenda Wallace
7b5698f977 👩‍🌾 Import openfarm data (#2177)
* Pull in openfarm icons, photos, info
* Truncating member location
* tidying up harvest display, and reducing duplication in css styles
* Tiny crop chip
* only show crop charts if there is data to show
* Make the styles more Growstuff
* Fixed links to openfarm
* Updating specs to cope with new photo sources
fix broken garden timeline on some pages
* Update homepage blurb
* Import crop companions
* More fluid page
* use thumbnail unless the source is flickr
* Messing with homepage
* Added crop growing_degree_days
* expect full size url on photos helper spec
* formatted dates from seeds#show
* tidy up places#show
* Move progress bar
* Quicker buttons for approve/reject crops
* Remove kaminari gem
* use crop cards on hierarchy page
* more crops on crops#index
* Wrap photo creation in transaction
* Wrap crop companions in a transaction
2019-09-28 17:23:25 +12:00
Brenda Wallace
0c8e993006 gardens show all as a button 2019-08-07 16:18:59 +12:00
Brenda Wallace
493a49bb3e Nicer display when there are not gardens 2019-08-05 18:57:54 +12:00
Brenda Wallace
7fc434bd00 remove whitespace 2019-06-17 10:40:34 +12:00
Brenda Wallace
3bc69e65c2 Click actions menu before checking for links in garden feature specs 2019-06-15 15:18:32 +12:00
Brenda Wallace
5cedea9da8 removing trailing whitespace 2019-06-14 16:23:31 +12:00
Brenda Wallace
58e28b9311 nicer link to member gardens 2019-06-14 11:45:55 +12:00
Brenda Wallace
e801a1d7c6 Removing unused views 2019-06-13 21:06:10 +12:00
Brenda Wallace
7bc641fb55 fix gardens action menu 2019-06-09 14:02:41 +12:00
Brenda Wallace
2fa4590315 gardens breadcrumbs 2019-06-09 14:02:13 +12:00
Brenda Wallace
d2c062a3f1 garden actions 2019-06-08 14:57:29 +12:00
Brenda Wallace
51133359fb tidy 2019-06-08 10:29:52 +12:00
Brenda Wallace
47fbfa815a More room on gardens form 2019-06-08 09:31:53 +12:00