From 5b34ea46c3f458a174c5443714ade43c21defdac Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 16 Nov 2022 21:42:25 -0700 Subject: Call it admin rather than system settings --- templates/admin/_menu.html | 6 ++++ templates/admin/domain_create.html | 39 ++++++++++++++++++++++ templates/admin/domain_delete.html | 33 ++++++++++++++++++ templates/admin/domain_edit.html | 19 +++++++++++ templates/admin/domains.html | 28 ++++++++++++++++ templates/admin/identities.html | 14 ++++++++ templates/admin/settings.html | 18 ++++++++++ templates/admin/users.html | 14 ++++++++ templates/base.html | 4 +-- templates/settings/_menu.html | 5 +++ templates/settings/_settings_identity_menu.html | 5 --- templates/settings/_settings_system_menu.html | 5 --- templates/settings/settings.html | 18 ++++++++++ templates/settings/settings_identity.html | 7 ---- templates/settings/settings_system.html | 18 ---------- .../settings/settings_system_domain_create.html | 39 ---------------------- .../settings/settings_system_domain_delete.html | 33 ------------------ .../settings/settings_system_domain_edit.html | 19 ----------- templates/settings/settings_system_domains.html | 28 ---------------- 19 files changed, 196 insertions(+), 156 deletions(-) create mode 100644 templates/admin/_menu.html create mode 100644 templates/admin/domain_create.html create mode 100644 templates/admin/domain_delete.html create mode 100644 templates/admin/domain_edit.html create mode 100644 templates/admin/domains.html create mode 100644 templates/admin/identities.html create mode 100644 templates/admin/settings.html create mode 100644 templates/admin/users.html create mode 100644 templates/settings/_menu.html delete mode 100644 templates/settings/_settings_identity_menu.html delete mode 100644 templates/settings/_settings_system_menu.html create mode 100644 templates/settings/settings.html delete mode 100644 templates/settings/settings_identity.html delete mode 100644 templates/settings/settings_system.html delete mode 100644 templates/settings/settings_system_domain_create.html delete mode 100644 templates/settings/settings_system_domain_delete.html delete mode 100644 templates/settings/settings_system_domain_edit.html delete mode 100644 templates/settings/settings_system_domains.html (limited to 'templates') 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 @@ + 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 %} +
+

Add A Domain

+

+ Use this form to add a domain that your users can create identities + on. +

+

+ Takahē supports multiple domains per server, but note that when + identities are created they are fixed to their chosen domain, + and you will not be able to delete a domain with identities on it. +

+

+ 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 /.well-known/webfinger, /.well-known/host-meta + and /.well-known/nodeinfo from the main domain to the + service domain. +

+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ Delete + +
+
+{% 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 %} + +
+ {% csrf_token %} + +

Deleting {{ domain.domain }}

+ + {% if num_identities %} +

+ You cannot delete this domain as it has {{ num_identities }} + identit{{ num_identities|pluralize:"y,ies" }} registered on it. +

+

+ You will need to manually remove all identities from this domain in + order to delete it. +

+ {% else %} +

Please confirm deletion of this domain - there are no identities registed on it.

+
+ Cancel + +
+ {% endif %} +
+ +{% 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 %} +
+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ Delete + +
+
+{% 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 %} +
+ {% for domain in domains %} + + + + {{ domain.domain }} + + {% if domain.public %}Public{% else %}Private{% endif %} + {% if domain.service_domain %}({{ domain.service_domain }}){% endif %} + + + + {% empty %} +

You have no domains set up.

+ {% endfor %} + + Add a domain + +
+{% 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 %} +
+

+ Please use the Django Admin for now. +

+
+{% 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 %} +
+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ +
+
+{% 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 %} +
+

+ Please use the Django Admin for now. +

