Add thread locking and permissions

Mods can lock threads from replying now. Yay!

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-07-08 21:55:25 -07:00
parent e866cbae0f
commit a3ebf75e83
4 changed files with 36 additions and 10 deletions

View File

@@ -27,9 +27,12 @@
</div>
{% endif %}
{# Post ID, sticky, username, time #}
{# Post ID, status icons, username, time #}
{% if post.sticky and not post.op %}
<span title="Stickied" class="fa fa-sticky-note"></span>
<span title="Stickied" class="fa fa-thumb-tack"></span>
{% endif %}
{% if post.lock and not post.op %}
<span title="Locked" class="fa fa-lock"></span>
{% endif %}
<a href="#p{{post.id}}">#.</a>
<span class="post_id">{{post.id}}</span>

View File

@@ -28,17 +28,32 @@ input[type=text] {
{% block content %}
<form method="post" action="{% url 'board:reply_create' url=board.url id=post.id %}" enctype="multipart/form-data">
{% csrf_token %}
{% if form.errors %}
{{form.non_field_errors}}
{% endif %}
<table>
{% for field in form %}
{% if field.name != "capcode" %}
<tr>
<th>{{field.label_tag}}</th>
<td>{{field}}</td>
</tr>
{% if field.errors %}
<tr>
<th></th>
<td>{{field.errors}}</td>
</tr>
{% endif %}
<tr>
<th>{{field.label_tag}}</th>
<td>{{field}}</td>
</tr>
{% endif %}
{% endfor %}
{% if capcodes %}
<tr>
{% if form.capcode.errors %}
<tr>
<th></th>
<td>{{form.capcode.errors}}</td>
</tr>
{% endif %}
<th>{{form.capcode.label_tag}}</th>
<td>
{{form.capcode}}