From 92aba70f3b759bf9f1bc41cf11c48402d0c1ca77 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 29 Sep 2023 05:05:21 +0300 Subject: [PATCH] only show "hot" sort in specific places --- files/templates/home.html | 2 +- files/templates/post.html | 2 +- files/templates/post_banned.html | 2 +- files/templates/util/macros.html | 9 +++++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/files/templates/home.html b/files/templates/home.html index 725f2fc07..a208ff4b3 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -83,7 +83,7 @@ {%- import 'util/macros.html' as macros with context -%} {{- macros.time_filter_buttons() -}} - {{- macros.sorting_buttons(POST_SORTS) -}} + {{- macros.sorting_buttons(POST_SORTS, True) -}} {% endblock %} diff --git a/files/templates/post.html b/files/templates/post.html index 1390d9901..652cfef06 100644 --- a/files/templates/post.html +++ b/files/templates/post.html @@ -299,7 +299,7 @@
{%- import 'util/macros.html' as macros with context -%} - {{- macros.sorting_buttons(COMMENT_SORTS) -}} + {{- macros.sorting_buttons(COMMENT_SORTS, True) -}}
{{macros.comment_reply_box(p.fullname, 'comment-reply-' + p.fullname, subwrapper_css_classes='mb-3', enable_cancel_button=false)}} diff --git a/files/templates/post_banned.html b/files/templates/post_banned.html index 756f6e11e..e1e2daba1 100644 --- a/files/templates/post_banned.html +++ b/files/templates/post_banned.html @@ -59,7 +59,7 @@
{%- import 'util/macros.html' as macros with context -%} - {{- macros.sorting_buttons(COMMENT_SORTS) -}} + {{- macros.sorting_buttons(COMMENT_SORTS, True) -}}
diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index cc49bca4f..6ecd890c5 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -370,14 +370,19 @@
{% endmacro %} -{% macro sorting_buttons(sorts) %} +{% macro sorting_buttons(sorts, hot_allowed) %}