NIHVIVO-1959 Added hasStatements() function for use by individual templates and especially visualization team to test and decide whether data is present to proceed with visualizations. Should eliminate initial ajax requests and the need for vivo specific code in vitro core. Work in progress.
This commit is contained in:
parent
e5b0ed9b29
commit
86d3f8ff3d
1 changed files with 31 additions and 15 deletions
|
@ -1,5 +1,22 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Function to test whether any statements exist with property as predicate -->
|
||||
<#function hasStatements property>
|
||||
<#if property.collatedBySubclass!false> <#-- collated -->
|
||||
<#if (property.subclasses?size > 0)>
|
||||
<#return true>
|
||||
<#else>
|
||||
<#return false>
|
||||
</#if>
|
||||
<#elseif property.statements??>
|
||||
<#if (property.statements?size > 0)>
|
||||
<#return true>
|
||||
<#else>
|
||||
<#return false>
|
||||
</#if>
|
||||
</#if>
|
||||
</#function>
|
||||
|
||||
<#-----------------------------------------------------------------------------
|
||||
Macros for generating property lists
|
||||
------------------------------------------------------------------------------>
|
||||
|
@ -101,7 +118,6 @@ name will be used as the label. -->
|
|||
<#-- Macros for specific properties -->
|
||||
|
||||
<#-- Vitro namespace links
|
||||
|
||||
Currently the page displays the vitro namespace links properties. Future versions
|
||||
will use the vivo core ontology links property, eliminating the need for special handling.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue