https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/Head
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://www.nanopub.org/nschema#hasAssertion
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/assertion
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://www.nanopub.org/nschema#hasProvenance
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/provenance
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://www.nanopub.org/nschema#hasPublicationInfo
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/pubinfo
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.nanopub.org/nschema#Nanopublication
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/assertion
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/get-event-participation-actions
http://purl.org/dc/terms/description
Backs a call-to-action panel on an event Space, inviting the visitor to declare how they take part. Returns one row per way in that is still open to this particular viewer: taking part (planned attendance before the event's start date, actual participation from the start date onwards) and observing. A row is returned only when the space actually offers that way in - that is, when a role carrying the corresponding property is attached to the space - and only when the viewer has not already declared it, read from the viewer's validated role instantiations via the CURRENTUSER session parameter. A logged-out visitor has no role instantiations, so they are offered everything the space offers. When nothing is left to offer, a single row with an empty title and empty content is returned instead of no rows at all, so the panel renders blank rather than showing "(nothing found)". The content column holds ready-made root-relative /publish links with template-version=latest, which Nanodash renders as buttons.
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/get-event-participation-actions
http://purl.org/dc/terms/license
http://www.apache.org/licenses/LICENSE-2.0
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/get-event-participation-actions
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
https://w3id.org/kpxl/grlc/grlc-query
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/get-event-participation-actions
http://www.w3.org/2000/01/rdf-schema#label
Get the ways in still open to the viewer of an event
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/get-event-participation-actions
https://w3id.org/kpxl/grlc/endpoint
https://w3id.org/np/l/nanopub-query-1.1/repo/spaces
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/get-event-participation-actions
https://w3id.org/kpxl/grlc/sparql
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix np: <http://www.nanopub.org/nschema#>
prefix npa: <http://purl.org/nanopub/admin/>
prefix npx: <http://purl.org/nanopub/x/>
prefix gen: <https://w3id.org/kpxl/gen/terms/>
prefix wd: <http://www.wikidata.org/entity/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
select ?title ?content where {
values ?_space_multi_iri {}
values ?__CURRENTUSER_multi_iri {}
graph npa:graph { npa:thisRepo npa:hasCurrentSpaceState ?state . }
# Has the event started? Read the start date off the space's current definition.
optional {
graph npa:graph {
?defNp npa:hasValidSignatureForPublicKeyHash ?defKey ;
np:hasAssertion ?defA ;
npx:introduces ?_space_multi_iri .
filter not exists { ?defInv npx:invalidates ?defNp ; npa:hasValidSignatureForPublicKeyHash ?defKey . }
filter not exists { ?defNewer npx:supersedes ?defNp . }
}
graph ?defA { ?_space_multi_iri <http://schema.org/startDate> ?startRaw . }
}
bind(coalesce(?startRaw, '9999-12-31T00:00:00Z'^^xsd:dateTime) as ?start)
bind(now() >= ?start as ?started)
# Which of the three ways in does this space actually offer? A role only takes
# effect once it is attached to the space, so an unattached one is not offered.
bind(exists {
graph npa:graph { ?an1 npa:hasValidSignatureForPublicKeyHash ?ak1 ; np:hasAssertion ?aa1 .
filter not exists { ?ai1 npx:invalidates ?an1 ; npa:hasValidSignatureForPublicKeyHash ?ak1 . } }
graph ?aa1 { ?_space_multi_iri gen:hasRole ?role1 . }
graph ?rd1 { ?role1 gen:hasRegularProperty gen:plansToAttend . }
} as ?offersPlanned)
bind(exists {
graph npa:graph { ?an2 npa:hasValidSignatureForPublicKeyHash ?ak2 ; np:hasAssertion ?aa2 .
filter not exists { ?ai2 npx:invalidates ?an2 ; npa:hasValidSignatureForPublicKeyHash ?ak2 . } }
graph ?aa2 { ?_space_multi_iri gen:hasRole ?role2 . }
graph ?rd2 { ?role2 gen:hasRegularProperty wd:P1344 . }
} as ?offersParticipation)
bind(exists {
graph npa:graph { ?an3 npa:hasValidSignatureForPublicKeyHash ?ak3 ; np:hasAssertion ?aa3 .
filter not exists { ?ai3 npx:invalidates ?an3 ; npa:hasValidSignatureForPublicKeyHash ?ak3 . } }
graph ?aa3 { ?_space_multi_iri gen:hasRole ?role3 . }
graph ?rd3 { ?role3 gen:hasInverseProperty gen:hasObserver . }
} as ?offersObserver)
# Which has the viewer already declared? With no viewer (logged out) the str()
# comparison errors, the filter drops the row, and exists() is false - so a
# logged-out visitor is offered everything the space offers.
bind(exists {
graph ?state { ?ri1 a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ;
npa:forAgent ?u1 ; npa:regularProperty gen:plansToAttend . }
filter(str(?u1) = str(?__CURRENTUSER_multi_iri))
} as ?hasPlanned)
bind(exists {
graph ?state { ?ri2 a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ;
npa:forAgent ?u2 ; npa:regularProperty wd:P1344 . }
filter(str(?u2) = str(?__CURRENTUSER_multi_iri))
} as ?hasParticipated)
bind(exists {
graph ?state { ?ri3 a gen:RoleInstantiation ; npa:forSpace ?_space_multi_iri ;
npa:forAgent ?u3 ; npa:inverseProperty gen:hasObserver . }
filter(str(?u3) = str(?__CURRENTUSER_multi_iri))
} as ?hasObserver)
# One row per way in that is still open, plus a silent row so that a viewer who
# has declared everything gets a blank panel rather than "(nothing found)".
values (?slot ?sort) { ('take-part' 1) ('observe' 2) ('none' 3) }
bind(if(?started, ?offersParticipation, ?offersPlanned) as ?takePartOffered)
bind(if(?started, ?hasParticipated, ?hasPlanned) as ?takePartDone)
bind(?takePartOffered && !?takePartDone as ?showTakePart)
bind(?offersObserver && !?hasObserver as ?showObserve)
filter(if(?slot = 'take-part', ?showTakePart,
if(?slot = 'observe', ?showObserve,
!?showTakePart && !?showObserve)))
bind(concat('/publish?template-version=latest¶m_space=',
encode_for_uri(str(?_space_multi_iri)), '&template=') as ?tail)
bind(if(?slot = 'take-part',
if(?started,
concat('<p>This event is under way. Put it on record that you are taking part - one nanopublication, retractable at any time.</p><p><a href="', ?tail,
encode_for_uri('https://w3id.org/np/RAAcUy5wBwXNyadgD71k1rP0iM_KFc07qXFyrxhPcKS5M'),
'">🙋 I am taking part...</a></p>'),
concat('<p>Planning to come? Say so, and you will show up on the list of expected participants. It is a single nanopublication and you can retract it at any time.</p><p><a href="', ?tail,
encode_for_uri('https://w3id.org/np/RAQ1LrU5fyY0Szd-4i9nN_JXBMvKti_v-GeHZgQG-EpzI'),
'">🙋 I plan to attend...</a></p>')),
if(?slot = 'observe',
concat('<p>Not attending, but want to follow what happens here? Declare yourself an observer.</p><p><a href="', ?tail,
encode_for_uri('https://w3id.org/np/RAs3LMTf4JLXDUGCi1MjT2448aJQE3aatSgkapNwgdgHY'),
'">👀 I am observing this event...</a></p>'),
'')) as ?content)
bind(if(?slot = 'take-part', if(?started, 'Taking part?', 'Coming along?'),
if(?slot = 'observe', 'Following along?', '')) as ?title)
}
order by ?sort
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/provenance
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/assertion
http://www.w3.org/ns/prov#wasAttributedTo
https://orcid.org/0000-0002-1267-0234
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/pubinfo
https://orcid.org/0000-0002-1267-0234
http://xmlns.com/foaf/0.1/name
Tobias Kuhn
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://purl.org/dc/terms/created
2026-09-07T08:42:38Z
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://purl.org/dc/terms/creator
https://orcid.org/0000-0002-1267-0234
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://purl.org/dc/terms/license
https://creativecommons.org/licenses/by/4.0/
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://purl.org/nanopub/x/embeds
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/get-event-participation-actions
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
http://www.w3.org/2000/01/rdf-schema#label
Get the ways in still open to the viewer of an event
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
https://w3id.org/np/o/ntemplate/wasCreatedFromProvenanceTemplate
https://w3id.org/np/RA7lSq6MuK_TIC6JMSHvLtee3lpLoZDOqLJCLXevnrPoU
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RA-N4_kFxcruvBTlo1yJv29E4SLOXsx5KO_th69PprMrA
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RACJ58Gvyn91LqCKIO9zu1eijDQIeEff28iyDrJgjSJF8
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
https://w3id.org/np/o/ntemplate/wasCreatedFromPubinfoTemplate
https://w3id.org/np/RARJj78P72NR5edKOnu_f4ePE9NYYuW2m2pM-fEoobMBk
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
https://w3id.org/np/o/ntemplate/wasCreatedFromTemplate
https://w3id.org/np/RAEFAt-QcFK0ZhqfvlsmS10BnzGJA0xwOICZXkO-ai87k
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/sig
http://purl.org/nanopub/x/hasAlgorithm
RSA
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/sig
http://purl.org/nanopub/x/hasPublicKey
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/sig
http://purl.org/nanopub/x/hasSignature
KSf8k7SD2oi8EkyTpJnQvY4DVXvdj2LM3jARsg+WqnRzVeAzPMdEzCpMGLhkgWBej2PItE09RjftzsAdDncDEyzcit8VZHNGbNaUJ50iWYSC1VdbiCdcMwoyWWKcGxqwXo4gCkMnttzctV1pj/l3MYDa5pYv7FS2T+NiovT8z+c=
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/sig
http://purl.org/nanopub/x/hasSignatureTarget
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc
https://w3id.org/np/RAnF7Dc2XfVY2gs2f4-WsjT20neMzDchON5ONmrUN8pzc/sig
http://purl.org/nanopub/x/signedBy
https://orcid.org/0000-0002-1267-0234