Implement comment hiding

Currently hides replies too, even comments from users who are logged in.
This commit is contained in:
David Hoppenbrouwers
2022-10-12 22:02:31 +02:00
parent 8f53d143db
commit 8e54c95c40
4 changed files with 78 additions and 17 deletions

View File

@@ -5,3 +5,11 @@
<input type=submit value="{{ 'Unhide' if hidden else 'Hide' }}">
</form>
{% endmacro %}
{% macro moderate_comment(id, hidden) %}
<form method=post action="{{ url_for('set_hide_comment', comment_id = id) }}" style=display:inline>
<input name=redirect value="{{ request.full_path }}" hidden>
<input name=hide value={{ 0 if hidden else 1 }} hidden>
<input type=submit value="{{ 'Unhide' if hidden else 'Hide' }}">
</form>
{% endmacro %}