@jlpereira/taxonpages-panel-scrutiny
v0.0.1
Published
A TaxonPages panel that displays scrutiny entries for a given taxon.
Readme
PanelScrutiny
A TaxonPages panel that displays scrutiny entries for a given taxon. It fetches DataAttribute records of the scrutiny vocabulary term from the TaxonWorks API and renders each entry alongside its supporting citations.
Panel ID: panel:scrutiny
Installation
Via npm
npm install @jlpereira/taxonpages-panel-scrutinyManual
Copy the PanelScrutiny/ folder into your project's panels/ directory:
panels/
PanelScrutiny/Usage
Add the panel to your config/taxa_page.yml:
taxa_page:
overview:
panels:
- - - panel:scrutinyHow it works
Fetching scrutinies — Requests
/data_attributes.jsonfiltered byattribute_subject_id(the taxon ID) andcontrolled_vocabulary_term_id(3102, the scrutiny term).Fetching citations — For each scrutiny entry, requests
/citations.jsonwithcitation_object_idset to the scrutiny's ID andcitation_object_typeset toDataAttribute.Display — Each scrutiny is rendered as a list item containing its
value(followed by a period if it doesn't already end with one) and a semicolon-separated list ofcitation_source_bodystrings from the matching citations.Visibility — The card is hidden entirely when no scrutiny entries exist for the taxon.
Note: The scrutiny controlled-vocabulary term ID (
3102) is hardcoded inPanelScrutiny.vue. Update the constant if your TaxonWorks instance uses a different term ID for scrutinies.
Project structure
PanelScrutiny/
├── main.js # Panel entry point and registration
└── PanelScrutiny.vue # Main panel component