From ab76b78a0cae0db95f481c0391e3bf4f737574ca Mon Sep 17 00:00:00 2001 From: cryptogun Date: Fri, 3 Nov 2017 18:01:46 +0800 Subject: [PATCH] Option to hide moderate actions. Switch: ST_CUSTOMIZE_HIDE_ACTIONS. For general users not moderators. --- spirit/comment/templates/spirit/comment/_render_list.html | 8 +++++--- spirit/core/conf/defaults.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/spirit/comment/templates/spirit/comment/_render_list.html b/spirit/comment/templates/spirit/comment/_render_list.html index f171593dd..c70d417ae 100644 --- a/spirit/comment/templates/spirit/comment/_render_list.html +++ b/spirit/comment/templates/spirit/comment/_render_list.html @@ -1,9 +1,11 @@ {% load spirit_tags i18n %}
- + {# load_settings "ST_CUSTOMIZE_HIDE_ACTIONS" "ST_..." etc... #} + {% load_settings "ST_CUSTOMIZE_HIDE_ACTIONS" %} {% for c in comments %} - + {# moderator can view anything or; SHOW_ACTIONS shows anything or; show if is_comment_is_not_action. #} + {% if user.st.is_moderator or not st_settings.ST_CUSTOMIZE_HIDE_ACTIONS or c.action == 0 %}
{% if not c.is_removed %} @@ -122,7 +124,7 @@ {% endif %}
- + {% endif %} {% endfor %}
diff --git a/spirit/core/conf/defaults.py b/spirit/core/conf/defaults.py index f5ac50da3..20bcb8df7 100644 --- a/spirit/core/conf/defaults.py +++ b/spirit/core/conf/defaults.py @@ -100,3 +100,5 @@ os.path.dirname( os.path.dirname( os.path.dirname(__file__)))) + +ST_CUSTOMIZE_HIDE_ACTIONS = True