takahe/templates/admin/identities.html

74 lines
3.0 KiB
HTML
Raw Normal View History

2022-11-17 16:43:00 -08:00
{% extends "settings/base.html" %}
{% load activity_tags %}
2022-11-17 16:43:00 -08:00
{% block subtitle %}Identities{% endblock %}
{% block content %}
2022-12-16 18:42:48 -08:00
<form action="." class="search">
<input type="search" name="query" value="{{ query }}" placeholder="Search by name/username">
{% if local_only %}
<input type="hidden" name="local_only" value="true">
{% endif %}
<button><i class="fa-solid fa-search"></i></button>
</form>
<div class="view-options">
{% if local_only %}
<a href=".?{% urlparams local_only=False %}" class="selected"><i class="fa-solid fa-check"></i> Local Only</a>
2022-12-16 18:42:48 -08:00
{% else %}
<a href=".?{% urlparams local_only=True %}"><i class="fa-solid fa-xmark"></i> Local Only</a>
2022-12-16 18:42:48 -08:00
{% endif %}
</div>
<table class="items">
2022-12-16 18:42:48 -08:00
{% for identity in page_obj %}
<tr>
<td class="icon">
<a href="{{ identity.urls.admin_edit }}" class="overlay"></a>
<img
src="{{ identity.local_icon_url.relative }}"
class="icon"
alt="Avatar for {{ identity.name_or_handle }}"
loading="lazy"
data-handle="{{ identity.name_or_handle }}"
_="on error set my.src to generate_avatar(@data-handle)"
>
</td>
<td class="name">
<a href="{{ identity.urls.admin_edit }}" class="overlay"></a>
{{ identity.html_name_or_handle }}
<small>@{{ identity.handle }}</small>
</td>
<td>
{% if identity.restriction == 1 %}
<span class="bad">Limited</span>
{% elif identity.restriction == 2 %}
<span class="bad">Blocked</span>
2023-01-09 08:58:17 -08:00
{% endif %}
</td>
<td class="stat">
{% if identity.local %}
Local
<small>{{ identity.followers_count }} follower{{ identity.followers_count|pluralize }}</small>
{% else %}
Remote
<small>{{ identity.followers_count }} local follower{{ identity.followers_count|pluralize }}</small>
{% endif %}
</td>
<td class="actions">
<a href="{{ identity.urls.admin_edit }}" title="View"><i class="fa-solid fa-eye"></i></a>
</td>
</tr>
2022-12-16 18:42:48 -08:00
{% empty %}
<tr class="empty">
<td>
{% if query %}
No identities match your query.
{% else %}
There are no identities yet.
{% endif %}
</td>
</tr>
2022-12-16 18:42:48 -08:00
{% endfor %}
</table>
{% include "admin/_pagination.html" with nouns="identity,identities" %}
{% endblock %}