Permalink
Browse files

Result column of the eval tables is now color-coded. Closes #16.

  • Loading branch information...
1 parent d0a8e24 commit 457c1190a60ebcff6a593c136b52afa43355795c @ocelotspots ocelotspots committed Apr 4, 2012
Showing with 44 additions and 9 deletions.
  1. +22 −5 FreshEvaluation.php
  2. +22 −4 SpringEvaluation.php
View
27 FreshEvaluation.php
@@ -303,11 +303,28 @@ public function printFreshmenEvals($results){
"' onclick='submitAction(event)' value='Conditional'>\n";
echo "</td>\n";
}
- else
- {
- echo "<td class=\"center\">".$results[$i]->getResult().
- "</td>\n";
- }
+ else if( strcmp($results[$i]->getResult(), "pass") == 0 )
+ {
+ $color = "#83F52C";
+ echo "<td class=\"center\" style=\"background-color:".
+ $color.";\">".$results[$i]->getResult()."</td>\n";
+ }
+ else if( strcmp($results[$i]->getResult(), "fail") == 0 )
+ {
+ $color = "#FF0000";
+ echo "<td class=\"center\" style=\"background-color:".
+ $color.";\">".$results[$i]->getResult()."</td>\n";
+ }
+ else if( strcmp($results[$i]->getResult(), "conditional") == 0 )
+ {
+ $color = "#FFA500";
+ echo "<td class=\"center\" style=\"background-color:".
+ $color.";\">".$results[$i]->getResult()."</td>\n";
+ }
+ else
+ {
+ echo "<td class=\"center\">".$results[$i]->getResult()."</td>\n";
+ }
echo "</tr>\n";
}
View
26 SpringEvaluation.php
@@ -178,10 +178,28 @@ public function printSpringEvals($results){
echo "<input type='button' class='status' name='".$results[$i]->getUsername()."' onclick='submitAction(event)' value='Conditional'>\n";
echo "</td>\n";
}
- else
- {
- echo "<td class=\"center\">".$results[$i]->getResult()."</td>\n";
- }
+ else if( strcmp($results[$i]->getResult(), "pass") == 0 )
+ {
+ $color = "#83F52C";
+ echo "<td class=\"center\" style=\"background-color:".$color.";\">".
+ $results[$i]->getResult()."</td>\n";
+ }
+ else if( strcmp($results[$i]->getResult(), "fail") == 0 )
+ {
+ $color = "#FF0000";
+ echo "<td class=\"center\" style=\"background-color:".$color.";\">".
+ $results[$i]->getResult()."</td>\n";
+ }
+ else if( strcmp($results[$i]->getResult(), "conditional") == 0 )
+ {
+ $color = "#FFA500";
+ echo "<td class=\"center\" style=\"background-color:".$color.";\">".
+ $results[$i]->getResult()."</td>\n";
+ }
+ else
+ {
+ echo "<td class=\"center\">".$results[$i]->getResult()."</td>\n";
+ }
echo "</tr>\n";
}

0 comments on commit 457c119

Please sign in to comment.