From 11c1bb4a2a694287f95c308d5162c2dc82dba341 Mon Sep 17 00:00:00 2001 From: Deimos Date: Tue, 19 Feb 2019 16:38:46 -0700 Subject: [PATCH] Replace banned users' pages with message --- tildes/tildes/templates/user.jinja2 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tildes/tildes/templates/user.jinja2 b/tildes/tildes/templates/user.jinja2 index 7973435..1374758 100644 --- a/tildes/tildes/templates/user.jinja2 +++ b/tildes/tildes/templates/user.jinja2 @@ -13,17 +13,22 @@ {{ user.username }} {% endblock %} -{# Only show the heading if they can't see the type tabs and the user isn't deleted #} +{# Only show the heading if they can't see the type tabs and the user isn't deleted/banned #} {% block main_heading %} - {% if not user.is_deleted and not request.has_permission("view_history", user) %} + {% if not (user.is_deleted or user.is_banned) and not request.has_permission("view_history", user) %} {{ user.username }}'s recent activity {% endif %} {% endblock %} {% block content %} -{% if user.is_deleted %} +{% if user.is_deleted or user.is_banned %}
-

This user has deleted their account

+ {% if user.is_banned %} +

This user is banned

+ {% elif user.is_deleted %} +

This user has deleted their account

+ {% endif %} +
{% else %}