diff --git a/productMods/config/listViewConfig-hasRole.xml b/productMods/config/listViewConfig-hasRole.xml index 0b77426b..995b392f 100644 --- a/productMods/config/listViewConfig-hasRole.xml +++ b/productMods/config/listViewConfig-hasRole.xml @@ -11,11 +11,12 @@ SELECT DISTINCT ?role (afn:localname(?role) AS ?roleName) ?roleLabel - ?activity ?activityName + ?activity (afn:localname(?activity) AS ?activityName) + ?activityLabel ?dateTimeStart ?dateTimeEnd WHERE { GRAPH ?g1 { ?subject ?property ?role } OPTIONAL { GRAPH ?g2 { ?role core:roleIn ?activity } - GRAPH ?g3 { ?activity rdfs:label ?activityName } + OPTIONAL { GRAPH ?g3 { ?activity rdfs:label ?activityLabel } } } OPTIONAL { GRAPH ?g4 { ?role rdfs:label ?roleLabel } } OPTIONAL { GRAPH ?g5 { ?role core:dateTimeInterval ?dateTimeInterval } @@ -26,7 +27,7 @@ GRAPH ?g9 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } } } - } ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?personName + } ORDER BY DESC(?dateTimeEnd) DESC(?dateTimeStart) ?activityLabel ?activityName diff --git a/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl b/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl index d73e48c0..d924d9e1 100644 --- a/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl +++ b/productMods/templates/freemarker/body/partials/individual/propStatement-hasRole.ftl @@ -13,7 +13,7 @@ <#local linkedIndividual> <#if statement.activity??> - ${statement.activityName} + ${statement.activityLabel!statement.activityName} <#else> <#-- This shouldn't happen, but we must provide for it --> ${statement.roleName} (no linked activity)