@(tour: Tournament, verdicts: lila.tournament.Condition.All.WithVerdicts, data: play.api.libs.json.JsObject, chatOption: Option[lila.chat.UserChat.Mine], streamers: Set[User.ID], shieldOwner: Option[lila.tournament.TournamentShield.OwnerId])(implicit ctx: Context) @underchat = {
} @moreJs = { @jsAt(s"compiled/lichess.tournament${isProd??(".min")}.js") @embedJs { lichess = lichess || {}; lichess.tournament = { data: @safeJson(data), i18n: @jsI18n(), userId: @jsUserId, chat: @jsOrNull(chatOption map { c => chat.ChatJsData.json(c.chat, name = trans.chatRoom.txt(), timeout = c.timeout, public = true) }) }; } } @moreCss = { @cssTag("chat.css") @if(tour.isCreated) { @cssTag("quote.css") } } @tournament.layout( title = s"${tour.fullName} #${tour.id}", side = tournament.side(tour, verdicts, streamers, shieldOwner).some, chat = chat.dom().some, underchat = underchat.some, moreJs = moreJs, moreCss = moreCss, chessground = false, openGraph = lila.app.ui.OpenGraph( title = s"${tour.fullName}: ${tour.variant.name} ${tour.clock.show} ${tour.mode.name} #${tour.id}", url = s"$netBaseUrl${routes.Tournament.show(tour.id).url}", description = s"${tour.nbPlayers} players compete in the ${showEnglishDate(tour.startsAt)} ${tour.fullName}. " + s"${tour.clock.show} ${tour.mode.name} games are played during ${tour.minutes} minutes. " + tour.winnerId.fold("Winner is not yet decided.") { winnerId => s"${usernameOrId(winnerId)} takes the prize home!" } ).some) {