From aac17a6daa2e6e5470c9d9b61eb5f948118ebb9f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 28 Jun 2022 02:59:08 +0200 Subject: [PATCH] show the username of the janny who banned --- files/routes/admin.py | 4 ++-- files/templates/comments.html | 2 +- files/templates/submission.html | 2 +- files/templates/submission_listing.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index a8385fb34..9541afa63 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1090,12 +1090,12 @@ def ban_user(user_id, v): if request.values["reason"].startswith("/post/"): post = int(request.values["reason"].split("/post/")[1].split(None, 1)[0]) post = get_post(post) - post.bannedfor = duration + post.bannedfor = f'{duration} by @{v.username}' g.db.add(post) elif request.values["reason"].startswith("/comment/"): comment = int(request.values["reason"].split("/comment/")[1].split(None, 1)[0]) comment = get_comment(comment) - comment.bannedfor = duration + comment.bannedfor = f'{duration} by @{v.username}' g.db.add(comment) notify_mod_action(v.id, f"@{v.username} has banned @{user.username} ({note})") diff --git a/files/templates/comments.html b/files/templates/comments.html index ec9d9d3ca..ab43d8db6 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -184,7 +184,7 @@ {% endif %} {% if c.bannedfor %} - + {% endif %} {% if c.active_flags(v) %}{{c.active_flags(v)}} Report{{ help.plural(c.active_flags(v)) }}{% endif %} {% if c.over_18 %}+18{% endif %} diff --git a/files/templates/submission.html b/files/templates/submission.html index 38a7a2489..3574ce0f6 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -717,7 +717,7 @@ {% endif %} {% if p.bannedfor %} - + {% endif %} {% for a in p.awards %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 1756573c5..bc839040c 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -162,7 +162,7 @@ {% endif %} {% if p.bannedfor %} - + {% endif %} {% for a in p.awards %}