new list view to display degrees on educational process objects

This commit is contained in:
tworrall 2014-05-22 13:25:28 -04:00
parent 032b12d414
commit 8cfaaa25c7
5 changed files with 101 additions and 1 deletions

View file

@ -484,6 +484,7 @@ org_type_capitalized = Tipo de Organización
educational_training_type = Tipo de Formación Educativa educational_training_type = Tipo de Formación Educativa
dept_or_school_name = Departamento o Nombre de la escuela en el dept_or_school_name = Departamento o Nombre de la escuela en el
degree = Grado degree = Grado
missing_degree = falta de grado
major_field = Importante sobre el terreno de Grado major_field = Importante sobre el terreno de Grado
supplemental_information = Información Complementaria supplemental_information = Información Complementaria
supplemental_information_hint = (Por ejemplo, título de la tesis, la información de transferencia, etc) supplemental_information_hint = (Por ejemplo, título de la tesis, la información de transferencia, etc)

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
<list-view-config>
<query-select>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX afn: &lt;http://jena.hpl.hp.com/ARQ/function#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
SELECT DISTINCT ?degree
?degreeName
?degreeAbbr
WHERE {
?subject ?property ?edProcess .
?edProcess a core:EducationalProcess
OPTIONAL { ?edProcess &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeName
}
OPTIONAL { ?edProcess &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree .
?degree core:abbreviation ?degreeAbbr
}
}
</query-select>
<query-construct>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeName .
?degree core:abbreviation ?degreeAbbr
} WHERE {
{
?subject ?property ?edProcess .
?edProcess a core:EducationalProcess .
?edProcess &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree .
?degree rdfs:label ?degreeName
} UNION {
?subject ?property ?edProcess .
?edProcess a core:EducationalProcess .
?edProcess &lt;http://purl.obolibrary.org/obo/RO_0002234&gt; ?awardedDegree .
?awardedDegree core:relates ?degree .
?degree a core:AcademicDegree .
?degree core:abbreviation ?degreeAbbr
}
}
</query-construct>
<template>propStatement-degreeEarned.ftl</template>
</list-view-config>

View file

@ -0,0 +1,38 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Custom object property statement view for faux property "education and training". See the PropertyConfig.3 file for details.
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.
-->
<#import "lib-sequence.ftl" as s>
<#import "lib-datetime.ftl" as dt>
<#-- Coming from propDelete, individual is not defined, but we are editing. -->
<@showEducationalTraining statement=statement editable=(!individual?? || individual.editable) />
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showEducationalTraining statement editable>
<#local degree>
<#if statement.degreeName??>
${statement.degreeAbbr!statement.degreeName}
<#if statement.majorField??> ${i18n().in} ${statement.majorField}</#if>
<#elseif statement.typeName??>
${statement.typeName!}
</#if>
</#local>
<#local linkedIndividual>
<#if statement.degree??>
<a href="${profileUrl(statement.uri("degree"))}" title="${i18n().degree}">${statement.degreeAbbr!statement.degreeName}</a>
<#else>
<#-- Show the link to the context node only if the user is editing the page. -->
${i18n().missing_degree}
</#if>
</#local>
${linkedIndividual}
</#macro>

View file

@ -537,7 +537,7 @@ local:educationalProcessDegreeContext a :ConfigContext ;
:qualifiedBy <http://vivoweb.org/ontology/core#AwardedDegree> . :qualifiedBy <http://vivoweb.org/ontology/core#AwardedDegree> .
local:educationalProcessDegreeConfig a :ObjectPropertyDisplayConfig ; local:educationalProcessDegreeConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-fauxPropertyDefault.xml"^^xsd:string ; :listViewConfigFile "listViewConfig-degreeEarned.xml"^^xsd:string ;
:displayName "degree earned" ; :displayName "degree earned" ;
vitro:displayRankAnnot 20; vitro:displayRankAnnot 20;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ; vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;

View file

@ -490,6 +490,7 @@ org_type_capitalized = Organization Type
educational_training_type = Type of Educational Training educational_training_type = Type of Educational Training
dept_or_school_name = Department or School Name within the dept_or_school_name = Department or School Name within the
degree = Degree degree = Degree
missing_degree = missing degree
major_field = Major Field of Degree major_field = Major Field of Degree
supplemental_information = Supplemental Information supplemental_information = Supplemental Information
supplemental_information_hint = (e.g., Thesis title, Transfer info, etc.) supplemental_information_hint = (e.g., Thesis title, Transfer info, etc.)