@(categ: lila.forum.Categ, topic: lila.forum.Topic, posts: Paginator[lila.forum.Post], formWithCaptcha: Option[FormWithCaptcha], unsub: Option[Boolean], canModCateg: Boolean)(implicit ctx: Context) @moreJs = { @jsTag("forum-post.js") @jsTag("embed-analyse.js") } @modMenu = { @mod.menu("forum") } @forum.layout( title = s"${categ.name} / ${topic.name} page ${posts.currentPage}", menu = modMenu.some.ifTrue(categ.isStaff), moreJs = moreJs, openGraph = lila.app.ui.OpenGraph( title = s"Forum: ${categ.name} / ${topic.name} page ${posts.currentPage}", url = s"$netBaseUrl${routes.ForumTopic.show(categ.slug, topic.slug).url}", description = shorten(posts.currentPageResults.headOption.??(_.text), 152)).some) {
@categ.team.map { team =>
  1. @teamLink(team)
  2. Forum
  3. @topic.name

}.getOrElse {
  1. Forum
  2. @categ.name
  3. @topic.name

}
@forum.pagination(routes.ForumTopic.show(categ.slug, topic.slug, 1), posts, showPost = true)
@posts.currentPageResults.map { post =>
@defining(routes.ForumTopic.show(categ.slug, topic.slug, posts.currentPage) + s"#${post.number}") { url => @authorLink(post=post, cssClass="author".some, modIcon=post.displayModIcon) @post.updatedAt.map { updatedAt => edited @momentFromNow(updatedAt) }.getOrElse { @momentFromNow(post.createdAt) } #@post.number @if(isGranted(_.IpBan)) { @post.ip } @if(ctx.userId.fold(false)(post.shouldShowEditForm(_))) { Edit } @if(canModCateg) { Delete } }

@richText(post.text)

@if(ctx.userId.fold(false)(post.shouldShowEditForm(_))) {
@trans.cancel()
}
}
@unsub.map { uns =>
} @if(isGranted(_.ModerateForum)) {
} @if(canModCateg) {
}
@formWithCaptcha.map { case (form, captcha) => {

@trans.replyToThisTopic()

@forum.post.formFields(form("text"), topic.some) @base.captcha(form("move"), form("gameId"), captcha) @globalError(form) @if(isGranted(_.PublicMod)){ } @trans.cancel()
} }.getOrElse { @if(topic.closed) {

@trans.thisTopicIsNowClosed()

} else { @categ.team.map { teamId => @if(!myTeam(teamId)) {

Join the @teamIdToName(teamId) team to post in this forum

} } } }
@forum.pagination(routes.ForumTopic.show(categ.slug, topic.slug, 1), posts, showPost = true)
}