diff --git a/admin/events.php b/admin/events.php
index 80ab229..5b3cd43 100644
--- a/admin/events.php
+++ b/admin/events.php
@@ -47,11 +47,14 @@ $editor = new TableEditor('events',
"summary" => "Summary",
"website" => "Link to Description",
"suggested_grades" => "Suggested Grades",
- "min_judges" => "Minimum Number of Judges",
- "max_judges" => "Maximum Number of Judges",
+ "default_min_teams" => "Minimum Number of Teams",
"default_max_teams" => "Maximum Number of Teams",
"default_min_team_size" => "Minimum Team Size",
- "default_max_team_size" => "Maximum Team Size"
+ "default_max_team_size" => "Maximum Team Size",
+ "default_min_judges" => "Minimum Number of Judges",
+ "default_max_judges" => "Maximum Number of Judges",
+ "default_min_volunteers" => "Minimum Number of Volunteers",
+ "default_max_volunteers" => "Maximum Number of Volunteers"
),
array(
"conferences_id" => $conference['id']
@@ -68,6 +71,19 @@ $editor->setPrimaryKey("id");
$editor->setRecordType("Event");
$editor->setDefaultSortField("eventtype,name");
$editor->filterList("conferences_id", $conference['id']);
+
+$editor->setFieldDefaultValue("default_min_teams",1);
+$editor->setFieldDefaultValue("default_max_teams",4);
+
+$editor->setFieldDefaultValue("default_min_team_size",1);
+$editor->setFieldDefaultValue("default_max_team_size",6);
+
+$editor->setFieldDefaultValue("default_min_judges",1);
+$editor->setFieldDefaultValue("default_max_judges",2);
+
+$editor->setFieldDefaultValue("default_min_volunteers",1);
+$editor->setFieldDefaultValue("default_max_volunteers",5);
+
$editor->execute();
send_footer();
diff --git a/admin/schedule.php b/admin/schedule.php
index eabf3dc..ff0a965 100644
--- a/admin/schedule.php
+++ b/admin/schedule.php
@@ -72,8 +72,8 @@
}
echo "";
foreach($locations AS $id=>$name) {
- echo "
";
- echo " | ";
+ echo "";
+ echo " | ";
}
echo "";
}
@@ -99,14 +99,44 @@
echo format_time($starttime);
echo " to ";
echo format_time($endtime);
+ echo "
";
if($r->eventtype=="scienceolympic") {
- echo "
";
- echo i18n("Teams")." : ";
- $regteams=getNumRegistrations($r->id);
- $maxteams=$r->somaxteams;
- echo i18n("%1 of %2",array($regteams,$maxteams));
+ $regteams=getNumRegistrations($r->id);
+ $minteams=$r->sominteams;
+ $maxteams=$r->somaxteams;
+ if($regteams<$minteams || $regteams >$maxteams)
+ $cl="class=\"error\"";
+ else $cl="";
+ echo "";
+ echo i18n("Teams")." : ";
+ echo i18n("%1 of %2-%3",array($regteams,$minteams,$maxteams));
+ echo "";
+ echo "
";
+
+ $regjudges=getNumJudges($r->id);
+ $minjudges=$r->sominjudges;
+ $maxjudges=$r->somaxjudges;
+ if($regjudges<$minjudges || $regjudges >$maxjudges)
+ $cl="class=\"error\"";
+ else $cl="";
+ echo "";
+ echo i18n("Judges")." : ";
+ echo i18n("%1 of %2-%3",array($regjudges,$minjudges,$maxjudges));
+ echo "";
+ echo "
";
+
+ $regvolunteers=getNumVolunteers($r->id);
+ $minvolunteers=$r->sominvolunteers;
+ $maxvolunteers=$r->somaxvolunteers;
+ if($regvolunteers<$minvolunteers || $regvolunteers>$maxvolunteers)
+ $cl="class=\"error\"";
+ else $cl="";
+ echo "";
+ echo i18n("Volunteers")." : ";
+ echo i18n("%1 of %2-%3",array($regvolunteers,$minvolunteers,$maxvolunteers));
+ echo "";
}
echo "";
@@ -168,7 +198,12 @@
duration='".mysql_real_escape_string($_POST['duration'])."',
events_id='$event_id',
locations_id='".mysql_real_escape_string($_POST['location_id'])."',
+ sominteams='".mysql_real_escape_string($_POST['sominteams'])."',
somaxteams='".mysql_real_escape_string($_POST['somaxteams'])."',
+ sominjudges='".mysql_real_escape_string($_POST['sominjudges'])."',
+ somaxjudges='".mysql_real_escape_string($_POST['somaxjudges'])."',
+ sominvolunteers='".mysql_real_escape_string($_POST['sominvolunteers'])."',
+ somaxvolunteers='".mysql_real_escape_string($_POST['somaxvolunteers'])."',
sominteamsize='".mysql_real_escape_string($_POST['sominteamsize'])."',
somaxteamsize='".mysql_real_escape_string($_POST['somaxteamsize'])."'
WHERE id='$id' AND conferences_id='{$conference['id']}'");
@@ -248,7 +283,7 @@
if($("#"+tablecellid).length) {
var eheight=((eventobj.duration/15)*=$ROWHEIGHT?>)- echo $BORDERSIZE*2; ?>;
- var ewidth=$("#"+tablecellid).width()- echo $BORDERSIZE; ?>;
+ var ewidth=$("#"+tablecellid).width()- echo $BORDERSIZE*2; ?>;
var p=$("#"+tablecellid).offset();
$("#"+item.id).css(p);
$("#"+item.id).show();
@@ -285,7 +320,15 @@
if(json.eventtype=="scienceolympic") {
//science olympics tab
+ $("#edit_sominteams").val(json.sominteams);
$("#edit_somaxteams").val(json.somaxteams);
+
+ $("#edit_sominjudges").val(json.sominjudges);
+ $("#edit_somaxjudges").val(json.somaxjudges);
+
+ $("#edit_sominvolunteers").val(json.sominvolunteers);
+ $("#edit_somaxvolunteers").val(json.somaxvolunteers);
+
$("#edit_sominteamsize").val(json.sominteamsize);
$("#edit_somaxteamsize").val(json.somaxteamsize);
@@ -317,11 +360,21 @@
//science olympics tab
$("#edit_somaxteams").val("");
+ $("#edit_sominteams").val("");
+
+ $("#edit_somaxjudges").val("");
+ $("#edit_sominjudges").val("");
+
+ $("#edit_somaxvolunteers").val("");
+ $("#edit_sominvolunteers").val("");
+
$("#edit_sominteamsize").val("");
$("#edit_somaxteamsize").val("");
$("#schedule_tabs").tabs('select',0);
+ $("#event_editor_tab_scienceolympics_registeredteams").html("");
+
}
$("#event_editor_dialog").dialog('option','width',600);
$("#event_editor_dialog").dialog('option','height',400);
diff --git a/admin/schedule_edit_dialog.php b/admin/schedule_edit_dialog.php
index 1ccae98..e61d3cd 100644
--- a/admin/schedule_edit_dialog.php
+++ b/admin/schedule_edit_dialog.php
@@ -61,7 +61,15 @@ function event_change() {
$("#edit_title").val($("#edit_event option:selected").text());
//}
var ed=eventdefaults[ea[0]];
+ $("#edit_sominteams").val(ed.default_min_teams);
$("#edit_somaxteams").val(ed.default_max_teams);
+
+ $("#edit_sominjudges").val(ed.default_min_judges);
+ $("#edit_somaxjudges").val(ed.default_max_judges);
+
+ $("#edit_sominvolunteers").val(ed.default_min_volunteers);
+ $("#edit_somaxvolunteers").val(ed.default_max_volunteers);
+
$("#edit_somaxteamsize").val(ed.default_max_team_size);
$("#edit_sominteamsize").val(ed.default_min_team_size);
}
@@ -142,27 +150,39 @@ echo "";
+
-echo "
";
echo "
".i18n("Judges")."
";
echo "
";
diff --git a/db/db.code.version.txt b/db/db.code.version.txt
index 0d38910..964480f 100644
--- a/db/db.code.version.txt
+++ b/db/db.code.version.txt
@@ -1 +1 @@
-212
+213
diff --git a/db/db.update.213.sql b/db/db.update.213.sql
new file mode 100644
index 0000000..3edf147
--- /dev/null
+++ b/db/db.update.213.sql
@@ -0,0 +1,11 @@
+ALTER TABLE `schedule` ADD `sominteams` INT NOT NULL AFTER `title`;
+ALTER TABLE `schedule` ADD `sominjudges` INT NOT NULL AFTER `somaxteams` ,
+ADD `somaxjudges` INT NOT NULL AFTER `sominjudges` ,
+ADD `sominvolunteers` INT NOT NULL AFTER `somaxjudges` ,
+ADD `somaxvolunteers` INT NOT NULL AFTER `sominvolunteers`;
+ALTER TABLE `events` CHANGE `min_judges` `default_min_judges` INT( 11 ) NULL DEFAULT NULL;
+ALTER TABLE `events` CHANGE `max_judges` `default_max_judges` INT( 11 ) NULL DEFAULT NULL;
+ALTER TABLE `events` ADD `default_min_teams` INT NOT NULL AFTER `default_max_judges`;
+ALTER TABLE `events` ADD `default_min_volunteers` INT NOT NULL ,
+ADD `default_max_volunteers` INT NOT NULL;
+
diff --git a/schedule.inc.php b/schedule.inc.php
index a645a3c..67d498c 100644
--- a/schedule.inc.php
+++ b/schedule.inc.php
@@ -21,7 +21,7 @@
Boston, MA 02111-1307, USA.
*/
-$ROWHEIGHT=20;
+$ROWHEIGHT=32;
$BORDERSIZE=2;
@@ -44,6 +44,18 @@ function getNumRegistrations($scheduleid) {
return $r->num;
}
+//FIXME: implement getNumJudges
+function getNumJudges($scheduleid) {
+ global $conference;
+ return 0;
+}
+
+//FIXME: implement getNumVolunteers
+function getNumVolunteers($scheduleid) {
+ global $conference;
+ return 0;
+}
+
function getEventList($conferencesId, $school_id){
global $conference;
$events = array();
diff --git a/schoolschedule.php b/schoolschedule.php
index 802c0b9..47ddd0e 100644
--- a/schoolschedule.php
+++ b/schoolschedule.php
@@ -88,8 +88,8 @@ if($_GET['action']=="loadschedule") {
}
echo "";
foreach($locations AS $id=>$name) {
- echo "";
- echo " | ";
+ echo "";
+ echo " | ";
}
echo "";
}
@@ -124,9 +124,9 @@ if($_GET['action']=="loadschedule") {
echo format_time($starttime);
echo " to ";
echo format_time($endtime);
-
+ echo "
";
+
if($eventType == "scienceolympic") {
- echo "
";
echo i18n("Capacity").": ";
$regteams = getNumRegistrations($eid);
$maxteams= $event['somaxteams'];
diff --git a/theme/default/sfiab.css b/theme/default/sfiab.css
index 45425a6..885c5a9 100644
--- a/theme/default/sfiab.css
+++ b/theme/default/sfiab.css
@@ -1,3 +1,5 @@
+*{margin:0}
+
body
{
font-family: Verdana, Arial, Sans-Serif;
@@ -643,9 +645,10 @@ ul.conferencenav li a:hover {
.schedule {
- border: 2px solid black;
+ border: 2px solid silver;
border-collapse: collapse;
margin-left: 20px;
+ padding: 0px;
}
.schedule th {
@@ -654,15 +657,24 @@ ul.conferencenav li a:hover {
font-weight: bold;
width: 150px;
text-align: center;
- border: 1px solid black;
+ border: 0px solid black;
+ padding: 0px;
}
.schedule td {
- border: 1px solid #CCCCCC;
- height: 20px;
+ border: 0px;
+ padding: 0px;
+ margin: 0px;
overflow: auto;
}
+.schedule td div {
+ padding: 0px;
+ margin: 0px;
+ height: 30px;
+ border: 1px solid #CCCCCC;
+}
+
.scheduletime {
font-size: 0.8em;
font-weight: bold;
@@ -676,15 +688,18 @@ ul.conferencenav li a:hover {
position: absolute;
border: 2px solid #777777;
background: #FFC143;
- width: 150px;
margin:0;
- width: 148px;
z-index: 1000;
display: none;
overflow: auto;
font-size: 0.8em;
text-align: center;
cursor: pointer;
+ padding: 0px;
+ box-sizing: content-box;
+ moz-box-sizing: content-box;
+ webkit-box-sizing: content-box;
+
}
.scheduleevent_title {