diff --git a/app/__init__.py b/app/__init__.py
index f577408..1057711 100644
--- a/app/__init__.py
+++ b/app/__init__.py
@@ -103,6 +103,7 @@ def create_app():
"InfoboxIcons": InfoboxIcons,
"InfoboxHTMLClass": InfoboxHTMLClass,
"InfoboxKind": InfoboxKind,
+ "PermissionLevel": PermissionLevel,
"__commit": commit,
"__emoji": EMOJI,
}
diff --git a/app/templates/common/macros.html b/app/templates/common/macros.html
index bf2d52c..960f2eb 100644
--- a/app/templates/common/macros.html
+++ b/app/templates/common/macros.html
@@ -171,3 +171,18 @@
{% endmacro %}
+
+{% macro accordion(hidden=false, style="", disabled=false) %}
+{% if disabled %}
+{% set hidden = true %}
+{% endif %}
+
+
+
+ {{ caller('content') }}
+
+
+{% endmacro %}
diff --git a/app/templates/mod/user-list.html b/app/templates/mod/user-list.html
index e8e7f07..79ae6ec 100644
--- a/app/templates/mod/user-list.html
+++ b/app/templates/mod/user-list.html
@@ -1,10 +1,59 @@
+{% from "common/macros.html" import timestamp, accordion %}
{% extends "base.html" %}
{% block content %}
-
-
+
+ {% set guests = (users | selectattr('permission', 'eq', PermissionLevel.GUEST.value) | list) %}
+ {% set not_guests = (users | selectattr('permission', 'gt', PermissionLevel.GUEST.value) | list) %}
+ {% call(section) accordion(disabled=(guests | count==0)) %}
+ {% if section == "header" %}
+
Unconfirmed guests
+ {% elif section == "content" %}
+
+
+ Username |
+ Signed up on |
+
+ {% for user in guests %}
+
+
+ {{user['username']}}
+
+ |
+
+ {{ timestamp(user.created_at) }}
+ |
+
+ {% endfor %}
+
+ {% endif %}
+ {% endcall %}
+
+ {% call(section) accordion() %}
+ {% if section == "header" %}
+
Other users
+ {% elif section == "content" %}
+
+
+ Username |
+ Permission |
+ Signed up on |
+
+ {% for user in not_guests %}
+
+
+ {{user['username']}}
+
+ |
+
+ {{ user.permission | permission_string }}
+ |
+
+ {{ timestamp(user.created_at) }}
+ |
+
+ {% endfor %}
+
+ {% endif %}
+ {% endcall %}
{% endblock %}
diff --git a/data/static/style.css b/data/static/style.css
index 2f533f7..dabab5b 100644
--- a/data/static/style.css
+++ b/data/static/style.css
@@ -570,6 +570,28 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus
border-collapse: collapse;
}
+.users-table {
+ border-collapse: collapse;
+ width: 100%;
+ margin: 10px 0;
+ overflow: hidden;
+}
+
+.users-table tr th {
+ background-color: #beb1ce;
+ padding: 5px 0;
+}
+
+.users-table tr td {
+ background-color: rgb(177, 206, 204.5);
+ padding: 5px 0;
+ text-align: center;
+}
+
+.users-table .small {
+ width: 250px;
+}
+
.topic {
display: grid;
grid-template-columns: 1.5fr 96px;
diff --git a/sass/style.scss b/sass/style.scss
index 0f598b3..fd73e55 100644
--- a/sass/style.scss
+++ b/sass/style.scss
@@ -567,6 +567,28 @@ input[type="text"], input[type="password"], textarea, select {
border-collapse: collapse;
}
+.users-table {
+ border-collapse: collapse;
+ width: 100%;
+ margin: 10px 0;
+ overflow: hidden;
+}
+
+.users-table tr th {
+ background-color: $button_color2;
+ padding: 5px 0;
+}
+
+.users-table tr td {
+ background-color: $button_color;
+ padding: 5px 0;
+ text-align: center;
+}
+
+.users-table .small {
+ width: 250px;
+}
+
.topic {
display: grid;
grid-template-columns: 1.5fr 96px;