mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 05:36:45 -04:00
Don't show 0-0 scores on match review page for matches that haven't been played yet.
This commit is contained in:
@@ -44,8 +44,8 @@
|
||||
<td class="text-center blue-text">
|
||||
{{index $match.BlueTeams 0}}, {{index $match.BlueTeams 1}}, {{index $match.BlueTeams 2}}
|
||||
</td>
|
||||
<td class="text-center red-text">{{$match.RedScore}}</td>
|
||||
<td class="text-center blue-text">{{$match.BlueScore}}</td>
|
||||
<td class="text-center red-text">{{if $match.IsComplete}}{{$match.RedScore}}{{end}}</td>
|
||||
<td class="text-center blue-text">{{if $match.IsComplete}}{{$match.BlueScore}}{{end}}</td>
|
||||
<td class="text-center nowrap">
|
||||
<a href="/match_review/{{$match.Id}}/edit"><b class="btn btn-info btn-xs">Edit</b></a>
|
||||
</td>
|
||||
|
||||
@@ -24,6 +24,7 @@ type MatchReviewListItem struct {
|
||||
RedScore int
|
||||
BlueScore int
|
||||
ColorClass string
|
||||
IsComplete bool
|
||||
}
|
||||
|
||||
// Shows the match review interface.
|
||||
@@ -196,12 +197,16 @@ func (web *Web) buildMatchReviewList(matchType string) ([]MatchReviewListItem, e
|
||||
switch match.Status {
|
||||
case game.RedWonMatch:
|
||||
matchReviewList[i].ColorClass = "danger"
|
||||
matchReviewList[i].IsComplete = true
|
||||
case game.BlueWonMatch:
|
||||
matchReviewList[i].ColorClass = "info"
|
||||
matchReviewList[i].IsComplete = true
|
||||
case game.TieMatch:
|
||||
matchReviewList[i].ColorClass = "warning"
|
||||
matchReviewList[i].IsComplete = true
|
||||
default:
|
||||
matchReviewList[i].ColorClass = ""
|
||||
matchReviewList[i].IsComplete = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user