Skip to content

Commit

Permalink
Show same place for equal sweepstakes score
Browse files Browse the repository at this point in the history
  • Loading branch information
sushain97 committed Feb 22, 2015
1 parent cfcbc9e commit 01433c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 14 additions & 2 deletions war/html/templates/categorySweepstakes.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,24 @@ <h2>
<th title="Click to sort">Score</th>
</tr>
</thead>
#set($lastPlacingScore = -1)
#set($lastPlace = -1)
#foreach($school in $winners.get($test))
#set($score = $school.getScore($test))
#if($foreach.count > $trophy * 2 && !$admin)
#break
#end
<tr>
<td> $foreach.count #if($foreach.count <= $trophy) <i class="fa fa-trophy"></i> #end</td>
<td>
#if($score.equals($lastPlacingScore))
$lastPlace
#else
$foreach.count
#set($lastPlace = $foreach.count)
#set($lastPlacingScore = $score)
#end
#if($foreach.count <= $trophy) <i class="fa fa-trophy"></i> #end
</td>

#set($schoolName = $school.getName())
#if($admin)
Expand All @@ -37,7 +49,7 @@ <h2>
$student.getScore($test).getScoreNum() <br>
#end">

$school.getScore($test)
$score
</a>
</td>
</tr>
Expand Down
3 changes: 2 additions & 1 deletion war/html/templates/categoryWinners.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ <h2>
#if($foreach.count > $trophy + $medal && !$admin)
#break
#end
<td> #if($score.equals($lastPlacingScore))
<td>
#if($score.equals($lastPlacingScore))
$lastPlace
#else
$foreach.count
Expand Down

0 comments on commit 01433c1

Please sign in to comment.