From 71f3cf4a65df3e238d76de7198bd07f72604b283 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 22 Jan 2022 18:22:31 +0200 Subject: [PATCH] fdssfd --- files/classes/comment.py | 4 ++++ files/classes/submission.py | 3 +++ files/templates/comments.html | 5 ----- files/templates/submission.html | 7 ------- files/templates/submission_listing.html | 5 ----- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 4624738cdb..d973a87874 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -368,6 +368,10 @@ class Comment(Base): if not self.total_poll_voted(v): body += ' d-none' body += f'"> - {o.upvotes} votes' + + if self.author.sig_html and not self.ghost and (self.author_id == MOOSE_ID or not (v and v.sigs_disabled)): + body += "
{self.author.sig_html}" + return body def plainbody(self, v): diff --git a/files/classes/submission.py b/files/classes/submission.py index b61765a590..9dd94b61b2 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -382,6 +382,9 @@ class Submission(Base): g.db.add(self.author) g.db.commit() + if self.author.sig_html and not self.ghost and (self.author_id == MOOSE_ID or not (v and v.sigs_disabled)): + body += "
{self.author.sig_html}" + return body def plainbody(self, v): diff --git a/files/templates/comments.html b/files/templates/comments.html index be52fca538..b444d71ad5 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -252,11 +252,6 @@
{{c.realbody(v) | safe}} - - {% if c.author.sig_html and not c.ghost and (c.author_id == MOOSE_ID or not (v and v.sigs_disabled)) %} -
- {{c.author.sig_html | safe}} - {% endif %}
{% if c.parent_submission %} diff --git a/files/templates/submission.html b/files/templates/submission.html index ab3b0ba10f..64ecc21814 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -546,13 +546,6 @@ {% endif %} - - - {% if p.author.sig_html and not p.ghost and (p.author_id == MOOSE_ID or not (v and v.sigs_disabled)) %} -
- {{p.author.sig_html | safe}} - {% endif %} - {% if v and (v.id==p.author_id or v.admin_level > 2) and not v.is_suspended %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 71006dc866..53b96c1434 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -515,11 +515,6 @@ {% if p.realbody(v) %}
{{p.realbody(v) | safe}} - - {% if p.author.sig_html and not p.ghost and (p.author_id == MOOSE_ID or not (v and v.sigs_disabled)) %} -
- {{p.author.sig_html | safe}} - {% endif %}
{% endif %}