common/app/views/fragments/commercial/containers/paidContainer.scala.html
@(frontId: String, containerIndex: Int, containerModel: common.commercial.ContainerModel)(implicit request: RequestHeader) @import com.gu.commercial.branding.Branding @import common.LinkTo @import views.html.fragments.commercial.containers._ @import views.html.fragments.commercial.{containerLogo, containerWrapper} @import views.html.fragments.inlineSvg @import views.support.Commercial.TrackingCodeBuilder.mkInteractionTrackingCode @import views.support.Commercial.glabsLink
@containerWrapper( Seq("legacy", "capi", "paidfor", "tone-paidfor"), optKicker = Some(fragments.commercial.paidForMeta(Some(containerModel.id))), optStamp = Some(stamp), optBadge = if(containerModel.isSingleSponsorContainer){ Some(logoSlot) } else { None } ){ @containerModel.content.targetUrl match { case None => { @containerModel.content.title } case Some(href) => { @containerModel.content.title } } }{ @containerModel.layoutName match { case "fixed/small/slow-I" => { @fixedSmallSlowI(frontId, containerIndex, containerModel) } case "fixed/small/slow-III" => { @fixedSmallSlowIII(frontId, containerIndex, containerModel) } case "fixed/small/slow-IV" => { @fixedSmallSlowIV(frontId, containerIndex, containerModel) } case "fixed/small/slow-V-half" => { @fixedSmallSlowVHalf(frontId, containerIndex, containerModel) } case "fixed/small/slow-V-third" => { @fixedSmallSlowVThird(frontId, containerIndex, containerModel) } case "fixed/small/fast-VIII" => { @fixedSmallFastVIII(frontId, containerIndex, containerModel) } case "fixed/medium/slow-VI" => { @fixedMediumSlowVI(frontId, containerIndex, containerModel) } case "fixed/medium/slow-VII" => { @fixedMediumSlowVII(frontId, containerIndex, containerModel) } case "fixed/medium/fast-XI" => { @fixedMediumFastXI(frontId, containerIndex, containerModel) } case "fixed/medium/fast-XII" => { @fixedMediumFastXII(frontId, containerIndex, containerModel) } case "fixed/large/slow-XIV" => { @fixedLargeSlowXIV(frontId, containerIndex, containerModel) } case _ => { } } @if(containerModel.content.showMoreCards.nonEmpty){ # @fragments.inlineSvg("plus", "icon") @fragments.inlineSvg("minus", "icon") More @containerModel.content.title @containerModel.content.showMoreCards.map(card => views.html.fragments.commercial.cards.itemSmallCard( item = card, optAdvertClassNames = Some(Seq("paidfor")), omnitureId = mkInteractionTrackingCode(frontId, containerIndex, containerModel, card), useCardBranding = !containerModel.isSingleSponsorContainer)) } } @stamp = { @inlineSvg("glabs-logo", "logo") Guardian Labs } @logoSlot = { @for(branding <- containerModel.branding) { @branding match { case b: Branding => { @containerLogo(b, isOnTheLeft = false) } case _ => {} } } }