diff --git a/webapp/web/templates/freemarker/body/classGroups.ftl b/webapp/web/templates/freemarker/body/classGroups.ftl index b32ba68f4..1965fb74b 100644 --- a/webapp/web/templates/freemarker/body/classGroups.ftl +++ b/webapp/web/templates/freemarker/body/classGroups.ftl @@ -2,19 +2,25 @@ <#-- List class groups, and classes within each group. --> -
- <#list classGroups as classGroup> - <#-- Only render classgroups that have at least one class with individuals --> - <#if (classGroup.individualCount > 0)> -

${classGroup.publicName}

- - - -
+<#include "classgroups-checkForData.ftl"> + +<#if (!noData)> +
+ <#list classGroups as classGroup> + <#-- Only render classgroups that have at least one class with individuals --> + <#if (classGroup.individualCount > 0)> +

${classGroup.publicName}

+ + + +
+<#else> + ${noDataNotification} + diff --git a/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl b/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl new file mode 100644 index 000000000..7e8b22f22 --- /dev/null +++ b/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl @@ -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 (populatedClassGroups == 0)> + <#assign noData = true /> +<#else> + <#assign noData = false /> + + +<#assign noDataNotification> +

There is currently no content in the system

+ +

Please login to manage content.

+ \ No newline at end of file