diff --git a/webapp/src/main/webapp/templates/freemarker/body/classGroups.ftl b/webapp/src/main/webapp/templates/freemarker/body/classGroups.ftl index aa4fc60ef..96cc3eedb 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/classGroups.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/classGroups.ftl @@ -8,12 +8,19 @@
<#list classGroups as classGroup> - <#assign groupSize = classGroup.classes?size > + <#assign groupSize = 0 > <#assign classCount = 0 > <#assign splitGroup = false> <#-- Only render classgroups that have at least one populated class --> - <#if (classGroup.individualCount > 0)> -
+ <#if (classGroup.individualCount > 0)> + + <#list classGroup.classes as class> + <#if (class.individualCount > 0)> + <#assign groupSize = groupSize + 1 > + + + +

${classGroup.displayName}

    <#list classGroup.classes as class> @@ -22,7 +29,7 @@
  • ${class.name} (${class.individualCount})
  • <#assign classCount = classCount + 1 > - <#if (classCount > 34) && !splitGroup > + <#if (classCount > 34) && (classCount < groupSize) && !splitGroup > <#assign splitGroup = true >
@@ -40,7 +47,7 @@ ${headScripts.add('')}