Back to Frontend

RightMostPopularGeoGarnett.Scala

onward/app/views/fragments/rightMostPopularGeoGarnett.scala.html

latest1.0 KB
Original Source

@(popular: model.MostPopular, country: Option[String], countryCode: String )(implicit request: RequestHeader) @import views.support._ @import views.support.package.Seq2zipWithRowInfo @import implicits.FaciaContentFrontendHelpers._ @import common.LinkTo @import views.support.ImgSrc @import views.html.fragments @import model.pressed._ @mostPopularItem(trail: PressedContent, row: RowInfo) = {

  • [ @trail.trailPicture.map{ imageMedia =>

}

@if(trail.properties.isLiveBlog) { Live } @trail.header.headline

@if(trail.properties.showByline) { @trail.properties.byline } @trail.properties.maybeContent.map { content => @if(content.tags.tags.exists(_.id == "tone/news") || content.tags.tags.exists(_.id == "tone/comment")) { @fragments.contentAgeNotice(ContentOldAgeDescriber(content)) } } ](@LinkTo{@trail.header.url}) } @if(popular.trails.nonEmpty) {

most viewed @{country.map{ name => s"in $name"}}

@popular.trails.take(5).zipWithRowInfo.map{ case(trail, row) => @mostPopularItem(trail, row) }

}