Hide past positions

This commit is contained in:
Graham Triggs 2017-04-08 06:17:52 -06:00
parent 5c75f676f1
commit 4b7322e351
2 changed files with 36 additions and 0 deletions

View file

@ -37,4 +37,8 @@ article.property li h3 {
.visualization-buttons { .visualization-buttons {
text-align: center; text-align: center;
}
.pastPosition {
display: none;
} }

View file

@ -0,0 +1,32 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- List of positions for the individual -->
<#assign positions = propertyGroups.pullProperty("${core}relatedBy", "${core}Position")!>
<#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<#assign localName = positions.localName>
<h2 id="${localName}" class="mainPropGroup" title="${positions.publicDescription!}">${positions.name?capitalize} <@p.addLink positions editable /> <@p.verboseDisplay positions /></h2>
<ul id="individual-personInPosition" role="list">
<@positionsList positions editable />
</ul>
</#if>
<#macro positionsList property editable statements=property.statements template=property.template>
<#list statements as statement>
<#if property.rangeUri?? >
<#local rangeUri = property.rangeUri />
<#else>
<#local rangeUri = "" />
</#if>
<#if statement.dateTimeEnd??>
<li role="listitem" class="pastPosition">
<#include "${template}">
<@p.editingLinks "${property.localName}" "${property.name}" statement editable rangeUri/>
</li>
<#else>
<li role="listitem" class="currentPosition">
<#include "${template}">
<@p.editingLinks "${property.localName}" "${property.name}" statement editable rangeUri/>
</li>
</#if>
</#list>
</#macro>