Back to Frontend

KnockoutSpider.Scala

sport/app/football/views/wallchart/knockoutSpider.scala.html

latest1.4 KB
Original Source

@import java.time.format.DateTimeFormatter @import java.time.ZonedDateTime @import common.Edition @import java.time.LocalTime @(competition: model.Competition, knockoutStage: _root_.football.model.KnockoutSpider)(implicit request: RequestHeader) @football.views.html.wallchart.knockoutList(competition, knockoutStage, true)

@knockoutStage.rounds.map{ round => @defining(knockoutStage.roundMatches(round)) { matches => @if(matches.length != 1){

@round.name.getOrElse("") @defining(matches.length/2) { half => @matches.take(half).map{ m => @football.views.html.wallchart.knockoutMatch(m, round, competition) } } } } }

@knockoutStage.rounds.map{ round => @defining(knockoutStage.roundMatches(round)) { matches => @if(matches.length != 1){

@round.name.getOrElse("") @defining(matches.length/2) { half => @matches.drop(half).map{ m => @football.views.html.wallchart.knockoutMatch(m, round, competition) } } } } }

@knockoutStage.rounds.map{ round => @defining(knockoutStage.roundMatches(round)) { matches => @if(matches.length == 1){ football-round--playoff}"> @round.name.getOrElse("")

@matches.map{ m => @football.views.html.wallchart.knockoutMatch(m, round, competition) }

} } }

All matches are in @DateTimeFormatter.ofPattern("z").format(ZonedDateTime.of(knockoutStage.matches.head.date.toLocalDate, LocalTime.of(0, 0), Edition(request).timezoneId)) time