NIHVIVO-1510 Collated custom list views
This commit is contained in:
parent
e16ad50d5c
commit
dd4acf965b
2 changed files with 10 additions and 9 deletions
|
@ -33,10 +33,10 @@ public class CollatedObjectPropertyTemplateModel extends ObjectPropertyTemplateM
|
|||
super(op, subject, vreq);
|
||||
|
||||
// RY Temporarily throw an error because collation hasn't been implemented yet.
|
||||
boolean error = true;
|
||||
if (error) {
|
||||
throw new Exception("Collated object property not implemented yet");
|
||||
}
|
||||
// boolean error = true;
|
||||
// if (error) {
|
||||
// throw new Exception("Collated object property not implemented yet");
|
||||
// }
|
||||
|
||||
/* Change the approach to collation:
|
||||
* Custom views can get the subclasses in the query. Must use a term ?subclass - throw error if not.
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<#-- object property -->
|
||||
<#elseif property.collatedBySubclass>
|
||||
<@objectPropertySubclassList property />
|
||||
<@collatedObjectPropertyList property />
|
||||
<#else>
|
||||
<@objectPropertyList property.statements property.template />
|
||||
</#if>
|
||||
|
@ -52,10 +52,11 @@
|
|||
</#list>
|
||||
</#macro>
|
||||
|
||||
<#macro objectPropertySubclassList property>
|
||||
<#list property.subclasses as subclass>
|
||||
<h3>${subclass}</h3>
|
||||
<@objectPropertyList subclass.statements property.template />
|
||||
<#macro collatedObjectPropertyList property>
|
||||
<#assign subclasses = property.subclasses>
|
||||
<#list subclasses?keys as subclass>
|
||||
<h3>${subclass?lower_case}</h3>
|
||||
<@objectPropertyList subclasses[subclass] property.template />
|
||||
</#list>
|
||||
</#macro>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue