From c833e512e250627e7d3a0aa546af902e58b7cd8b Mon Sep 17 00:00:00 2001 From: rjy7 Date: Mon, 31 Jan 2011 15:00:24 +0000 Subject: [PATCH] NIHVIVO-1727 Allow for optional activity label, using activity local name when no label exists. --- productMods/config/listViewConfig-hasRole.xml | 7 ++++--- .../body/partials/individual/propStatement-hasRole.ftl | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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)