Template:Category/Review record/State
From Miniscope
Annotation emitter + Review status sidebox for Template:Category/Review record.
Called once via #ask|format=template|import-annotation=true
with the latest Review record's date, optional per-record next-due
override, and the latest record's reviewer(s).
The import-annotation=true parameter on the parent
#ask is essential — without it the #set calls
below would not attach to the host page.
Does three jobs in one pass:
- Emits page-level annotations:
Has last reviewed date= ReviewDateHas next review due= Override if provided, else
ReviewDate + the page's Has review interval (months).
- Renders the "Review status" sidebox top half (status table).
- Renders a collapsible "Review history" block at the bottom of the
sidebox via a nested #ask on all Review record subobjects
of the host page, delegating per-row formatting to
Template:Category/Review record/History row.
Date arithmetic uses Unix-timestamp @ form because
Error: Invalid time. is not honored on this wiki.
A month is approximated as 30.4375 × 86400 = 2,629,800 seconds.
Uses rather than Y for
annotations — silent equivalent.
Parameters (named args from the parent #ask):
ReviewDate— ISO date of the latest reviewOverride— optional ISO date overriding the computed next
review due
Reviewer— page link(s) to the reviewer(s) on the latest
record (SMW joins multivalued with commas)