NIHVIVO-1610 Extracted datetime code in propStatement templates into a macro.
This commit is contained in:
parent
77c1b1235c
commit
5474fe2bb7
5 changed files with 9 additions and 119 deletions
|
@ -25,29 +25,7 @@
|
|||
<a href="${profileUrl(statement.edTraining)}">${statement.edTrainingName}</a> (no linked organization)
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTimeInterval>
|
||||
<#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}
|
||||
|
||||
<@s.join [ degree, linkedIndividual, statement.deptOrSchool!, statement.info! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" false/>
|
||||
|
||||
</#macro>
|
|
@ -19,29 +19,7 @@
|
|||
<a href="${profileUrl(statement.role)}">${statement.roleName}</a> (no linked activity)
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTimeInterval>
|
||||
<#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!}
|
||||
|
||||
${linkedIndividual} ${statement.specificRole} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
|
||||
</#macro>
|
|
@ -19,29 +19,7 @@
|
|||
<a href="${profileUrl(statement.position)}">${statement.positionName}</a> (no linked person)
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTimeInterval>
|
||||
<#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!}
|
||||
|
||||
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
|
||||
</#macro>
|
|
@ -20,28 +20,6 @@
|
|||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTimeInterval>
|
||||
<#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!}
|
||||
<@s.join [ linkedIndividual, statement.positionTitle! ] /> <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
|
||||
</#macro>
|
|
@ -19,29 +19,7 @@
|
|||
<a href="${profileUrl(statement.role)}">${statement.roleName}</a> (no linked individual in this role)
|
||||
</#if>
|
||||
</#local>
|
||||
|
||||
<#local dateTimeInterval>
|
||||
<#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!}
|
||||
|
||||
${linkedIndividual} ${statement.specificRole} <@dt.yearInterval "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||
|
||||
</#macro>
|
Loading…
Add table
Reference in a new issue