@(page: MatchPage)(implicit request: RequestHeader) @import support._ @import FootballHelpers._ @import feed._ @stat(title: String, home: Int, away: Int, firstItem: Boolean = false) = { @defining(home + away){ total => @defining(PercentMaker(home, away)){ case (homePercent, awayPercent) =>
@title
  1. @home@if(home+away == 100){%}
     
  2. @away@if(home+away == 100){%}
     
} } } @events(player: LineUpPlayer) = { @player.events.map{ event => @{ event.eventType match { case "booking" => case "dismissal" => case "substitution" => "(s " + event.eventTime + "')" case _ => "" }} } } @cleanScorers(teamScorers: Option[String]) = { @teamScorers.map{ scorers => @scorers.replace("(", "").replace(")", "").replace(",", ", ") }.getOrElse(Html(" ")) } @team(players: Seq[LineUpPlayer]) = { } @defining((page.theMatch, page.theMatch.homeTeam, page.theMatch.awayTeam)){ case (theMatch, homeTeam, awayTeam) => @if(page.matchStarted){
@homeTeam.name
@awayTeam.name
@defining((page.lineUp.homeTeam, page.lineUp.awayTeam)){ case (homeStats, awayStats) => @stat("Possession", page.lineUp.homeTeamPossession, page.lineUp.awayTeamPossession, firstItem = true) @stat("Goal attempts", homeStats.shotsOn + homeStats.shotsOff, awayStats.shotsOn + awayStats.shotsOff) @stat("On target", homeStats.shotsOn, awayStats.shotsOn) @stat("Off target", homeStats.shotsOff, awayStats.shotsOff) @stat("Corners", homeStats.corners, awayStats.corners) @stat("Fouls", homeStats.fouls, awayStats.fouls) @stat("Offsides", homeStats.offsides, awayStats.offsides) } }

Teams

@homeTeam.name
@awayTeam.name
@if(!page.hasLineUp){

Team lineups will be available once announced.

} else {
@team(page.lineUp.homeTeam.players.filterNot{_.isUnusedSub})
@team(page.lineUp.awayTeam.players.filterNot{_.isUnusedSub})

Unused substitutes

@team(page.lineUp.homeTeam.players.filter{_.isUnusedSub})
@team(page.lineUp.awayTeam.players.filter{_.isUnusedSub})
} }