qrCodes changes to handle exception more gracefully, grants list view now displays the dates from the grant if they are not at the role level.

This commit is contained in:
tworrall 2012-01-13 15:22:37 +00:00
parent 313463d37e
commit 3273fce539
4 changed files with 75 additions and 27 deletions

View file

@ -18,7 +18,9 @@
?adminedBy
?awardedByLabel
?adminedByLabel
?dateTimeStart ?dateTimeEnd WHERE {
?dateTimeStartRole ?dateTimeEndRole
?dateTimeStartGrant ?dateTimeEndGrant
WHERE {
?subject ?property ?role
@ -48,12 +50,22 @@
}
OPTIONAL { ?role rdfs:label ?roleLabel }
OPTIONAL { ?role core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
OPTIONAL { ?role core:dateTimeInterval ?dateTimeIntervalRole
OPTIONAL { ?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
}
OPTIONAL { ?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
OPTIONAL { ?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
}
}
OPTIONAL { ?role rdfs:label ?roleLabel }
OPTIONAL { ?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant
OPTIONAL { ?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
}
OPTIONAL { ?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
}
}
<critical-data-required>
@ -149,14 +161,14 @@
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:start ?dateTimeStartValueRole .
?dateTimeStartValueRole core:dateTime ?dateTimeStartRole
}
</query-construct>
@ -164,14 +176,47 @@
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
} WHERE {
?subject ?property ?role .
?role core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
?role core:dateTimeInterval ?dateTimeIntervalRole .
?dateTimeIntervalRole core:end ?dateTimeEndValueRole .
?dateTimeEndValueRole core:dateTime ?dateTimeEndRole
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
} WHERE {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:start ?dateTimeStartValueGrant .
?dateTimeStartValueGrant core:dateTime ?dateTimeStartGrant
}
</query-construct>
<query-construct>
PREFIX core: &lt;http://vivoweb.org/ontology/core#&gt;
CONSTRUCT {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
} WHERE {
?subject ?property ?role .
?role core:roleContributesTo ?grant .
?grant core:dateTimeInterval ?dateTimeIntervalGrant .
?dateTimeIntervalGrant core:end ?dateTimeEndValueGrant .
?dateTimeEndValueGrant core:dateTime ?dateTimeEndGrant
}
</query-construct>

View file

@ -1,11 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Page providing options for disseminating QR codes -->
<#assign qrCodeWidth = "150">
<#include "individual-qrCodeGenerator.ftl">
<#assign qrCodeWidth = "150">
<h2>Export QR Code <em>(<a href="${individual.qrData().aboutQrCodesUrl}" title="More info on QR codes">What is this?</a>)</em></h2>
<#assign thumbUrl = individual.thumbUrl! "${urls.images}/placeholders/person.thumbnail.jpg" >
@ -15,17 +14,17 @@
<section class="vcard">
<h4>VCard</h4>
<@qrCodeVCard qrCodeWidth="150" />
<@qrCodeVCard qrCodeWidth />
<textarea name="qrCodeVCard" readonly>
&lt;img src="${getQrCodeUrlForVCard(qrCodeWidth)}" /&gt;<#t>
&lt;img src="${getQrCodeUrlForVCard(qrCodeWidth)!}" /&gt;<#t>
</textarea><#t>
</section>
<section>
<h4>Hyperlink</h4>
<@qrCodeLink qrCodeWidth="150" />
<@qrCodeLink qrCodeWidth />
<textarea name="qrCodeLink" readonly>
&lt;img src="${getQrCodeUrlForLink(qrCodeWidth)}" /&gt;<#t>
&lt;img src="${getQrCodeUrlForLink(qrCodeWidth)!}" /&gt;<#t>
</textarea><#t>
</section>

View file

@ -4,7 +4,7 @@
<#macro qrCodeVCard qrCodeWidth>
<#local qrCodeUrl = getQrCodeUrlForVCard(qrCodeWidth)>
<#local qrCodeUrl = getQrCodeUrlForVCard(qrCodeWidth)!>
<#if qrCodeUrl != "">
<img src="${qrCodeUrl}" />
@ -13,7 +13,7 @@
<#macro qrCodeLink qrCodeWidth>
<#local qrCodeUrl = getQrCodeUrlForLink(qrCodeWidth)>
<#local qrCodeUrl = getQrCodeUrlForLink(qrCodeWidth)!>
<#if qrCodeUrl != "">
<img src="${qrCodeUrl}" />

View file

@ -31,7 +31,11 @@
</#local>
<#local dateTime>
<@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
<#if statement.dateTimeStartRole?has_content >
<@dt.yearIntervalSpan "${statement.dateTimeStartRole!}" "${statement.dateTimeEndRole!}" />
<#else>
<@dt.yearIntervalSpan "${statement.dateTimeStartGrant!}" "${statement.dateTimeEndGrant!}" />
</#if>
</#local>
${linkedIndividual} ${awardOrAdminBy} ${dateTime!}