diff --git a/productMods/WEB-INF/ontologies/app/listViewConfig.owl b/productMods/WEB-INF/ontologies/app/listViewConfig.owl index f3f73540..31feb055 100644 --- a/productMods/WEB-INF/ontologies/app/listViewConfig.owl +++ b/productMods/WEB-INF/ontologies/app/listViewConfig.owl @@ -119,6 +119,10 @@ listViewConfig-relatedRole.xml + + + listViewConfig-relatedRole.xml + listViewConfig-dateTimeInterval.xml diff --git a/productMods/config/listViewConfig-relatedRole.xml b/productMods/config/listViewConfig-relatedRole.xml index 82086d4b..64185fa0 100644 --- a/productMods/config/listViewConfig-relatedRole.xml +++ b/productMods/config/listViewConfig-relatedRole.xml @@ -3,6 +3,9 @@ + + PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> @@ -10,6 +13,7 @@ PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> SELECT DISTINCT ?subclass + ?property ?role ?roleLabel ?roleTypeLabel ?indivInRole (afn:localname(?indivInRole) AS ?indivName) diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-relatedRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-relatedRole.ftl index cb03cb77..8b063e99 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-relatedRole.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-relatedRole.ftl @@ -1,6 +1,7 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -<#-- Custom object property statement view for http://vivoweb.org/ontology/core#relatedRole. +<#-- Custom object property statement view for http://vivoweb.org/ontology/core#relatedRole and + http://vivoweb.org/ontology/core#linkedRole. This template must be self-contained and not rely on other variables set for the individual page, because it is also used to generate the property statement during a deletion. @@ -26,6 +27,13 @@ <#-- Generally roles are assigned a label when entered through a custom form. Investigator and its subclasses do not, so use the type label instead. --> - ${linkedIndividual} ${statement.roleLabel!statement.roleTypeLabel!} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" /> + <#local roleLabel> + <#if statement.roleLabel?has_content>${statement.roleLabel} + <#-- Display, e.g., "Principal Investigator" for "Principal Investigator Role" --> + <#elseif statement.roleTypeLabel?has_content>${statement.roleTypeLabel?replace(" Role", "")} + + + + ${linkedIndividual} ${roleLabel!} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" /> \ No newline at end of file