33 Commits

Author SHA1 Message Date
Daniel O'Connor
98c8bdc0bb Merge pull request #4564 from Growstuff/memory-optimization-2149092598558110155
Memory usage optimization
2026-04-27 00:37:51 +09:30
google-labs-jules[bot]
700cb76e3a Update crop wrangling guide links to GitHub wiki
Updated links to the crop wrangling guide in the scientific names and
alternate names forms to point to the new GitHub wiki location.
Verified that other occurrences in the codebase already use the new
URL.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
2026-04-26 01:46:35 +00:00
google-labs-jules[bot]
b5aaf2a124 feat: Add pattern attribute to wikidata input
Adds a pattern attribute to the wikidata input on scientific names to enforce the 'Q' followed by numbers format.
2025-12-01 13:30:24 +00:00
google-labs-jules[bot]
d31a6ec221 feat: Add Wikidata ID to scientific names
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.
2025-11-30 02:53:19 +00:00
Daniel O'Connor
12ff09ad51 Add Accessibility assertions to rspec, replacing accessbility-lint + fixes (#3573)
* Add dep

* Add tests around accessibility

* Add examples in a few places

* Try to fix screenshots

* Remove redundant role

* Adjust rules, colors, etc so tests pass

* Update app/assets/stylesheets/overrides.scss

* Wrap in label

* Omit rule, which is failing with a false positive

* Update index.haml

* Update _blurb.html.haml
2024-01-22 22:09:27 +10:30
Daniel O'Connor
b77df88df9 Issues/1475: Ensure we have pagination (#3193)
* Paginate, 100 at a time

* Limited i18n

* Paginate roles

* Pagination

* Pagination

* i18n and pagination

* Paginate alternate names

* Silence code climate

* Rewrite coverage as a feature

* Remove coverage in favour of crops/scientific_name_spec

* Add missing admin link

* Rewrite coverage as feature

* Rewrite coverage

---------

Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2024-01-21 14:19:36 +10:30
Brenda Wallace
b0c8b11246 📝 Inline editing and display tidy ups (#2200)
* Inline editing and display tidy ups
2019-10-08 11:06:53 +13:00
Brenda Wallace
92939ca204 Spec updates 2018-10-16 14:08:37 +13:00
Brenda Wallace
9ebe830402 Haml clean up for scientific names views 2017-02-13 07:32:43 +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
Daniel O'Connor
faaf07cad8 Render the full size image, as facebook doesn't like smaller thumbnails 2016-06-03 01:58:34 +09:30
Daniel O'Connor
0e83a230b9 Helps not to render excess info 2016-06-03 01:54:26 +09:30
Daniel O'Connor
7550bc860f #816 Add better opengraph behaviour, fix facebook share thumbnail size 2016-06-03 01:01:03 +09:30
Daniel O'Connor
e35b15c868 Only render an edit control if the permission exists 2016-03-28 21:40:58 +10:30
Cjay Billones
bb88041fef [Refactoring] Replace .count and .length with .size for collections
Improved program efficiency (in querying in particular) by replacing .count and .length with .size for collections.

Fix error in refactoring

Reverted some .size into .count
2015-06-25 12:09:03 +08:00
Taylor Griffin
3a9ec8cf6d include crop approval status in sci and alt names 2015-02-27 07:39:07 +11:00
Miles Gould
56b7d89d9e Link scinames to crops, don't show numeric crop IDs 2014-10-19 16:36:10 +01:00
Miles Gould
3a797d4434 Use content_for :title in scientific names index. 2014-10-19 11:42:49 +01:00
Skud
501fda3fc9 b3ified a few of the lesser-used forms 2014-08-27 19:02:06 +10:00
Skud
117fd23bea add btn-default to all btn-xs 2014-07-22 12:06:28 +10:00
Skud
0294daf423 s/btn-mini/btn-xs/ for bootstrap3 2014-07-22 12:01:49 +10:00
Amy Hendrix
b7fbe60b83 Bootstrap3: form control groups 2014-07-13 18:45:56 -04:00
Miles Gould
9c5b6f6192 Rename Crop.system_name to Crop.name 2013-10-18 11:52:05 +01:00
Skud
836ed7aa85 Added creator to scientific name views etc 2013-08-21 17:52:10 +10:00
Skud
536cf21e3e make it easier to wrangle scientific names 2013-05-09 11:39:22 +10:00
Skud
b4faba7182 various tweaks based on comments on phazel's work 2013-03-21 12:37:57 +11:00
gnattery
d26b3d42ed standardise button styles 2013-03-21 00:37:46 +11:00
Skud
84a730ddcb limit crop wrangling to crop wranglers 2013-03-18 17:02:22 +11:00
Skud
87f14247e0 modified views to use CanCan 2013-02-01 13:24:32 +11:00
Skud
edb59e07ee s/users/members/g -- all tests pass
There's still probably stuff broken, but this seemed like a good spot to
commit.  Sorry for the enormous chunk of code.  I was attempting to
update the views, but found that I needed to update a few things
elsewhere as well to make them work.
2013-01-13 18:33:43 +11:00
Skud
cd72350e9e refactor: remove unneeded %div in HAML 2012-12-02 11:59:31 +11:00
Skud
760cf03b2c Fixed tests by getting rid of valid_session 2012-11-26 19:04:43 +11:00