mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: allow users to hide deleted comments
Closes: #435 Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
This commit is contained in:
parent
174af5f025
commit
6ede837b4f
9 changed files with 132 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if not comment.Deleter or request.user.has_credential(creds.COMMENT_VIEW_DELETED, approved=[comment.Deleter]) %}
|
||||
|
||||
{% if not (request.user.HideDeletedComments and comment.DelTS) %}
|
||||
{% set commented_at = comment.CommentTS | dt | as_timezone(timezone) %}
|
||||
<h4 id="comment-{{ comment.ID }}" class="{{ header_cls }}">
|
||||
{{
|
||||
|
@ -38,3 +38,4 @@
|
|||
|
||||
{% include "partials/comment_content.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
maxlength="50" name="K" value="{{ pgp }}">
|
||||
</p>
|
||||
|
||||
<!-- Homepage -->
|
||||
<!-- Language -->
|
||||
<p>
|
||||
<label for="id_language">
|
||||
{% trans %}Language{% endtrans %}:
|
||||
|
@ -202,10 +202,10 @@
|
|||
</select>
|
||||
</p>
|
||||
|
||||
<!-- Homepage -->
|
||||
<!-- Timezone -->
|
||||
<p>
|
||||
<label for="id_timezone">
|
||||
{% trans %}Timezone{% endtrans %}
|
||||
{% trans %}Timezone{% endtrans %}:
|
||||
</label>
|
||||
|
||||
<select id="id_timezone" name="TZ">
|
||||
|
@ -219,6 +219,19 @@
|
|||
</select>
|
||||
</p>
|
||||
|
||||
<!-- Hide Deleted Comments -->
|
||||
<p>
|
||||
<label for="id_hidedeletedcomments">
|
||||
{% trans %}Hide deleted comments{% endtrans %}:
|
||||
</label>
|
||||
|
||||
<input id="id_hidedeletedcomments" type="checkbox" name="HDC"
|
||||
{% if hdc %}
|
||||
checked="checked"
|
||||
{% endif %}
|
||||
>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
|
||||
{% if form_type == "UpdateAccount" %}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if not comment.Deleter or request.user.has_credential(creds.COMMENT_VIEW_DELETED, approved=[comment.Deleter]) %}
|
||||
{% if not (request.user.HideDeletedComments and comment.DelTS) %}
|
||||
<h4 id="comment-{{ comment.ID }}" class="{{ header_cls }}">
|
||||
{% set commented_at = comment.CommentTS | dt | as_timezone(timezone) %}
|
||||
{% set view_account_info = 'View account information for %s' | tr | format(comment.User.Username) %}
|
||||
|
@ -41,3 +42,4 @@
|
|||
|
||||
{% include "partials/comment_content.html" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue