Fixes for the ladder team view.

This commit is contained in:
Scott Erickson 2014-02-18 12:27:10 -08:00
parent 5a436ce10b
commit f383e5b9fa
2 changed files with 3 additions and 3 deletions
app
templates/play/ladder
views/play/ladder

View file

@ -42,7 +42,7 @@ block content
td.name-cell= match.opponentName
td.time-cell= match.when
td.battle-cell
a.button.btn(href="/play/level/#{levelID}?team=#{teamID}&opponent=#{match.sessionID}") Battle!
a(href="/play/level/#{levelID}?team=#{teamID}&opponent=#{match.sessionID}") Battle!
else
div.alert.alert-warning

View file

@ -73,8 +73,8 @@ module.exports = class LadderTeamView extends RootView
ctx.challengers = if not @startsLoading then @getChallengers() else {}
ctx.readyToRank = @readyToRank()
convertMatch = (match) ->
opponent = match.opponent[0]
convertMatch = (match) =>
opponent = match.opponents[0]
state = 'win'
state = 'loss' if match.metrics.rank > opponent.metrics.rank
state = 'tie' if match.metrics.rank is opponent.metrics.rank