+
+{% endblock %} diff --git a/templates/base.html b/templates/base.html index 402dcd3..bce5e1b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -31,11 +31,11 @@ Compose - + Settings {% if request.user.admin %} - + Admin {% endif %} diff --git a/templates/settings/_menu.html b/templates/settings/_menu.html new file mode 100644 index 0000000..bdae143 --- /dev/null +++ b/templates/settings/_menu.html @@ -0,0 +1,5 @@ + diff --git a/templates/settings/_settings_identity_menu.html b/templates/settings/_settings_identity_menu.html deleted file mode 100644 index bdae143..0000000 --- a/templates/settings/_settings_identity_menu.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/templates/settings/_settings_system_menu.html b/templates/settings/_settings_system_menu.html deleted file mode 100644 index 9206045..0000000 --- a/templates/settings/_settings_system_menu.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/templates/settings/settings.html b/templates/settings/settings.html new file mode 100644 index 0000000..016eebb --- /dev/null +++ b/templates/settings/settings.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %}{{ section.title }} - Settings{% endblock %} + +{% block content %} + {% block menu %} + {% include "settings/_menu.html" %} + {% endblock %} +
+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ +
+
+{% endblock %} diff --git a/templates/settings/settings_identity.html b/templates/settings/settings_identity.html deleted file mode 100644 index cdbf197..0000000 --- a/templates/settings/settings_identity.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "settings/settings_system.html" %} - -{% block title %}{{ section.title }} - Settings{% endblock %} - -{% block menu %} - {% include "settings/_settings_identity_menu.html" %} -{% endblock %} diff --git a/templates/settings/settings_system.html b/templates/settings/settings_system.html deleted file mode 100644 index c10964f..0000000 --- a/templates/settings/settings_system.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ section.title }} - System Settings{% endblock %} - -{% block content %} - {% block menu %} - {% include "settings/_settings_system_menu.html" %} - {% endblock %} -
- {% csrf_token %} - {% for field in form %} - {% include "forms/_field.html" %} - {% endfor %} -
- -
-
-{% endblock %} diff --git a/templates/settings/settings_system_domain_create.html b/templates/settings/settings_system_domain_create.html deleted file mode 100644 index 54d3640..0000000 --- a/templates/settings/settings_system_domain_create.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Add Domain - System Settings{% endblock %} - -{% block content %} - {% block menu %} - {% include "settings/_settings_system_menu.html" %} - {% endblock %} -
-

Add A Domain

-

- Use this form to add a domain that your users can create identities - on. -

-

- Takahē supports multiple domains per server, but note that when - identities are created they are fixed to their chosen domain, - and you will not be able to delete a domain with identities on it. -

-

- 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 /.well-known/webfinger, /.well-known/host-meta - and /.well-known/nodeinfo from the main domain to the - service domain. -

- {% csrf_token %} - {% for field in form %} - {% include "forms/_field.html" %} - {% endfor %} -
- Delete - -
-
-{% endblock %} diff --git a/templates/settings/settings_system_domain_delete.html b/templates/settings/settings_system_domain_delete.html deleted file mode 100644 index 220bbb9..0000000 --- a/templates/settings/settings_system_domain_delete.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Delete {{ domain.domain }} - System Settings{% endblock %} - -{% block content %} - {% block menu %} - {% include "settings/_settings_system_menu.html" %} - {% endblock %} - -
- {% csrf_token %} - -

Deleting {{ domain.domain }}

- - {% if num_identities %} -

- You cannot delete this domain as it has {{ num_identities }} - identit{{ num_identities|pluralize:"y,ies" }} registered on it. -

-

- You will need to manually remove all identities from this domain in - order to delete it. -

- {% else %} -

Please confirm deletion of this domain - there are no identities registed on it.

-
- Cancel - -
- {% endif %} -
- -{% endblock %} diff --git a/templates/settings/settings_system_domain_edit.html b/templates/settings/settings_system_domain_edit.html deleted file mode 100644 index c05d5d5..0000000 --- a/templates/settings/settings_system_domain_edit.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ domain.domain }} - System Settings{% endblock %} - -{% block content %} - {% block menu %} - {% include "settings/_settings_system_menu.html" %} - {% endblock %} -
- {% csrf_token %} - {% for field in form %} - {% include "forms/_field.html" %} - {% endfor %} -
- Delete - -
-
-{% endblock %} diff --git a/templates/settings/settings_system_domains.html b/templates/settings/settings_system_domains.html deleted file mode 100644 index dccde65..0000000 --- a/templates/settings/settings_system_domains.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ section.title }} - System Settings{% endblock %} - -{% block content %} - {% block menu %} - {% include "settings/_settings_system_menu.html" %} - {% endblock %} -
- {% for domain in domains %} - - - - {{ domain.domain }} - - {% if domain.public %}Public{% else %}Private{% endif %} - {% if domain.service_domain %}({{ domain.service_domain }}){% endif %} - - - - {% empty %} -

You have no domains set up.

- {% endfor %} - - Add a domain - -
-{% endblock %} -- cgit v1.2.3