NIHVIVO-2605 Initial version of list view for core:hasPresenterRole
This commit is contained in:
parent
601838d2b8
commit
482992f837
6 changed files with 196 additions and 24 deletions
|
@ -0,0 +1,32 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Custom object property statement view for http://vivoweb.org/ontology/core#hasPresenterRole.
|
||||
|
||||
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>
|
||||
|
||||
<@showRole statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showRole statement>
|
||||
<#local linkedIndividual>
|
||||
<#if statement.activity??>
|
||||
<a href="${profileUrl(statement.activity)}">${statement.activityLabel!statement.activityName}</a>
|
||||
<#else>
|
||||
<#-- This shouldn't happen, but we must provide for it -->
|
||||
<a href="${profileUrl(statement.role)}">missing activity</a>
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTime>
|
||||
<@dt.yearSpan statement.dateTimeStart! />
|
||||
</#local>
|
||||
|
||||
${linkedIndividual} ${statement.roleLabel!} ${dateTime!}
|
||||
|
||||
</#macro>
|
|
@ -23,15 +23,10 @@
|
|||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local core = "http://vivoweb.org/ontology/core#">
|
||||
<#local dateTime>
|
||||
<#if statement.property == "${core}hasPresenterRole">
|
||||
<@dt.yearSpan statement.dateTimeStart! />
|
||||
<#else>
|
||||
<@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
</#if>
|
||||
<@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
</#local>
|
||||
|
||||
|
||||
${linkedIndividual} ${statement.roleLabel!} ${dateTime!}
|
||||
|
||||
</#macro>
|
Loading…
Add table
Add a link
Reference in a new issue