From 195ea385e3d4ed33eeb725caf2ef2ff625d8bcb2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 2 May 2022 00:56:19 +0200 Subject: [PATCH] gfd --- files/routes/front.py | 2 -- files/templates/home.html | 8 +++++--- files/templates/sidebar_Cringetopia.html | 5 ----- files/templates/sidebar_PCM.html | 6 ------ files/templates/sidebar_rDrama.html | 5 ----- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index e1bf90eee3..c30900ed5c 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -306,7 +306,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" posts = posts.filter(Submission.id.notin_(voted)) if sub: posts = posts.filter_by(sub=sub.name) - elif not v: posts = posts.filter(Submission.sub == None) else: posts = posts.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks))) if gt: posts = posts.filter(Submission.created_utc > gt) @@ -378,7 +377,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" if (sort == "hot" or (v and v.id == Q_ID)) and page == 1 and ccmode == "false" and not gt and not lt: pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False) if sub: pins = pins.filter_by(sub=sub.name) - elif not v: pins = pins.filter(Submission.sub == None) else: pins = pins.filter(or_(Submission.sub == None, Submission.sub.notin_(v.all_blocks))) if v and v.admin_level < 2: diff --git a/files/templates/home.html b/files/templates/home.html index 58ac7d4cdf..64323ee93c 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -41,11 +41,13 @@
- {% if v %} -
- {% if sub %} + {% if sub %} +
+ {% if v %} Block /h/{{sub.name}} Unblock /h/{{sub.name}} + {% else %} + Block /h/{{sub.name}} {% endif %}
{% endif %} diff --git a/files/templates/sidebar_Cringetopia.html b/files/templates/sidebar_Cringetopia.html index f3953abf45..7276f0c25b 100644 --- a/files/templates/sidebar_Cringetopia.html +++ b/files/templates/sidebar_Cringetopia.html @@ -13,11 +13,6 @@
{{sub.sidebar_html|safe}}
{% endif %} {% if v %} - - CREATE HOLE {% if v.mods(sub.name) %} HOLE SETTINGS diff --git a/files/templates/sidebar_PCM.html b/files/templates/sidebar_PCM.html index 74eeac5f76..ed0b0de066 100644 --- a/files/templates/sidebar_PCM.html +++ b/files/templates/sidebar_PCM.html @@ -7,12 +7,6 @@ {% if v and v.mods(sub.name) %} SUB SETTINGS {% endif %} - {% if v %} - - {% endif %} HOLE MODS HOLE EXILEES HOLE BLOCKERS diff --git a/files/templates/sidebar_rDrama.html b/files/templates/sidebar_rDrama.html index 68ae794126..f8b363148c 100644 --- a/files/templates/sidebar_rDrama.html +++ b/files/templates/sidebar_rDrama.html @@ -18,11 +18,6 @@
{{sub.sidebar_html|safe}}
{% endif %} {% if v %} - - {% if v.admin_level > 2 %} CREATE HOLE {% endif %}