Commit Graph

21 Commits

Author SHA1 Message Date
google-labs-jules[bot]
13a8276313 Add version tracking to crops model (#4343)
* feat: Add version tracking to Crop model

This commit introduces version tracking for the Crop model using the PaperTrail gem.

Key changes include:
- Integrating `has_paper_trail` into the `Crop` model.
- Adding a "History" section to the crop show page to display a timeline of changes for that specific crop.
- Creating a new admin page for users with the "crop_wrangler" role to view a log of all recent crop edits, creations, and deletions.
- Fixing several N+1 query performance issues by eager-loading associated `Member` records in both the `CropsController` and the new `Admin::CropsController`.
- Refactoring view logic into a shared partial to reduce code duplication.

* Add papertrail

* Admin UI

* Add papertrail DB

* Add papertrail DB

* Rearrange

* Fix permissions

* Fix permissions

* Fix UI

* Fix UI

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2025-11-30 14:47:46 +10:30
Brenda Wallace
99228d8850 Add css class, so can find in test 2019-08-20 15:09:39 +00:00
Brenda Wallace
4241a7c5f5 Tidy up crop wrangling page 2019-08-20 15:09:39 +00:00
Brenda Wallace
6ce28a87aa Remove outdated links from wrangle guidelines 2019-07-10 09:03:05 +00:00
Brenda Wallace
68953188f8 Update to new path names 2019-01-06 08:45:42 +13:00
Brenda Wallace
6478d9cb1b Haml clean up for crops views 2017-02-06 10:31:45 +13:00
Brenda Wallace
8ddf36fed9 Haml clean up for (some of) crops views 2017-02-04 15:04:07 +13:00
Mackenzie Morgan
e1a2b168c9 rename scientific_names.scientific_name to scientific_names.name
this mirrors alternate_names.name and allows making code more DRY
2016-11-28 21:57:51 -05:00
Brenda Wallace
bdb057ca0f Removed all trailing white space 2016-11-14 15:05:32 +13:00
Mackenzie Morgan
972518e9fc Stop hard-coding strings for pagination
Use translation template to set singular/other strings
for .model_name

Fixes #855
2016-05-25 23:15:36 -04:00
Mackenzie Morgan
1b62c5cb97 remove pending/rejected crops from browse and test that, change links on wrangling page to go directly to crop edit and update tests for that 2015-02-25 00:05:56 -05:00
Taylor Griffin
0dbc2e1964 prevent users from seeing sci names of crops unless approved 2015-02-09 21:52:52 +11:00
Taylor Griffin
b842bff9cb wip: fix misc tests 2015-02-04 18:36:14 +11:00
Taylor Griffin
abece6473b make rejected and pending crops viewable on wrangle crops page 2015-02-04 14:18:10 +11:00
Taylor Griffin
2f67ffd2f8 fix regressions 2015-02-02 00:01:49 +11:00
Taylor Griffin
40d13fadb3 write feature spec for requesting a crop 2015-02-01 23:29:31 +11:00
Taylor Griffin
41db12d8d7 pending approval crops appear on crops wrangle page 2015-01-31 10:36:02 +11:00
Marlena Compton
ec25f2ab91 created list of crop wranglers on the crop wranglers page 2014-08-21 20:11:10 -07:00
Miles Gould
9c5b6f6192 Rename Crop.system_name to Crop.name 2013-10-18 11:52:05 +01:00
Skud
be6d6fd6bd Added a crop hierarchy link to the crop wrangler page 2013-09-02 12:07:58 +10:00
Skud
8f7becfa78 added a basic crop wrangler homepage 2013-08-21 21:24:22 +10:00