sport/app/football/views/matchList/matchesList.scala.html
@import java.time.format.DateTimeFormatter @import java.time.ZonedDateTime @import football.model.GuTeamCodes @import common.Edition @import java.time.LocalTime @(matchesList: List[pa.FootballMatch], competition: model.Competition, date: java.time.LocalDate, responsiveFont: Boolean = false, matchType: String = "", linkToCompetition: Boolean = false, heading: Option[(String, Option[String])] = None, link: Option[(String, String)] = None)(implicit request: RequestHeader) @import implicits.Football._ @import common.LinkTo @import views.support.RenderClasses @import views.MatchStatus @import conf.Configuration @import model.CompetitionDisplayHelpers.cleanTeamName
| Match status / kick off time | Match details |
|---|---|
| @matchesList.map{ theMatch => | s"data-link-to=${LinkTo(url)}").getOrElse("")) data-match-id="@theMatch.id" data-score-home="@theMatch.homeTeam.score" data-score-away="@theMatch.awayTeam.score" data-match-status="@MatchStatus(theMatch.matchStatus)" id="[email protected]" class="@RenderClasses(Map( "football-match" -> true, "football-match--live" -> theMatch.isLive, "football-match--fixture" -> theMatch.isFixture, "football-match--result" -> theMatch.isResult ))"> @if(theMatch.isFixture){ @theMatch.date.format(DateTimeFormatter.ofPattern("HH:mm z").withZone(Edition(request).timezoneId)) }else{ @MatchStatus(theMatch.matchStatus) } |
@cleanTeamName(theMatch.homeTeam.name)
@theMatch.homeTeam.score
@cleanTeamName(theMatch.awayTeam.name)
@theMatch.awayTeam.score
@theMatch.comments.map { comments => @comments.reverse.dropWhile(_ == '.').reverse } | | } @heading.map{ case(text, link) => @link.map{ href => @text }.getOrElse{ @text } } @date.format(DateTimeFormatter.ofPattern("E d MMMM ")) @if(linkToCompetition && link == None){ | [Show more @competition.fullName @matchType](@competition.url@if(matchType!=) | } @link.map{ case (text, href) => | @text | }