NIHVIVO-1341 Implement preprocessing structure to process object property statement query data before sending to template. Reorganize markup in templates to reduce repetition.

This commit is contained in:
rjy7 2010-12-16 14:57:04 +00:00
parent dbb07aa152
commit b6b3499922
19 changed files with 241 additions and 169 deletions

View file

@ -2,10 +2,6 @@
<#-- Template for property listing on individual profile page -->
<#-- RY Just a temporary fix to prevent classgroup heading from being pushed to the right edge of the page.
Feel free to redo/remove. -->
<#--><div style="clear: both;" />-->
<#list propertyGroups as group>
<#-- Get the group name -->
@ -17,7 +13,7 @@ Feel free to redo/remove. -->
<#assign groupName = "other">
</#if>
<#else>
<#-- If there are no groups, a dummy group has been created with a null name. -->
<#-- If there are no groups, a dummy group has been created with a null (as opposed to empty) name. -->
<#assign groupName = "">
</#if>
@ -28,32 +24,27 @@ Feel free to redo/remove. -->
<h2><a name="${groupName}"></a>${groupName}</h2
</#if>
<#-- Now list the properties in the group -->
<#list group.properties as property>
<#-- List the properties in the group -->
<#list group.properties as property>
<article class="property-group" role="article">
<#-- Property display name -->
<h3>${property.name}</h3>
<#-- List the statements for each property -->
<#if property.type == "data"> <#-- data property -->
<#-- List the statements for each property -->
<#-- data property -->
<#if property.type == "data">
<#list property.statements as statement>
<p class="data-property">${statement.value}</p>
<!-- end data-prop-stmt-value -->
</#list>
<#else> <#-- object property -->
<#if property.collatedBySubclass>
<#include "objectPropertyList-collated.ftl">
<#else>
<ul class="object-property" role="list">
<#include "${property.template}">
</ul> <!-- end obj-prop-stmt-obj -->
</#if>
<#-- object property -->
<#elseif property.collatedBySubclass>
<#include "objectPropertyList-collated.ftl">
<#else>
<#include "objectPropertyList-statements.ftl">
</#if>
<!-- end property -->
</article>
</#list>
<!-- end properties -->
</section> <!-- end property-group -->
</article>
</#list>
</section>
</#list>

View file

@ -1,7 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Default object property list template -->
<#list property.statements as statement>
<li role="listitem"><a href="${statement.object.url}">${statement.object.name}</a> | ${statement.object.moniker!}</li>
</#list>

View file

@ -0,0 +1,10 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template to list statements for an object property -->
<ul class="object-property" role="list">
<#list property.statements as statement>
<li role="listitem">
<#include "${property.template}">
</li>
</#list>
</ul>

View file

@ -0,0 +1,5 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Default object property statement template -->
<a href="${statement.objectUrl}">${statement.name!"object name here"}</a> ${statement.moniker!"moniker here"}