From b9f3e92acf9a37289c38a4267cf37a01e4a06dd1 Mon Sep 17 00:00:00 2001 From: rra Date: Sun, 10 Mar 2024 20:17:53 +0100 Subject: [PATCH] redesign domains; add banned domains; add permission control --- app/templates/domain/domains.html | 64 +++++++++----------- app/templates/domain/domains_banned.html | 77 ++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 35 deletions(-) create mode 100644 app/templates/domain/domains_banned.html diff --git a/app/templates/domain/domains.html b/app/templates/domain/domains.html index 754e72c7..3e45e03d 100644 --- a/app/templates/domain/domains.html +++ b/app/templates/domain/domains.html @@ -6,67 +6,60 @@ {% from 'bootstrap/form.html' import render_form %} {% block app_content %} - -
-
-
{% endblock %} diff --git a/app/templates/domain/domains_banned.html b/app/templates/domain/domains_banned.html new file mode 100644 index 00000000..39ebc190 --- /dev/null +++ b/app/templates/domain/domains_banned.html @@ -0,0 +1,77 @@ +{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %} + {% extends 'themes/' + theme() + '/base.html' %} +{% else %} + {% extends "base.html" %} +{% endif %} %} +{% from 'bootstrap/form.html' import render_form %} + +{% block app_content %} +
+
+ + +
+
+

{{ _('Domains') }}

+ {% if not ban_visibility_permission %} +

Your account is either too new or too low reputation to be able to see banned domains on this instance-

+ {% else %} + {% if search == '' %} +

All domains this instance banned

+ {% else %} +

Banned domains containing "{{ _('%(search)s', search=search) }}"

+ {% endif %} +
+ +
+ + + + {% if user_access('ban users', current_user.id) or user_access('manage users', current_user.id) %}{%endif%} + + {% for domain in domains %} + + + + + {% endfor %} +
DomainActions
{{ domain.name }} + {% if user_access('ban users', current_user.id) or user_access('manage users', current_user.id) %} + {% if domain.banned %} + {{ _('Unban') }} + {% else %} + {{ _('Ban') }} + {% endif %} + {% endif %} +
+
+ +
+ {% endif %} +
+
+{% endblock %} +