mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-27 15:40:29 +00:00
113db4ab3a
Also did a new table style for admin pages
83 lines
3.5 KiB
HTML
83 lines
3.5 KiB
HTML
{% extends "settings/base.html" %}
|
|
{% load activity_tags %}
|
|
|
|
{% block subtitle %}Identities{% endblock %}
|
|
|
|
{% block content %}
|
|
<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>
|
|
{% else %}
|
|
<a href=".?{% urlparams local_only=True %}"><i class="fa-solid fa-xmark"></i> Local Only</a>
|
|
{% endif %}
|
|
</div>
|
|
<table class="items">
|
|
{% 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>
|
|
{% 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>
|
|
{% empty %}
|
|
<tr class="empty">
|
|
<td>
|
|
{% if query %}
|
|
No identities match your query.
|
|
{% else %}
|
|
There are no identities yet.
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
<div class="pagination">
|
|
{% if page_obj.has_previous %}
|
|
<a class="button" href=".?{% urlparams page=page_obj.previous_page_number %}">Previous Page</a>
|
|
{% endif %}
|
|
{% if page_obj.paginator.count %}
|
|
<span class="count">{{ page_obj.paginator.count }} identit{{page_obj.paginator.count|pluralize:"y,ies" }}</span>
|
|
{% endif %}
|
|
{% if page_obj.has_next %}
|
|
<a class="button" href=".?{% urlparams page=page_obj.next_page_number %}">Next Page</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|