forked from science-ation/science-ation
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!)
This commit is contained in:
parent
560d799b4b
commit
c0026c75e5
@ -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 "<form name=\"jdivs\" method=\"post\" action=\"judges_jdiv.php\">";
|
||||
echo "<input type=\"hidden\" name=\"action\">";
|
||||
echo "<input type=\"hidden\" name=\"jdivs\" value=\"$jdivs\">";
|
||||
echo "<input type=\"hidden\" name=\"jdiv_id\">";
|
||||
echo "<input type=\"hidden\" name=\"judges_id\">";
|
||||
echo "<table width=100%>";
|
||||
echo "<table width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<th width=25% >".i18n("Division List");
|
||||
echo "<br />";
|
||||
echo "</th>";
|
||||
|
||||
if($showdivlist) {
|
||||
echo "<th width=\"25%\">".i18n("Division List");
|
||||
echo "<br />";
|
||||
echo "</th>";
|
||||
}
|
||||
echo "<th>".i18n("Judging Division Groups")."</th>";
|
||||
echo "</tr>";
|
||||
echo "<tr><td valign=\"top\">";
|
||||
// echo "<table width=\"100%\"><tr>";
|
||||
// echo "</tr></table>";
|
||||
echo "<tr>";
|
||||
|
||||
|
||||
|
||||
echo "<select name=\"cdllist[]\" multiple=\"multiple\" style=\"width: 300px; height: 600px;\">";
|
||||
|
||||
|
||||
/* Print the list of all unassigned divs */
|
||||
reset($dkeys);
|
||||
foreach($dkeys as $id) {
|
||||
if($cdl[$id]['jdiv'] != 0) continue;
|
||||
echo "<option value=\"$id\">{$cdl[$id]['name']}</option>\n";
|
||||
if($showdivlist) {
|
||||
echo "<td valign=\"top\">";
|
||||
echo "<select name=\"cdllist[]\" multiple=\"multiple\" style=\"width: 300px; height: 600px;\">";
|
||||
/* Print the list of all unassigned divs */
|
||||
reset($dkeys);
|
||||
foreach($dkeys as $id) {
|
||||
if($cdl[$id]['jdiv'] != 0) continue;
|
||||
echo "<option value=\"$id\">{$cdl[$id]['name']}</option>\n";
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
}
|
||||
|
||||
|
||||
echo "</select>";
|
||||
echo "</td>";
|
||||
echo "<td valign=\"top\">";
|
||||
|
||||
/* Print he groupings of the assigned ones */
|
||||
@ -251,7 +255,9 @@ function get_all_divs()
|
||||
|
||||
echo "<table width=\"100%\">";
|
||||
echo "<tr><td valign=top width=\"80\">";
|
||||
echo "<input onclick=\"addbuttonclicked('$jdiv')\" type=\"button\" value=\"Add >>\"><br />";
|
||||
if($showdivlist) {
|
||||
echo "<input onclick=\"addbuttonclicked('$jdiv')\" type=\"button\" value=\"Add >>\"><br />";
|
||||
}
|
||||
echo "<br />";
|
||||
echo "<a onclick=\"return confirmClick('Are you sure you want to empty all the divisions from this grouping?')\" href=\"judges_jdiv.php?action=empty&jdiv_id=$jdiv \">";
|
||||
echo "<img border=0 src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\">";
|
||||
@ -268,7 +274,7 @@ function get_all_divs()
|
||||
$p += $cdl[$id]['projects'];
|
||||
}
|
||||
|
||||
echo "<table class=\"tableedit\">\n";
|
||||
echo "<table class=\"tableedit\" width=\"95%\">\n";
|
||||
echo "<tr><th colspan=\"2\" align=\"left\">Judging Division $jdiv ($p project".($p==1?'':'s').")";
|
||||
echo "</th></tr>\n";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user