new list view for grants and contracts awarded by organizations

This commit is contained in:
tworrall 2014-05-21 13:03:39 -04:00
parent 51af4db0d2
commit 6ce1e4be33
3 changed files with 71 additions and 1 deletions

View file

@ -0,0 +1,48 @@
<?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 foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX obo: &lt;http://purl.obolibrary.org/obo/&gt;
SELECT DISTINCT ?grantOrContract
?label
WHERE {
?subject ?property ?grantOrContract .
OPTIONAL { ?grantOrContract rdfs:label ?label .
}
} ORDER BY ?label
</query-select>
<query-construct>
PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX obo: &lt;http://purl.obolibrary.org/obo/&gt;
CONSTRUCT {
?subject ?property ?grantOrContract .
?grantOrContract rdfs:label ?label .
} WHERE {
{
?subject ?property ?grantOrContract .
} UNION {
?subject ?property ?grantOrContract .
?grantOrContract a core:Grant .
?grantOrContract rdfs:label ?label .
} UNION {
?subject ?property ?grantOrContract .
?grantOrContract a core:Contract .
?grantOrContract rdfs:label ?label .
}
}
</query-construct>
<template>propStatement-organizationAwardsGrant.ftl</template>
</list-view-config>

View file

@ -0,0 +1,22 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#--
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.
-->
<@showAwardsGrant statement />
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showAwardsGrant statement>
<#local linkedIndividual>
<#if statement.grantOrContract??>
<a href="${profileUrl(statement.uri("grantOrContract"))}" title="${i18n().grant_name}">${statement.label!""}</a>
</#if>
</#local>
${linkedIndividual!}
</#macro>

View file

@ -1635,7 +1635,7 @@ local:orgAwardsGrantContext a :ConfigContext ;
:qualifiedBy <http://vivoweb.org/ontology/core#Grant> .
local:orgAwardsGrantConfig a :ObjectPropertyDisplayConfig ;
:listViewConfigFile "listViewConfig-fauxPropertyDefault.xml"^^xsd:string ;
:listViewConfigFile "listViewConfig-organizationAwardsGrant.xml"^^xsd:string ;
:displayName "awards grant" ;
vitro:displayRankAnnot 60;
vitro:hiddenFromDisplayBelowRoleLevelAnnot role:public ;