{@args p: OpinionhubTopicPage} {@import opinionhub/opinionhub_text} {@import opinionhub/opinionhub_categories} {@import opinionhub/opinionhub_topics} {@import opinionhub_web/opinionhub_views}

{opinionhub_topic_title (opinionhub_tp_topic p)}

{if opinionhub_topic_is_pinned (opinionhub_tp_topic p)}Pinned{end}{if opinionhub_topic_is_private (opinionhub_tp_topic p)}Members only{end}{if opinionhub_topic_is_locked (opinionhub_tp_topic p)}Locked{end}{if opinionhub_topic_is_hidden (opinionhub_tp_topic p)}Hidden{end}

{html opinionhub_read_html_post (opinionhub_tp_opening p) (opinionhub_tp_token p)} {for a: OpinionhubPostView in opinionhub_tp_accepted p}

The accepted answer

{html opinionhub_read_html_post a (opinionhub_tp_token p)}
{end}

{opinionhub_plural (pi_total (opinionhub_tp_page p)) "reply" "replies"}

{if (pi_total (opinionhub_tp_page p)) > 0}
    {for v: OpinionhubPostView in opinionhub_tp_replies p}
  1. {html opinionhub_read_html_post v (opinionhub_tp_token p)}
  2. {end}
{end} {if (pi_pages (opinionhub_tp_page p)) > 1} {end} {if opinionhub_tp_can_reply p}

Markdown works: *emphasis*, **strong**, `code`, lists, quotes with > and code blocks between ```.

{else} {if not (opinionhub_tp_member p)}

Sign in to reply.

{else} {if opinionhub_topic_is_locked (opinionhub_tp_topic p)}

This topic is locked: it takes no new replies.

{end} {end} {end} {if opinionhub_tp_can_set_visibility p}
{if opinionhub_topic_is_private (opinionhub_tp_topic p)} Only signed-in members can read this topic. {else} Anyone can read this topic. {end}
{end} {if opinionhub_tp_is_moderator p}

Moderation

Reports and the moderation log

{end}