BiologicalRecordsCentre / NPMS

NPMS
0 stars 0 forks source link

Suggest photos for species with ID difficulty = or > 2 #210

Open sacrevert opened 3 years ago

sacrevert commented 3 years ago

See https://github.com/NERC-CEH/npms-app/issues/54

andrewvanbreda commented 2 years ago

AVB notes on this to discuss at meeting.. @sacrevert Maybe worth you thinking about below notes before tomorrow meeting.

-What form would the message take? -Where to put it? (as we are using grids, it could be messy).

sacrevert commented 1 year ago

Incorporate into dev for next 5 year cycle

sacrevert commented 1 month ago

Answering questions at #317

(1) It would be good to move this up the list, to be done when time allows (2) Yes, the list of difficulties can be considered static. AFAIK this is in the database, but could be exported from there and used as a static lookup rather than on a database query basis

andrewvanbreda commented 15 hours ago

Hi @sacrevert ,

Do you want to check this is what you want on this multidev site

https://avb-photo-brc-npms-d10.pantheonsite.io/

The new message is available on the Indicator and Inventory forms (old and new versions of form).

The warning text can be customised (note that both the genus and difficulty warnings are display after confirming on the submit button, this isn't perfect but I think it was necessary to do it this way without fiddling with the internals of Indicia and increasing costs)

The only problem that isn't directly related to the message is the difficulty icons do not display. @johnvanbreda How does iRecord handle the difficulty icons? The option is switched on on NPMS, but they still don't display and it is not obvious from looking at the html and code at what is happening. Does iRecord use custom code for this?

johnvanbreda commented 1 hour ago

No, iRecord doesn't use any custom code for id difficulty icons, it's built in. Have a look at data_entry_helper::build_species_autocomplete_item_function - near the bottom of this function it adds JS which creates the icon if necessary.

Also see hook_species_checklist_new_row which should let you add a message about adding photos when a new species row is added to a species_checklist.

sacrevert commented 15 minutes ago

@andrewvanbreda Can we say "that may sometimes be difficult to identify", rather than the current statement. Otherwise feel free to deploy when you are ready. Thanks

andrewvanbreda commented 9 minutes ago

@sacrevert OK will change the wording. I have worked out what is wrong the identification icons also, so they will be fixed too.

@johnvanbreda Thanks for the hook_species_checklist_new_row tip, I will note that for future, but for this we do it in a different way with just one warning on submit. I had look in the data_entry_helper and that was running fine. However I have now worked out what is wrong with the icons, NPMS uses a custom version of dynamic_sample_occurrence form, but the npms_sample_occurrence.css file didn't have the CSS needed for the icons to work