Back to Frontend

Groups.Scala

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

latest1.1 KB
Original Source

@import implicits.Football._ @import pa._ @import views.support.package.Seq2zipWithRowInfo @import views.support.RowInfo @(competition: model.Competition, groupStage: _root_.football.model.Groups)(implicit request: RequestHeader) @footballGroup(round: Round, leagueTableEntries: Seq[LeagueTableEntry], row: RowInfo) = { @defining(groupStage.matchesList(competition, round)) { matches =>

@round.name.map{ name => @football.views.html.tablesList.tableView(competition, model.Group(round, leagueTableEntries), heading = round.name, headingLink = groupTag(competition.id, round), striped = true, withCrests = true )

@{matches.matchesGroupedByDateAndCompetition.zipWithRowInfo.map { case ((date, competitionMatches), info) => competitionMatches.map { case (competition, matches) => football.views.html.matchList.matchesList(matches, competition, date, linkToCompetition = false, heading = if(info.isFirst) Option(("Fixtures and results", None)) else None ) } }} } } } @groupStage.groupTables.zipWithRowInfo.map{ case (groupTable, row) => @footballGroup(groupTable._1, groupTable._2, row) }