NIHVIVO-1610 Extracted datetime code in propStatement templates into a macro.

This commit is contained in:
rjy7 2011-01-06 21:19:44 +00:00
parent 77c1b1235c
commit 5474fe2bb7
5 changed files with 9 additions and 119 deletions

View file

@ -26,28 +26,6 @@
</#if> </#if>
</#local> </#local>
<#local dateTimeInterval> <@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" false/>
<#if statement.dateTimeStart??>
<#local startYear = dt.xsdDateTimeToYear(statement.dateTimeStart)>
</#if>
<#if statement.dateTimeEnd??>
<#local endYear = dt.xsdDateTimeToYear(statement.dateTimeEnd)>
</#if>
<#if startYear?? && endYear??>
${startYear} - ${endYear}
<#elseif startYear??>
${startYear} -
<#elseif endYear ??>
${endYear} <#-- no hyphen, so doesn't display as a range with missing start date -->
</#if>
</#local>
<#local date>
<#if dateTimeInterval?has_content>
<span class="listDateTime">${dateTimeInterval}</span>
</#if>
</#local>
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info! ] /> ${date}
</#macro> </#macro>

View file

@ -20,28 +20,6 @@
</#if> </#if>
</#local> </#local>
<#local dateTimeInterval> ${linkedIndividual} ${statement.specificRole} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
<#if statement.dateTimeStart??>
<#local startYear = dt.xsdDateTimeToYear(statement.dateTimeStart)>
</#if>
<#if statement.dateTimeEnd??>
<#local endYear = dt.xsdDateTimeToYear(statement.dateTimeEnd)>
</#if>
<#if startYear?? && endYear??>
${startYear} - ${endYear}
<#elseif startYear??>
${startYear} -
<#elseif endYear ??>
- ${endYear}
</#if>
</#local>
<#local dateInRole>
<#if dateTimeInterval?has_content>
<span class="listDateTime">${dateTimeInterval}</span>
</#if>
</#local>
${linkedIndividual} ${statement.specificRole} ${dateInRole!}
</#macro> </#macro>

View file

@ -20,28 +20,6 @@
</#if> </#if>
</#local> </#local>
<#local dateTimeInterval> <@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
<#if statement.dateTimeStart??>
<#local startYear = dt.xsdDateTimeToYear(statement.dateTimeStart)>
</#if>
<#if statement.dateTimeEnd??>
<#local endYear = dt.xsdDateTimeToYear(statement.dateTimeEnd)>
</#if>
<#if startYear?? && endYear??>
${startYear} - ${endYear}
<#elseif startYear??>
${startYear} -
<#elseif endYear ??>
- ${endYear}
</#if>
</#local>
<#local dateInPosition>
<#if dateTimeInterval?has_content>
<span class="listDateTime">${dateTimeInterval}</span>
</#if>
</#local>
<@s.join [ linkedIndividual, statement.positionTitle! ] /> ${dateInPosition!}
</#macro> </#macro>

View file

@ -20,28 +20,6 @@
</#if> </#if>
</#local> </#local>
<#local dateTimeInterval> <@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
<#if statement.dateTimeStart??>
<#local startYear = dt.xsdDateTimeToYear(statement.dateTimeStart)>
</#if>
<#if statement.dateTimeEnd??>
<#local endYear = dt.xsdDateTimeToYear(statement.dateTimeEnd)>
</#if>
<#if startYear?? && endYear??>
${startYear} - ${endYear}
<#elseif startYear??>
${startYear} -
<#elseif endYear ??>
- ${endYear}
</#if>
</#local>
<#local dateInPosition>
<#if dateTimeInterval?has_content>
<span class="listDateTime">${dateTimeInterval}</span>
</#if>
</#local>
<@s.join [ linkedIndividual, statement.positionTitle! ] /> ${dateInPosition!}
</#macro> </#macro>

View file

@ -20,28 +20,6 @@
</#if> </#if>
</#local> </#local>
<#local dateTimeInterval> ${linkedIndividual} ${statement.specificRole} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
<#if statement.dateTimeStart??>
<#local startYear = dt.xsdDateTimeToYear(statement.dateTimeStart)>
</#if>
<#if statement.dateTimeEnd??>
<#local endYear = dt.xsdDateTimeToYear(statement.dateTimeEnd)>
</#if>
<#if startYear?? && endYear??>
${startYear} - ${endYear}
<#elseif startYear??>
${startYear} -
<#elseif endYear ??>
- ${endYear}
</#if>
</#local>
<#local dateInRole>
<#if dateTimeInterval?has_content>
<span class="listDateTime">${dateTimeInterval}</span>
</#if>
</#local>
${linkedIndividual} ${statement.specificRole} ${dateInRole!}
</#macro> </#macro>