summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-25 17:52:43 -0700
committerAndrew Godwin2022-11-25 17:52:57 -0700
commit8ca36fd95800907a1c7f3c9efedd0085b8f0ec9b (patch)
treefaf67cf203e54f5907839531112c3d5739fa5082 /templates
parent2a8cb8f8617d618c8d2777cccd823b28a3edc812 (diff)
downloadtakahe-8ca36fd95800907a1c7f3c9efedd0085b8f0ec9b.tar.gz
takahe-8ca36fd95800907a1c7f3c9efedd0085b8f0ec9b.tar.bz2
takahe-8ca36fd95800907a1c7f3c9efedd0085b8f0ec9b.zip
Add federation admin page
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/federation.html24
-rw-r--r--templates/admin/federation_edit.html19
-rw-r--r--templates/settings/_menu.html3
3 files changed, 46 insertions, 0 deletions
diff --git a/templates/admin/federation.html b/templates/admin/federation.html
new file mode 100644
index 0000000..1a48176
--- /dev/null
+++ b/templates/admin/federation.html
@@ -0,0 +1,24 @@
+{% extends "settings/base.html" %}
+
+{% block subtitle %}Federation{% endblock %}
+
+{% block content %}
+ <section class="icon-menu">
+ {% for domain in domains %}
+ <a class="option" href="{{ domain.urls.edit_federation }}">
+ <i class="fa-solid fa-globe"></i>
+ <span class="handle">
+ {{ domain.domain }}
+ <small>
+ {{ domain.num_users }} remote identit{{ domain.num_users|pluralize:"y,ies" }}
+ </small>
+ </span>
+ {% if domain.blocked %}
+ <span class="pill bad">Blocked</span>
+ {% endif %}
+ </a>
+ {% empty %}
+ <p class="option empty">There are no federation links yet.</p>
+ {% endfor %}
+ </section>
+{% endblock %}
diff --git a/templates/admin/federation_edit.html b/templates/admin/federation_edit.html
new file mode 100644
index 0000000..f96e7ae
--- /dev/null
+++ b/templates/admin/federation_edit.html
@@ -0,0 +1,19 @@
+{% extends "settings/base.html" %}
+
+{% block subtitle %}{{ domain.domain }}{% endblock %}
+
+{% block content %}
+ <form action="." method="POST">
+ {% csrf_token %}
+ <h1>{{ domain }}</h1>
+ <fieldset>
+ <legend>Federation Controls</legend>
+ {% include "forms/_field.html" with field=form.blocked %}
+ </fieldset>
+ <div class="buttons">
+ <a href="{{ domain.urls.root }}" class="button secondary left">Back</a>
+ <a href="{{ domain.urls.delete }}" class="button delete">Delete</a>
+ <button>Save</button>
+ </div>
+ </form>
+{% endblock %}
diff --git a/templates/settings/_menu.html b/templates/settings/_menu.html
index 49a5d68..531febb 100644
--- a/templates/settings/_menu.html
+++ b/templates/settings/_menu.html
@@ -24,6 +24,9 @@
<a href="{% url "admin_domains" %}" {% if section == "domains" %}class="selected"{% endif %} title="Domains">
<i class="fa-solid fa-globe"></i> Domains
</a>
+ <a href="{% url "admin_federation" %}" {% if section == "federation" %}class="selected"{% endif %} title="Federation">
+ <i class="fa-solid fa-diagram-project"></i> Federation
+ </a>
<a href="{% url "admin_users" %}" {% if section == "users" %}class="selected"{% endif %} title="Users">
<i class="fa-solid fa-users"></i> Users
</a>