NIHVIVO-1678 Updated menupage templates to handle VClasses with zero individuals.
This commit is contained in:
parent
00691d1d40
commit
8e24bb1350
2 changed files with 16 additions and 2 deletions
|
@ -9,12 +9,23 @@ instead of the full URL of the requested page? Chintan was also asking for a
|
||||||
template variable with the domain name for an AJAX request with visualizations.
|
template variable with the domain name for an AJAX request with visualizations.
|
||||||
------------------------------------------------------------------------------------>
|
------------------------------------------------------------------------------------>
|
||||||
<#assign domainName = requestedPage?substring(0, requestedPage?index_of("/", 7)) />
|
<#assign domainName = requestedPage?substring(0, requestedPage?index_of("/", 7)) />
|
||||||
|
<#list vClassGroup as vClass>
|
||||||
|
<#if (vClass.entityCount > 0)>
|
||||||
|
<#assign firstNonEmptyVClass = vClass.URI />
|
||||||
|
<#break>
|
||||||
|
</#if>
|
||||||
|
<#-- test if we're at the last class. If we've gotten this far, none of the classes have any individuals -->
|
||||||
|
<#if !vClass_has_next>
|
||||||
|
<#assign firstNonEmptyVClass = "false">
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var menupageData = {
|
var menupageData = {
|
||||||
baseUrl: '${domainName + urls.base}',
|
baseUrl: '${domainName + urls.base}',
|
||||||
dataServiceUrl: '${domainName + urls.base}/dataservice?getLuceneIndividualsByVClass=1&vclassId=',
|
dataServiceUrl: '${domainName + urls.base}/dataservice?getLuceneIndividualsByVClass=1&vclassId=',
|
||||||
defaultBrowseVClassUri: '${vClassGroup[0].URI}'
|
defaultBrowseVClassUri: '${firstNonEmptyVClass}'
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
<nav role="navigation">
|
<nav role="navigation">
|
||||||
<ul id="vgraph-childClasses" role="list">
|
<ul id="vgraph-childClasses" role="list">
|
||||||
<#list vClassGroup as vClass>
|
<#list vClassGroup as vClass>
|
||||||
<li role="listitem"><a href="#browse-by" title="Browse all people in this class" data-uri="${vClass.URI}">${vClass.name} <span class="count-classes">(${vClass.entityCount})</span></a></li>
|
<#-- Only display vClasses with individuals -->
|
||||||
|
<#if (vClass.entityCount > 0)>
|
||||||
|
<li role="listitem"><a href="#browse-by" title="Browse all people in this class" data-uri="${vClass.URI}">${vClass.name} <span class="count-classes">(${vClass.entityCount})</span></a></li>
|
||||||
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
Loading…
Add table
Add a link
Reference in a new issue