From 7c9cadd981a0881cdc6991dbe9dbdad1a457a409 Mon Sep 17 00:00:00 2001 From: Benjamin Gross Date: Tue, 1 Dec 2015 17:21:52 -0700 Subject: [PATCH] tweak index page initHeight and don't add (cont'd) text if there aren't any more classes to show --- .../templates/freemarker/body/classGroups.ftl | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/webapp/web/templates/freemarker/body/classGroups.ftl b/webapp/web/templates/freemarker/body/classGroups.ftl index aa4fc60ef..96cc3eedb 100644 --- a/webapp/web/templates/freemarker/body/classGroups.ftl +++ b/webapp/web/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('')}