NIHVIVO-1591 Apply datetime functions and macros in lib-datetime.ftl to propStatement views

This commit is contained in:
rjy7 2011-01-10 03:10:11 +00:00
parent 21f3291f55
commit e478535592
8 changed files with 21 additions and 25 deletions

View file

@ -7,7 +7,7 @@
<@showAuthorship statement />
<#-- Use a macro to keep variable assignments local; otherwise the values are in effect for the
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showAuthorship statement>
@ -19,11 +19,7 @@
<a href="${profileUrl(statement.authorship)}">${statement.authorshipName}</a> (no linked information resource)
</#if>
</#local>
<#if statement.dateTime??>
<#local year = dt.xsdDateTimeToYear(statement.dateTime)>
</#if>
<@s.join [ linkedIndividual, year! ] />
${linkedIndividual} <@dt.yearSpan "${statement.dateTime!}" />
</#macro>

View file

@ -4,5 +4,5 @@
<#import "lib-datetime.ftl" as dt>
<@dt.dateTimeIntervalLong "${statement.dateTimeStart!}" "${statement.precisionStart!}"
"${statement.dateTimeEnd!}" "${statement.precisionEnd!}" />
${dt.dateTimeIntervalLong("${statement.dateTimeStart!}", "${statement.precisionStart!}",
"${statement.dateTimeEnd!}", "${statement.precisionEnd!}")}

View file

@ -7,8 +7,8 @@
<@showEducationalTraining statement />
<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next
statement -->
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showEducationalTraining statement>
<#local degree>
@ -26,6 +26,6 @@
</#if>
</#local>
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" false/>
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" false/>
</#macro>

View file

@ -7,8 +7,8 @@
<@showRole statement />
<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next
statement -->
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showRole statement>
<#local linkedIndividual>
@ -20,6 +20,6 @@
</#if>
</#local>
${linkedIndividual} ${statement.roleLabel!} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
${linkedIndividual} ${statement.roleLabel!} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
</#macro>

View file

@ -6,7 +6,7 @@
<@showAuthorship statement />
<#-- Use a macro to keep variable assignments local; otherwise the values are in effect for the
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showAuthorship statement>

View file

@ -7,8 +7,8 @@
<@showPosition statement />
<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next
statement -->
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showPosition statement>
<#local linkedIndividual>
@ -20,6 +20,6 @@
</#if>
</#local>
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
</#macro>

View file

@ -7,8 +7,8 @@
<@showPosition statement />
<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next
statement -->
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showPosition statement>
<#local linkedIndividual>
@ -20,6 +20,6 @@
</#if>
</#local>
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
</#macro>

View file

@ -7,8 +7,8 @@
<@showRole statement />
<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next
statement -->
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
next statement -->
<#macro showRole statement>
<#local linkedIndividual>
@ -22,6 +22,6 @@
<#-- Generally roles are assigned a label when entered through a custom form. Investigator and its subclasses do not,
so use the type label instead. -->
${linkedIndividual} ${statement.roleLabel!statement.roleTypeLabel!} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
${linkedIndividual} ${statement.roleLabel!statement.roleTypeLabel!} <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
</#macro>