summaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/_menu.html6
-rw-r--r--templates/admin/domain_create.html39
-rw-r--r--templates/admin/domain_delete.html33
-rw-r--r--templates/admin/domain_edit.html19
-rw-r--r--templates/admin/domains.html28
-rw-r--r--templates/admin/identities.html14
-rw-r--r--templates/admin/settings.html18
-rw-r--r--templates/admin/users.html14
8 files changed, 171 insertions, 0 deletions
diff --git a/templates/admin/_menu.html b/templates/admin/_menu.html
new file mode 100644
index 0000000..8f0bc60
--- /dev/null
+++ b/templates/admin/_menu.html
@@ -0,0 +1,6 @@
+<nav>
+ <a href="{% url "admin_basic" %}" {% if section == "basic" %}class="selected"{% endif %}>Basic</a>
+ <a href="{% url "admin_domains" %}" {% if section == "domains" %}class="selected"{% endif %}>Domains</a>
+ <a href="{% url "admin_users" %}" {% if section == "users" %}class="selected"{% endif %}>Users</a>
+ <a href="{% url "admin_identities" %}" {% if section == "identities" %}class="selected"{% endif %}>Identities</a>
+</nav>
diff --git a/templates/admin/domain_create.html b/templates/admin/domain_create.html
new file mode 100644
index 0000000..09dbc23
--- /dev/null
+++ b/templates/admin/domain_create.html
@@ -0,0 +1,39 @@
+{% extends "base.html" %}
+
+{% block title %}Add Domain - Admin{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "admin/_menu.html" %}
+ {% endblock %}
+ <form action="." method="POST">
+ <h1>Add A Domain</h1>
+ <p>
+ Use this form to add a domain that your users can create identities
+ on.
+ </p>
+ <p>
+ Takahē supports multiple domains per server, but note that when
+ identities are created they are <b>fixed to their chosen domain</b>,
+ and you will <b>not be able to delete a domain with identities on it</b>.
+ </p>
+ <p>
+ If you will be serving Takahē on the domain you choose, you can leave
+ the "service domain" field blank. If you would like to let users create
+ accounts on a domain serving something else, you must pick a unique
+ "service domain" that pairs up to your chosen domain name, make sure
+ Takahē is served on that, and add redirects
+ for <tt>/.well-known/webfinger</tt>, <tt>/.well-known/host-meta</tt>
+ and <tt>/.well-known/nodeinfo</tt> from the main domain to the
+ service domain.
+ </p>
+ {% csrf_token %}
+ {% for field in form %}
+ {% include "forms/_field.html" %}
+ {% endfor %}
+ <div class="buttons">
+ <a href="{{ domain.urls.delete }}" class="button delete">Delete</a>
+ <button>Save</button>
+ </div>
+ </form>
+{% endblock %}
diff --git a/templates/admin/domain_delete.html b/templates/admin/domain_delete.html
new file mode 100644
index 0000000..d47a673
--- /dev/null
+++ b/templates/admin/domain_delete.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %}
+
+{% block title %}Delete {{ domain.domain }} - Admin{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "admin/_menu.html" %}
+ {% endblock %}
+
+ <form action="." method="POST">
+ {% csrf_token %}
+
+ <h1>Deleting {{ domain.domain }}</h1>
+
+ {% if num_identities %}
+ <p>
+ You cannot delete this domain as it has <b>{{ num_identities }}
+ identit{{ num_identities|pluralize:"y,ies" }}</b> registered on it.
+ </p>
+ <p>
+ You will need to manually remove all identities from this domain in
+ order to delete it.
+ </p>
+ {% else %}
+ <p>Please confirm deletion of this domain - there are no identities registed on it.</p>
+ <div class="buttons">
+ <a class="button" href="{{ domain.urls.edit }}">Cancel</a>
+ <button class="delete">Confirm Deletion</button>
+ </div>
+ {% endif %}
+ </form>
+
+{% endblock %}
diff --git a/templates/admin/domain_edit.html b/templates/admin/domain_edit.html
new file mode 100644
index 0000000..64e195c
--- /dev/null
+++ b/templates/admin/domain_edit.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+{% block title %}{{ domain.domain }} - Admin{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "admin/_menu.html" %}
+ {% endblock %}
+ <form action="." method="POST">
+ {% csrf_token %}
+ {% for field in form %}
+ {% include "forms/_field.html" %}
+ {% endfor %}
+ <div class="buttons">
+ <a href="{{ domain.urls.delete }}" class="button delete">Delete</a>
+ <button>Save</button>
+ </div>
+ </form>
+{% endblock %}
diff --git a/templates/admin/domains.html b/templates/admin/domains.html
new file mode 100644
index 0000000..b7925da
--- /dev/null
+++ b/templates/admin/domains.html
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+
+{% block title %}{{ section.title }} - Admin{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "admin/_menu.html" %}
+ {% endblock %}
+ <section class="icon-menu">
+ {% for domain in domains %}
+ <a class="option" href="{{ domain.urls.edit }}">
+ <i class="fa-solid fa-globe"></i>
+ <span class="handle">
+ {{ domain.domain }}
+ <small>
+ {% if domain.public %}Public{% else %}Private{% endif %}
+ {% if domain.service_domain %}({{ domain.service_domain }}){% endif %}
+ </small>
+ </span>
+ </a>
+ {% empty %}
+ <p class="option empty">You have no domains set up.</p>
+ {% endfor %}
+ <a href="{% url "admin_domains_create" %}" class="option new">
+ <i class="fa-solid fa-plus"></i> Add a domain
+ </a>
+ </section>
+{% endblock %}
diff --git a/templates/admin/identities.html b/templates/admin/identities.html
new file mode 100644
index 0000000..86e70db
--- /dev/null
+++ b/templates/admin/identities.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% block title %}Identities - Admin{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "admin/_menu.html" %}
+ {% endblock %}
+ <form>
+ <p>
+ Please use the <a href="/djadmin/users/identity/">Django Admin</a> for now.
+ </p>
+ </form>
+{% endblock %}
diff --git a/templates/admin/settings.html b/templates/admin/settings.html
new file mode 100644
index 0000000..e031347
--- /dev/null
+++ b/templates/admin/settings.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+
+{% block title %}{{ section.title }} - Admin{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "admin/_menu.html" %}
+ {% endblock %}
+ <form action="." method="POST">
+ {% csrf_token %}
+ {% for field in form %}
+ {% include "forms/_field.html" %}
+ {% endfor %}
+ <div class="buttons">
+ <button>Save</button>
+ </div>
+ </form>
+{% endblock %}
diff --git a/templates/admin/users.html b/templates/admin/users.html
new file mode 100644
index 0000000..0b75b88
--- /dev/null
+++ b/templates/admin/users.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% block title %}Users - Admin{% endblock %}
+
+{% block content %}
+ {% block menu %}
+ {% include "admin/_menu.html" %}
+ {% endblock %}
+ <form>
+ <p>
+ Please use the <a href="/djadmin/users/user/">Django Admin</a> for now.
+ </p>
+ </form>
+{% endblock %}