@(q: lila.qa.Question, answers: List[lila.qa.Answer], popular: List[lila.qa.Question], related: List[lila.qa.Question], answerForm: Option[Form[_]], captcha: Option[lila.common.Captcha])(implicit ctx: Context) @side = { @if(!related.isEmpty){@relatedBox(related)} @popularBox(popular) } @layout( title = s"${q.title} • ${trans.questionsAndAnswers()}", side = side.some, openGraph = lila.app.ui.OpenGraph( title = q.title, url = s"$netBaseUrl${routes.QaQuestion.show(q.id, q.slug).url}", description = shorten(q.body, 152)).some) {

@q.title

@if(lila.qa.QaAuth canEdit q) { Edit question } @nope(q.isLocked.fold("Unlock", "Lock"), routes.QaQuestion.lock(q.id), "a") @nope("Delete", routes.QaQuestion.remove(q.id), "q")
@if(q.tags.nonEmpty) { }
Asked @momentFromNow(q.createdAt) by @userIdLink(q.userId.some)
Tags @tags(q.tags)
Activity Viewed @q.views times, last updated @momentFromNow(q.updatedAt)
@views.html.qa.vote(routes.QaQuestion.vote(q.id).url, q.vote)
@richText(q.body)
@views.html.qa.commentList(q, q.comments.sorted, routes.QaComment.question(q.id).url)
@answerList(q, answers) @if(ctx.me.fold(true)(lila.qa.QaAuth.isN00b)) {

Only registered members with one week of lichess activity can contribute to the Q&A.

} else { @(answerForm, captcha) match { case (Some(form), Some(captcha)) => {
@if(answers.nonEmpty) {

Your answer

}
@errMsg(form("body")) @base.captcha(form("move"), form("gameId"), captcha) @if(isGranted(_.PublicMod)){ }
} case _ => {

@q.locked.map { l => @userIdLink(l.by.some) locked this question @momentFromNow(l.at) }.getOrElse { You cannot answer this question. }

} } }
}