misuzu/templates/manage/users/users.twig

65 lines
3.5 KiB
Twig
Raw Normal View History

2022-09-13 13:14:49 +00:00
{% 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>
2022-09-13 13:14:49 +00:00
<div class="manage__user-item__container">
<div class="manage__user-item__avatar">{{ avatar(user.info.id, 40, user.info.name) }}</div>
2022-09-13 13:14:49 +00:00
<div class="manage__user-item__info">
<div class="manage__user-item__name">
{{ user.info.name }}
2022-09-13 13:14:49 +00:00
</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>
2022-09-13 13:14:49 +00:00
</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 %}
2022-09-13 13:14:49 +00:00
<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>
2022-09-13 13:14:49 +00:00
</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">
2022-09-13 13:14:49 +00:00
<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 %}