{# Tags, repliers, posts and the reply form, shared by the Classic and Focus topic pages. #}
{% import "_avatar.html" as ui %}
{% if tags or can_edit_tags %}{% include "forum/_topic_tags.html" %}{% endif %}
{% if participants %}
<div class="hidden lg:flex items-center gap-2 text-sm">
<span class="opacity-60">Top repliers</span>
<div class="flex items-center -space-x-2">
{% for p in participants %}
<span class="ring-2 ring-base-100 rounded-full inline-flex"
title="{{ p.name }} · {{ p.count }} repl{% if p.count == 1 %}y{% else %}ies{% endif %}">
{{ ui.avatar(p.id, p.name, p.has_avatar, "size-7", "text-xs") | safe }}
</span>
{% endfor %}
</div>
</div>
{% endif %}
{% if topic_deleted %}
<div class="alert alert-warning">
<i class="fas fa-trash-can"></i>
<span>This topic is deleted — only staff can see it. Restore it to make it public again.</span>
</div>
{% endif %}
<div id="posts" class="space-y-3">
{% for post in posts %}
{% include "forum/_post.html" %}
{% endfor %}
</div>
{% if caps.locked %}
<div class="alert alert-warning" data-locked><i class="fas fa-lock"></i><span>{{ caps.lock_message }}{% if caps.is_staff %} Staff can still reply.{% endif %}</span></div>
{% endif %}
{% if not user %}
<div class="alert">
<span><a href="/login" class="link link-primary">Log in</a> to reply.</span>
</div>
{% elif caps.reply_block and caps.reply_block.code == "unverified" %}
<div class="alert">
<i class="fas fa-envelope"></i>
<span>Verify your email address to reply. <a href="/profile#email-verification" class="link link-primary">Resend the link</a></span>
</div>
{% elif caps.reply_block and caps.reply_block.code != "locked" %}
<div class="alert" data-reply-block="{{ caps.reply_block.code }}"><i class="fas fa-ban"></i><span>{{ caps.reply_block.message }}</span></div>
{% elif caps.can_reply %}
<form id="reply" class="card bg-base-200 border border-base-300 p-4 space-y-2"
hx-post="/t/{{ topic.id }}/posts"
hx-target="#posts"
hx-select="unset"
hx-swap="beforeend"
hx-on::after-request="if(event.detail.successful){ this.reset(); }">
<h2 class="font-semibold">Reply</h2>
<textarea name="body" rows="4" required maxlength="{{ max_post_chars | default(32000) }}"
class="textarea textarea-bordered w-full font-mono text-sm"
placeholder="Write a reply… markdown supported"></textarea>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary btn-sm">
<i class="fas fa-paper-plane mr-1"></i> Post reply
</button>
</div>
</form>
{% endif %}
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
2.7 KiB · text
History
263b40b