From 437f7e63d7845b6c88e598961deb5c0c7aed6ea3 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 7 Oct 2022 22:38:29 -0700 Subject: [PATCH] upper admin tools macro also we change the remove admin and revert admin actions button to be red --- files/templates/userpage.html | 24 +++--------------------- files/templates/userpage_admintools.html | 13 +++++++++++++ 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 342302e0b..602ddc4b2 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -202,16 +202,8 @@ Block - {% if v.admin_level >= PERMS['ADMIN_ADD'] and SITE != 'rdrama.net' %} - Make admin - {% endif %} - {% if v.admin_level >= PERMS['ADMIN_REMOVE'] %} - Remove admin - {% endif %} - - {% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] and u.admin_level %} - Revert admin actions - {% endif %} + {{ userpage_admintools.userAdminToolsUpper('desktop') }} +

@@ -319,7 +311,6 @@
 			
 			
{{ userpage_admintools.userBanBlock('desktop') }} -

{{u.user_name}}

{% if u.username != u.original_username %} @@ -463,16 +454,7 @@ Block - {% if v.admin_level >= PERMS['ADMIN_ADD'] and SITE != 'rdrama.net' %} - Make admin - {% endif %} - - {% if v.admin_level >= PERMS['ADMIN_REMOVE'] %} - Remove admin - {% endif %} - {% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] and u.admin_level %} - Revert admin actions - {% endif %} + {{ userpage_admintools.userAdminToolsUpper('mobile') }}

 						 
diff --git a/files/templates/userpage_admintools.html b/files/templates/userpage_admintools.html
index d65ec6e53..302a52e4b 100644
--- a/files/templates/userpage_admintools.html
+++ b/files/templates/userpage_admintools.html
@@ -20,6 +20,19 @@
 	{% endif %}
 {%- endmacro %}
 
+{% macro userAdminToolsUpper(deviceType) -%}
+	{% if v and v.id != u.id and v.admin_level >= PERMS['USER_MODERATION_TOOLS_VISIBLE'] %}
+		{% if v.admin_level >= PERMS['ADMIN_ADD'] and SITE != 'rdrama.net' %}
+			Make admin
+		{% endif %}
+		{% if v.admin_level >= PERMS['ADMIN_REMOVE'] %}
+			Remove admin
+		{% endif %}
+		{% if v.admin_level >= PERMS['ADMIN_ACTIONS_REVERT'] and u.admin_level %}
+			Revert admin actions
+		{% endif %}
+{%- endmacro %}
+
 {% macro userAdminToolsLower(deviceType) -%}
 	{% if v and v.id != u.id and v.admin_level >= PERMS['USER_MODERATION_TOOLS_VISIBLE'] %}