From c0026c75e5827f399ac456cf12237fc47a4991d7 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 20 Mar 2008 20:59:56 +0000 Subject: [PATCH] If there are no jdiv's left, hide the multi-select box and all the "Add >>" buttons so the page looks much nicer (and better to print!) --- admin/judges_jdiv.php | 52 ++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/admin/judges_jdiv.php b/admin/judges_jdiv.php index bbebada..4a5fe09 100644 --- a/admin/judges_jdiv.php +++ b/admin/judges_jdiv.php @@ -211,38 +211,42 @@ function get_all_divs() } } + reset($dkeys); + $showdivlist=false; + foreach($dkeys as $id) { + if($cdl[$id]['jdiv'] == 0){ $showdivlist=true; break; } + } + echo "
"; echo ""; echo ""; echo ""; echo ""; - echo ""; + echo "
"; echo ""; - echo ""; + + if($showdivlist) { + echo ""; + } echo ""; echo ""; - echo ""; - - - echo ""; } - - - echo ""; - echo ""; echo "
".i18n("Division List"); - echo "
"; - echo "
".i18n("Division List"); + echo "
"; + echo "
".i18n("Judging Division Groups")."
"; -// echo ""; -// echo "
"; + echo "
"; + echo ""; + echo ""; /* Print he groupings of the assigned ones */ @@ -251,7 +255,9 @@ function get_all_divs() echo ""; echo "
"; - echo "
"; + if($showdivlist) { + echo "
"; + } echo "
"; echo ""; echo ""; @@ -268,7 +274,7 @@ function get_all_divs() $p += $cdl[$id]['projects']; } - echo "\n"; + echo "
\n"; echo "\n";
Judging Division $jdiv ($p project".($p==1?'':'s').")"; echo "