From 07bf2f6c14f047b8c1040ef6950b495360dddc5b Mon Sep 17 00:00:00 2001 From: rjy7 Date: Thu, 16 Dec 2010 22:53:10 +0000 Subject: [PATCH] NIHVIVO-1336 Educational training short view --- .../objectPropertyList-educationalTraining.xml | 8 ++++---- .../individual/shortView-educationalTraining.ftl | 14 +++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/productMods/config/objectPropertyList-educationalTraining.xml b/productMods/config/objectPropertyList-educationalTraining.xml index feffb15b..aa942768 100644 --- a/productMods/config/objectPropertyList-educationalTraining.xml +++ b/productMods/config/objectPropertyList-educationalTraining.xml @@ -5,15 +5,15 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX core: <http://vivoweb.org/ontology/core#> - SELECT DISTINCT ?edTraining ?org ?orgName ?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime WHERE { + SELECT DISTINCT ?edTraining ?org ?orgName ?degree ?degreeName ?degreeAbbr ?majorField ?deptOrSchool ?info ?dateTime WHERE { ?edTraining core:trainingAtOrganization ?org . ?org rdfs:label ?orgName OPTIONAL { ?edTraining core:degreeEarned ?degree . } OPTIONAL { ?degree rdfs:label ?degreeName . } OPTIONAL { ?degree core:abbreviation ?degreeAbbr . } - OPTIONAL { ?degree core:majorField ?majorField . } - OPTIONAL { ?degree core:departmentOrSchool ?deptOrSchool . } - OPTIONAL { ?degree core:supplementalInformation ?info . } + OPTIONAL { ?edTraining core:majorField ?majorField . } + OPTIONAL { ?edTraining core:departmentOrSchool ?deptOrSchool . } + OPTIONAL { ?edTraining core:supplementalInformation ?info . } OPTIONAL { ?edTraining core:dateTimeInterval ?interval . } OPTIONAL { ?interval core:hasDateTimeValue ?dateTime . } } ORDER BY DESC(?dateTime) diff --git a/productMods/templates/freemarker/body/partials/individual/shortView-educationalTraining.ftl b/productMods/templates/freemarker/body/partials/individual/shortView-educationalTraining.ftl index e75ac736..11508a9e 100644 --- a/productMods/templates/freemarker/body/partials/individual/shortView-educationalTraining.ftl +++ b/productMods/templates/freemarker/body/partials/individual/shortView-educationalTraining.ftl @@ -2,4 +2,16 @@ <#-- Custom object property statement short view for http://vivoweb.org/ontology/core#educationalTraining --> -${statement.orgName} ${statement.degreeName} +<#import "lib-sequence.ftl" as s> + +<#compress> +<#assign degree> + <#if statement.degree??> + <@s.join [ statement.degreeAbbr!statement.degreeName, statement.majorField! ], " in " /> + + + +<#assign org>${statement.orgName} + +<@s.join [ degree, org, statement.deptOrSchool!, statement.info!, statement.datetime! ] /> + \ No newline at end of file