From e7fe202c866d0d152db5d63d20d532134a6c0b5e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 18 Feb 2022 14:13:14 +0200 Subject: [PATCH] nvb --- files/routes/posts.py | 4 ++-- files/templates/submit.html | 32 +++++++++++++++----------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 206ed4e5c..e48828f9b 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -126,7 +126,7 @@ def submit_get(v, sub=None): if request.path.startswith('/s/') and not sub: abort(404) - SUBS = () if SITE_NAME == 'Drama' and not sub else tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all()) + SUBS = tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all()) return render_template("submit.html", SUBS=SUBS, v=v, sub=sub, ghost=submit_ghost(v,g.db)) @@ -854,7 +854,7 @@ def submit_post(v, sub=None): def error(error): if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": error}, 403 - SUBS = () if SITE_NAME == 'Drama' and not sub else tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all()) + SUBS = tuple(x[0] for x in g.db.query(Sub.name).order_by(Sub.name).all()) return render_template("submit.html", SUBS=SUBS, v=v, error=error, title=title, url=url, body=body, ghost=submit_ghost(v,g.db)), 400 diff --git a/files/templates/submit.html b/files/templates/submit.html index 459cc6616..1690fe677 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -79,25 +79,23 @@ - {% if SITE_NAME != 'Drama' or sub %} - + -
- + {% if SITE_NAME != 'Ruqqus' %} + + {% endif %} - {% for s in SUBS %} - - {% endfor %} - -
- {% endif %} + {% for s in SUBS %} + + {% endfor %} + +