-
Notifications
You must be signed in to change notification settings - Fork 211
Release 77 #4345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Release 77 #4345
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update crops_helper.rb
This commit introduces a series of changes to encourage user contributions for missing crop data. On the crop show page, it adds links for logged-in users to: - Add a description if one is not present. - Add a YouTube video if one is not present. - Add more attributes in the predictions section if any are missing. On the crop edit page, the form now conditionally displays fields. For standard users, it only shows fields for attributes that are currently empty. For privileged users (wranglers), it displays all fields, allowing them to edit existing data.
Adds schema.org markup to the crop pages using the BioChemEntity type. The taxonomicRange attribute is used to list the scientific names of the crop, which will improve SEO.
Add Contribution Links and Conditional Edit Form
This commit introduces the ability to store and display the Wikidata ID for scientific names. Changes include: - A database migration to add the `wikidata_id` column to the `scientific_names` table. - An update to the `scientific_names_controller` to permit the `wikidata_id` parameter. - An update to the scientific name form to include a field for the Wikidata ID. - An update to the crop show page to display a link to the Wikidata page for a scientific name.
Allow Wikidata ID to be set when editing a scientific name
…ture/add-schema-org-to-crops-page
…ps-page Add schema.org markup to crop pages
…ps-page Styling
…ps-page Fix rendering
* 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>
* feat(admin): add revert functionality to crops page This change adds a "Revert" button to the admin crops page, allowing crop wranglers to revert changes to a previous version. It introduces a new `Admin::VersionsController` with a `revert` action that uses `paper_trail`'s `reify` method to restore a previous version of a `Crop` object. The view is updated to include a "Revert" button, which is guarded by a `can?(:wrangle, Crop)` check to ensure only authorized users can see it. The controller also includes an authorization check to prevent unauthorized users from accessing the revert action directly. A feature spec is added to test the new functionality, including the authorization logic. * Consistent UX * Specs --------- 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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.