Added check for no data. When there is no content a message is displayed instead of rendering a blank index page.
This commit is contained in:
parent
12561a2d73
commit
cbf08df272
2 changed files with 42 additions and 16 deletions
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
<#-- List class groups, and classes within each group. -->
|
<#-- List class groups, and classes within each group. -->
|
||||||
|
|
||||||
|
<#include "classgroups-checkForData.ftl">
|
||||||
|
|
||||||
|
<#if (!noData)>
|
||||||
<div class="siteMap">
|
<div class="siteMap">
|
||||||
<#list classGroups as classGroup>
|
<#list classGroups as classGroup>
|
||||||
<#-- Only render classgroups that have at least one class with individuals -->
|
<#-- Only render classgroups that have at least one class with individuals -->
|
||||||
|
@ -18,3 +21,6 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
</div>
|
</div>
|
||||||
|
<#else>
|
||||||
|
${noDataNotification}
|
||||||
|
</#if>
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#list classGroups as classGroup>
|
||||||
|
<#assign populatedClassGroups = 0 />
|
||||||
|
<#-- Check to see if any of the class groups have individuals -->
|
||||||
|
<#if (classGroup.individualCount > 0)>
|
||||||
|
<#assign populatedClassGroups = populatedClassGroups + 1 />
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
<#if (populatedClassGroups == 0)>
|
||||||
|
<#assign noData = true />
|
||||||
|
<#else>
|
||||||
|
<#assign noData = false />
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#assign noDataNotification>
|
||||||
|
<h3>There is currently no content in the system</h3>
|
||||||
|
|
||||||
|
<p>Please <a href="${urls.login}" title="log in to manage this site">login</a> to manage content.</p>
|
||||||
|
</#assign>
|
Loading…
Add table
Add a link
Reference in a new issue