From 94e41dcf4312ae70fff562e322a23db867590b33 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 13 Sep 2025 09:41:57 +0000 Subject: [PATCH] users: Only show recent users to staff This just makes things a little bit easier later... Signed-off-by: Michael Tremer --- src/templates/users/index.html | 124 ++++++++++++++++----------------- 1 file changed, 61 insertions(+), 63 deletions(-) diff --git a/src/templates/users/index.html b/src/templates/users/index.html index 4683cff8..7d1f4659 100644 --- a/src/templates/users/index.html +++ b/src/templates/users/index.html @@ -71,7 +71,7 @@ - {% else %} + {% elif current_user and current_user.is_staff() %} {# Recently Joined #} {% set recently_registered = backend.accounts.get_recently_registered(limit=4) %} @@ -85,89 +85,87 @@ {% end %} - {% if current_user and current_user.is_staff() %} - {% set total_accounts = len(backend.accounts) %} - {% set countries = backend.accounts.countries %} + {% set total_accounts = len(backend.accounts) %} + {% set countries = backend.accounts.countries %} - {# Stats #} + {# Stats #} -
-
-
-
-
-

{{ _("Total Accounts") }}

-

- {{ total_accounts }} -

-
+
+
+
+
+
+

{{ _("Total Accounts") }}

+

+ {{ total_accounts }} +

+
- {% set t = now - datetime.timedelta(days=7) %} + {% set t = now - datetime.timedelta(days=7) %} -
-
-

{{ _("Created This Week") }}

-

- {{ backend.accounts.count_created_after(t) }} -

-
+
+
+

{{ _("Created This Week") }}

+

+ {{ backend.accounts.count_created_after(t) }} +

+
- {% set t = now - datetime.timedelta(days=30) %} + {% set t = now - datetime.timedelta(days=30) %} +
+
+

{{ _("Created This Month") }}

+

+ {{ backend.accounts.count_created_after(t) }} +

+
+
+ + {% set pending_registrations = backend.accounts.pending_registrations %} + {% if pending_registrations %}
-

{{ _("Created This Month") }}

+

{{ _("Pending Registrations") }}

- {{ backend.accounts.count_created_after(t) }} + {{ pending_registrations }}

- - {% set pending_registrations = backend.accounts.pending_registrations %} - {% if pending_registrations %} -
-
-

{{ _("Pending Registrations") }}

-

- {{ pending_registrations }} -

-
-
- {% end %} -
+ {% end %}
-
- - {# Countries #} +
+
-
-
-

{{ _("Origin") }}

+ {# Countries #} -
-
- {% end %} + + {% end %} {% end block %} -- 2.47.3