From: Michael Tremer Date: Sat, 13 Sep 2025 09:41:57 +0000 (+0000) Subject: users: Only show recent users to staff X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=94e41dcf4312ae70fff562e322a23db867590b33;p=ipfire.org.git users: Only show recent users to staff This just makes things a little bit easier later... Signed-off-by: Michael Tremer --- 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 %}