Some touch-ups as per bugs logged

This commit is contained in:
jacob 2010-03-31 22:03:07 +00:00
parent 12086fc9c9
commit a738ad1a26
2 changed files with 47 additions and 17 deletions

View File

@ -396,11 +396,11 @@ function addclicked()
echo "</td></tr></table>";
echo "<table class=\"summarytable\">\n";
echo "<tr><th>Num</th>";
echo "<thead style=\"cursor:pointer\"><tr><th>Num</th>";
echo "<th>Team Name</th>";
echo "<th>Award(s)</th>";
echo "<th>Actions</th>";
echo "</tr>";
echo "</tr></thead>";
foreach($teams AS $team)
{
echo "<tr><td>#".$team['num']."</td><td>";
@ -433,7 +433,7 @@ function addclicked()
}
echo "</table>";
echo "<script type=\"text/javascript\">$('.summarytable').tablesorter();</script>";
echo "<br />";
}
}

View File

@ -221,8 +221,14 @@ function neweditor()
echo " <th>".i18n("Actions")."</th>";
echo "</tr>";
echo "</thead>";
$completeyes=0;
$completeno=0;
$tally = array();
$tally['active'] = array();
$tally['inactive'] = array();
$tally['active']['complete'] = 0;
$tally['active']['incomplete'] = 0;
$tally['inactive']['complete'] = 0;
$tally['inactive']['incomplete'] = 0;
while($r=mysql_fetch_assoc($q))
{
//JAMES - TEMP - due to the previous error with improperly setting judge status to NOT complete when special awards was turned off
@ -262,8 +268,10 @@ function neweditor()
echo "<td>";
if($r["{$t}_active"] == 'yes') {
echo "<div class=\"happy\" align=\"center\">".i18n("yes")."</div>";
$userstate = 'active';
} else {
echo "<div class=\"error\" align=\"center\">".i18n("no")."</div>";
$userstate = 'inactive';
}
echo "</td>";
@ -272,10 +280,10 @@ function neweditor()
/* Do nothing, there's nothign to complete */
} else if($r["{$t}_complete"] == 'yes') {
echo "<div class=\"happy\" align=\"center\">".i18n("yes")."</div>";
$completeyes++;
$tally[$userstate]['complete']++;
} else {
echo "<div class=\"error\" align=\"center\">".i18n("no")."</div>";
$completeno++;
$tally[$userstate]['incomplete']++;
}
echo "</td>";
@ -294,16 +302,38 @@ function neweditor()
echo "</table>";
echo i18n("Note: Deleting users from this list is a permanent operation and cannot be undone. Consider editting the user and deactivating or deleting roles in their account instead.");
echo "<br />";
echo "<br />";
echo "$num ".i18n("people listed.");
echo "<br />";
echo "$completeyes ".i18n('complete');
echo "<br />";
echo "$completeno ".i18n('incomplete');
echo "<br />";
echo "<br />";
echo "<br />";
// let's make a table with the complete/incomplete counts and the active/inacteve states
?>
<table rules="all" style="border:solid 1px; margin:2em">
<thead>
<tr><td colspan="4" align="center">List Totals</td></tr>
<tr>
<th></th>
<th>Complete</th>
<th>Incomplete</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Active</strong></td>
<td><?=$tally['active']['complete']?></td>
<td><?=$tally['active']['incomplete']?></td>
<td><?=$tally['active']['complete'] + $tally['active']['incomplete']?></td>
</tr><tr>
<td><strong>Inactive</strong></td>
<td><?=$tally['inactive']['complete']?></td>
<td><?=$tally['inactive']['incomplete']?></td>
<td><?=$tally['inactive']['complete'] + $tally['inactive']['incomplete']?></td>
</tr><tr>
<td><strong>Total</strong></td>
<td><?=$tally['active']['complete'] + $tally['inactive']['complete']?></td>
<td><?=$tally['active']['incomplete'] + $tally['inactive']['incomplete']?></td>
<td><?=$num?></td>
</tr>
</tbody>
</table>
<?php
send_footer();
?>