From 45cadf46d65e5d8f0620a8412bbc90cf23ab5c74 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Thu, 29 Dec 2022 12:45:35 +0100 Subject: superuser mode --- client/templatetags/app_filter.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/templatetags/app_filter.py b/client/templatetags/app_filter.py index aa93cf2..335827e 100644 --- a/client/templatetags/app_filter.py +++ b/client/templatetags/app_filter.py @@ -89,4 +89,11 @@ def user_list(user): else: gr = GroupSettings.objects.filter(group__in=groups).filter(view_documents=True) - return (len(gr) != 0) \ No newline at end of file + return (len(gr) != 0) + +@register.filter(name="su_color") +def su_color(status): + if status: + return "green" + else: + return "red lighten-1" \ No newline at end of file -- cgit v1.2.1