From c155e282bd91511af352b08402d48e32c7c0ec90 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 13 Aug 2021 04:52:37 +0200 Subject: [PATCH] fggf --- files/helpers/jinja2.py | 2 +- files/templates/submission_listing.html | 136 ++++++++++++------------ 2 files changed, 70 insertions(+), 68 deletions(-) diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index 5902d4054..05767f86b 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -19,4 +19,4 @@ def crosspost_embed(id): p = get_post(id, graceful=True) - return render_template("submission_listing.html", listing=[p]) \ No newline at end of file + return render_template("submission_listing.html", listing=[p], postembed=True) \ No newline at end of file diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index ee363776e..3f40ca038 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -25,40 +25,41 @@
+ {% if not postembed %} +
+ {% if v and request.path.startswith('/@') and v.admin_level == 0 %} -
- {% if v and request.path.startswith('/@') and v.admin_level == 0 %} + {% if voted==1 %} +
+ {% endif %} - {% if voted==1 %} -
- {% endif %} + {{score}} + + {% if voted==-1 %} +
+ {% endif %} + + {% elif v %} + +
{{score}} - {% if voted==-1 %} -
+
+ + {% else %} + +
+ + {{score}} + +
+ + {% endif %} - {% elif v %} - -
- - {{score}} - -
- - {% else %} - -
- - {{score}} - -
- - - {% endif %} - -
+
+ {% endif %}
@@ -236,49 +237,50 @@ {% endif %} - {% if v and request.path.startswith('/@') and v.admin_level == 0 %} -
  • + {% if not postembed %} + {% if v and request.path.startswith('/@') and v.admin_level == 0 %} +
  • - {% if voted==1 %} - - + {% if voted==1 %} + + + {% endif %} + + {{score}} + + {% if voted==-1 %} + + + {% endif %} + + +
  • + {% elif v %} +
  • + + + + + {{score}} + + + + +
  • + {% else %} +
  • + + + + + {{score}} + + + + +
  • {% endif %} - - {{score}} - - {% if voted==-1 %} - - - {% endif %} - - - - {% elif v %} -
  • - - - - - {{score}} - - - - -
  • - {% else %} -
  • - - - - - {{score}} - - - - -
  • {% endif %} -