Back to Frontend

@cleanTeamName(homeTeam.name) @homeTeam.score - @awayTeam.score @cleanTeamName(awayTeam.name)

sport/app/football/views/fragments/matchSummary.scala.html

latest2.0 KB
Original Source

@import common.LinkTo @import implicits.Football._ @import model.Competition @import pa.FootballMatch @import views.support.RenderClasses @import conf.Configuration @import model.CompetitionDisplayHelpers.cleanTeamName @import model.CompetitionDisplayHelpers.cleanScore @import football.model.GuTeamCodes @(theMatch: FootballMatch, competition: Option[Competition] = None, responsive: Boolean = false, link: Boolean = false)(implicit request: RequestHeader) @defining((theMatch.homeTeam, theMatch.awayTeam)){ case (homeTeam, awayTeam) => <@if(link){a href="@LinkTo("/football/match-redirect/"+theMatch.id)"}else{div} data-component="big-match-special" class="@RenderClasses(Map( "match-summary" -> true, "match-summary--fixture" -> theMatch.isFixture, "match-summary--responsive" -> responsive ))" data-match-id="@theMatch.id"> @if(theMatch.isLive || theMatch.isResult){

@cleanTeamName(homeTeam.name) @homeTeam.score - @awayTeam.score @cleanTeamName(awayTeam.name)

}else{

@cleanTeamName(homeTeam.name) v @cleanTeamName(awayTeam.name)

}

@cleanTeamName(homeTeam.name)

Home team scorers @homeTeam.scorers.map{scorers => @scorers.split(",").map{ scorer => @scorer.replace("(", "").replace(")", "")}}

@if(theMatch.isLive || theMatch.isResult){ @homeTeam.score.map{score => @fragments.inlineSvg("number-" + cleanScore(score), "numbers", List("team__score"))} }

@cleanTeamName(awayTeam.name)

Away team scorers @awayTeam.scorers.map{scorers => @scorers.split(",").map{ scorer => @scorer.replace("(", "").replace(")", "")}}

@if(theMatch.isLive || theMatch.isResult){ @awayTeam.score.map{score => @fragments.inlineSvg("number-" + cleanScore(score), "numbers", List("team__score")) } }

@if(theMatch.homeTeam.aggregateScore || theMatch.comments) { @theMatch.homeTeam.aggregateScore.map{homeAggScore => Aggregate @[email protected]} @theMatch.comments.map{ comments => @comments.replace("(", "").replace(")", "")} } @if(link){a}else{div}> }