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 /> <@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 --> next statement -->
<#macro showAuthorship statement> <#macro showAuthorship statement>
@ -20,10 +20,6 @@
</#if> </#if>
</#local> </#local>
<#if statement.dateTime??> ${linkedIndividual} <@dt.yearSpan "${statement.dateTime!}" />
<#local year = dt.xsdDateTimeToYear(statement.dateTime)>
</#if>
<@s.join [ linkedIndividual, year! ] />
</#macro> </#macro>

View file

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

View file

@ -7,8 +7,8 @@
<@showEducationalTraining statement /> <@showEducationalTraining statement />
<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next <#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
statement --> next statement -->
<#macro showEducationalTraining statement> <#macro showEducationalTraining statement>
<#local degree> <#local degree>
@ -26,6 +26,6 @@
</#if> </#if>
</#local> </#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> </#macro>

View file

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

View file

@ -6,7 +6,7 @@
<@showAuthorship statement /> <@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 --> next statement -->
<#macro showAuthorship statement> <#macro showAuthorship statement>

View file

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

View file

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

View file

@ -7,8 +7,8 @@
<@showRole statement /> <@showRole statement />
<#-- Use a macro to keep variable assignments local; otherwise the values get passed to the next <#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
statement --> next statement -->
<#macro showRole statement> <#macro showRole statement>
<#local linkedIndividual> <#local linkedIndividual>
@ -22,6 +22,6 @@
<#-- Generally roles are assigned a label when entered through a custom form. Investigator and its subclasses do not, <#-- Generally roles are assigned a label when entered through a custom form. Investigator and its subclasses do not,
so use the type label instead. --> 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> </#macro>