diff options
author | Andrew Godwin | 2022-12-16 16:38:52 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-16 16:38:52 -0700 |
commit | 45c6978bc397691b22db0360b16b19979eac7dce (patch) | |
tree | 8e22839cd8a7b685f1d4491762c5d56aa5960dee /templates | |
parent | 1bcdff79e7e14b2166056d3b16531b32474c374b (diff) | |
download | takahe-45c6978bc397691b22db0360b16b19979eac7dce.tar.gz takahe-45c6978bc397691b22db0360b16b19979eac7dce.tar.bz2 takahe-45c6978bc397691b22db0360b16b19979eac7dce.zip |
User admin and LD schema fixes
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/user_edit.html | 36 | ||||
-rw-r--r-- | templates/admin/users.html | 39 |
2 files changed, 72 insertions, 3 deletions
diff --git a/templates/admin/user_edit.html b/templates/admin/user_edit.html new file mode 100644 index 0000000..b795848 --- /dev/null +++ b/templates/admin/user_edit.html @@ -0,0 +1,36 @@ +{% extends "settings/base.html" %} + +{% block subtitle %}{{ user.email }}{% endblock %} + +{% block content %} + <h1>{{ editing_user.email }}</h1> + <form action="." method="POST"> + {% csrf_token %} + <fieldset> + <legend>Permissions</legend> + {% include "forms/_field.html" with field=form.status %} + {% if same_user %} + <ul class="errorlist"> + <li>You cannot edit your own permission status!</li> + </ul> + {% endif %} + </fieldset> + <fieldset> + <legend>Identities</legend> + {% for identity in editing_user.identities.all %} + {% include "activities/_identity.html" %} + {% empty %} + <p>This user has no identities yet.</p> + {% endfor %} + </fieldset> + <fieldset> + <legend>Dates</legend> + <p>Last seen: <time title="{{ editing_user.last_seen }} UTC">{{ editing_user.last_seen | timesince }} ago</time></p> + <p>Created: <time title="{{ editing_user.created }} UTC">{{ editing_user.created | timesince }} ago</time></p> + </fieldset> + <div class="buttons"> + <a href="{{ editing_user.urls.admin }}" class="button secondary left">Back</a> + <button>Save</button> + </div> + </form> +{% endblock %} diff --git a/templates/admin/users.html b/templates/admin/users.html index f2dc864..1bf5b2e 100644 --- a/templates/admin/users.html +++ b/templates/admin/users.html @@ -3,7 +3,40 @@ {% block subtitle %}Users{% endblock %} {% block content %} - <p> - Please use the <a href="/djadmin/users/user/">Django Admin</a> for now. - </p> + <form action="." class="search"> + <input type="search" name="query" value="{{ query }}" placeholder="Search by email"> + <button><i class="fa-solid fa-search"></i></button> + </form> + <section class="icon-menu"> + {% for user in page_obj %} + <a class="option" href="{{ user.urls.admin_edit }}"> + <i class="fa-solid fa-user"></i> + <span class="handle"> + {{ user.email }} + <small> + {{ user.num_identities }} identit{{ user.num_identities|pluralize:"y,ies" }} + </small> + </span> + {% if user.banned %} + <span class="pill bad">Banned</span> + {% endif %} + </a> + {% empty %} + <p class="option empty"> + {% if query %} + No users match your query. + {% else %} + There are no users yet. + {% endif %} + </p> + {% endfor %} + <div class="load-more"> + {% if page_obj.has_previous %} + <a class="button" href=".?page={{ page_obj.previous_page_number }}">Previous Page</a> + {% endif %} + {% if page_obj.has_next %} + <a class="button" href=".?page={{ page_obj.next_page_number }}">Next Page</a> + {% endif %} + </div> + </section> {% endblock %} |