|
| 1 | +package views.html |
| 2 | +package swiss |
| 3 | + |
| 4 | +import play.api.libs.json.Json |
| 5 | + |
| 6 | +import lila.api.Context |
| 7 | +import lila.app.templating.Environment._ |
| 8 | +import lila.app.ui.ScalatagsTemplate._ |
| 9 | +import lila.common.String.html.safeJsonValue |
| 10 | +import lila.swiss.Swiss |
| 11 | + |
| 12 | +import controllers.routes |
| 13 | + |
| 14 | +object show { |
| 15 | + |
| 16 | + def apply( |
| 17 | + swiss: Swiss, |
| 18 | + data: play.api.libs.json.JsObject, |
| 19 | + chatOption: Option[lila.chat.UserChat.Mine] |
| 20 | + )(implicit ctx: Context): Frag = ??? |
| 21 | + // views.html.base.layout( |
| 22 | + // title = s"${tour.name()} #${tour.id}", |
| 23 | + // moreJs = frag( |
| 24 | + // jsAt(s"compiled/lichess.tournament${isProd ?? (".min")}.js"), |
| 25 | + // embedJsUnsafe(s"""lichess=lichess||{};lichess.tournament=${safeJsonValue( |
| 26 | + // Json.obj( |
| 27 | + // "data" -> data, |
| 28 | + // "i18n" -> bits.jsI18n, |
| 29 | + // "userId" -> ctx.userId, |
| 30 | + // "chat" -> chatOption.map { c => |
| 31 | + // chat.json( |
| 32 | + // c.chat, |
| 33 | + // name = trans.chatRoom.txt(), |
| 34 | + // timeout = c.timeout, |
| 35 | + // public = true, |
| 36 | + // resourceId = lila.chat.Chat.ResourceId(s"tournament/${c.chat.id}") |
| 37 | + // ) |
| 38 | + // } |
| 39 | + // ) |
| 40 | + // )}""") |
| 41 | + // ), |
| 42 | + // moreCss = cssTag { |
| 43 | + // if (tour.isTeamBattle) "tournament.show.team-battle" |
| 44 | + // else "tournament.show" |
| 45 | + // }, |
| 46 | + // chessground = false, |
| 47 | + // openGraph = lila.app.ui |
| 48 | + // .OpenGraph( |
| 49 | + // title = s"${tour.name()}: ${tour.variant.name} ${tour.clock.show} ${tour.mode.name} #${tour.id}", |
| 50 | + // url = s"$netBaseUrl${routes.Tournament.show(tour.id).url}", |
| 51 | + // description = s"${tour.nbPlayers} players compete in the ${showEnglishDate(tour.startsAt)} ${tour.name()}. " + |
| 52 | + // s"${tour.clock.show} ${tour.mode.name} games are played during ${tour.minutes} minutes. " + |
| 53 | + // tour.winnerId.fold("Winner is not yet decided.") { winnerId => |
| 54 | + // s"${usernameOrId(winnerId)} takes the prize home!" |
| 55 | + // } |
| 56 | + // ) |
| 57 | + // .some |
| 58 | + // )( |
| 59 | + // main(cls := s"tour${tour.schedule |
| 60 | + // .?? { sched => |
| 61 | + // s" tour-sched tour-sched-${sched.freq.name} tour-speed-${sched.speed.name} tour-variant-${sched.variant.key} tour-id-${tour.id}" |
| 62 | + // }}")( |
| 63 | + // st.aside(cls := "tour__side")( |
| 64 | + // tournament.side(tour, verdicts, streamers, shieldOwner, chatOption.isDefined) |
| 65 | + // ), |
| 66 | + // div(cls := "tour__main")(div(cls := "box")), |
| 67 | + // tour.isCreated option div(cls := "tour__faq")( |
| 68 | + // faq(tour.mode.rated.some, tour.isPrivate.option(tour.id)) |
| 69 | + // ) |
| 70 | + // ) |
| 71 | + // ) |
| 72 | +} |
0 commit comments