misuzu/templates/manage/users/users.twig
flash 383e2ed0e0 Rewrote the user information class.
This one took multiple days and it pretty invasive into the core of Misuzu so issue might (will) arise, there's also some features that have gone temporarily missing in the mean time and some inefficiencies introduced that will be fixed again at a later time.
The old class isn't gone entirely because I still have to figure out what I'm gonna do about validation, but for the most part this knocks out one of the "layers of backwards compatibility", as I've been referring to it, and is moving us closer to a future where Flashii actually gets real updates.
If you run into anything that's broken and you're inhibited from reporting it through the forum, do it through chat or mail me at flashii-issues@flash.moe.
2023-08-02 22:12:47 +00:00

65 lines
3.5 KiB
Twig

{% extends 'manage/users/master.twig' %}
{% from 'macros.twig' import pagination, container_title, avatar %}
{% set users_pagination = pagination(manage_users_pagination, url('manage-users')) %}
{% block manage_content %}
<div class="container manage__users">
{{ container_title('<i class="fas fa-users fa-fw"></i> Users') }}
{% if users_pagination|trim|length > 0 %}
<div class="manage__users__pagination">
{{ users_pagination }}
</div>
{% endif %}
<div class="manage__users__collection">
{% for user in manage_users %}
<div class="manage__user-item{% if user.info.isDeleted %} manage__user-item--deleted{% endif %}" style="--accent-colour: {{ user.colour }}">
<a href="{{ url('manage-user', {'user': user.info.id}) }}" class="manage__user-item__background"></a>
<div class="manage__user-item__container">
<div class="manage__user-item__avatar">{{ avatar(user.info.id, 40, user.info.name) }}</div>
<div class="manage__user-item__info">
<div class="manage__user-item__name">
{{ user.info.name }}
</div>
<div class="manage__user-item__details">
<div class="manage__user-item__detail">
<i class="fas fa-user-plus fa-fw"></i>
<time datetime="{{ user.info.createdTime|date('c') }}" title="{{ user.info.createdTime|date('r') }}">{{ user.info.createdTime|time_format }}</time> /
<span>{{ user.info.registerRemoteAddressRaw }}</span>
</div>
{% if user.info.hasLastActive %}
<div class="manage__user-item__detail">
<i class="fas fa-user-clock fa-fw"></i>
<time datetime="{{ user.info.lastActiveTime|date('c') }}" title="{{ user.info.lastActiveTime|date('r') }}">{{ user.info.lastActiveTime|time_format }}</time> /
<span>{{ user.info.lastRemoteAddressRaw }}</span>
</div>
{% endif %}
{% if user.info.isDeleted %}
<div class="manage__user-item__detail">
<i class="fas fa-trash-alt fa-fw"></i>
<time datetime="{{ user.info.deletedTime|date('c') }}" title="{{ user.info.deletedTime|date('r') }}">{{ user.info.deletedTime|time_format }}</time>
</div>
{% endif %}
</div>
</div>
<div class="manage__user-item__actions">
<a href="{{ url('user-profile', {'user': user.info.id}) }}" class="manage__user-item__action" title="Profile">
<i class="fas fa-user fa-fw"></i>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% if users_pagination|trim|length > 0 %}
<div class="manage__users__pagination">
{{ users_pagination }}
</div>
{% endif %}
</div>
{% endblock %}