2023-07-26 18:19:46 +00:00
|
|
|
{% extends 'manage/users/master.twig' %}
|
|
|
|
{% from 'macros.twig' import pagination, container_title, avatar %}
|
|
|
|
|
2023-09-08 20:40:48 +00:00
|
|
|
{% set bans_pagination = pagination(manage_bans_pagination, 'manage-users-bans', {'user': manage_bans_filter_user.id|default(0)}) %}
|
2023-07-26 18:19:46 +00:00
|
|
|
{% set bans_filtering = manage_bans_filter_user is not null %}
|
|
|
|
|
|
|
|
{% block manage_content %}
|
|
|
|
<div class="container manage__bans">
|
|
|
|
{{ container_title('<i class="fas fa-ban fa-fw"></i> Bans') }}
|
|
|
|
|
|
|
|
<div class="manage__description">
|
|
|
|
List of user bans.
|
|
|
|
{% if not bans_filtering %}Filter by a user to issue a new ban.{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if bans_pagination|trim|length > 0 %}
|
|
|
|
<div class="manage__bans__pagination">
|
|
|
|
{{ bans_pagination }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if bans_filtering %}
|
|
|
|
<div class="manage__bans__actions">
|
|
|
|
<a href="{{ url('manage-users-ban', {'user': manage_bans_filter_user.id}) }}" class="input__button">Issue new Ban</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="manage__bans__list">
|
|
|
|
{% for ban in manage_bans %}
|
|
|
|
<div class="manage__bans__item">
|
|
|
|
<div class="manage__bans__item__header">
|
|
|
|
<div class="manage__bans__item__attributes">
|
|
|
|
{% if ban.mod is not null %}
|
2023-08-02 22:12:47 +00:00
|
|
|
<div class="manage__bans__item__attribute manage__bans__item__author" style="--user-colour: {{ ban.mod_colour }}">
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="manage__bans__item__author__prefix">Issued by</div>
|
|
|
|
<div class="manage__bans__item__author__avatar">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('user-profile', {'user': ban.mod.id}) }}">{{ avatar(ban.mod.id, 20, ban.mod.name) }}</a>
|
2023-07-26 18:19:46 +00:00
|
|
|
</div>
|
|
|
|
<div class="manage__bans__item__author__name">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('user-profile', {'user': ban.mod.id}) }}">{{ ban.mod.name }}</a>
|
2023-07-26 18:19:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="manage__bans__item__attribute manage__bans__item__created">
|
|
|
|
<div class="manage__bans__item__created__icon"><i class="fas fa-clock"></i></div>
|
|
|
|
<div class="manage__bans__item__created__time">
|
|
|
|
<time datetime="{{ ban.info.createdTime|date('c') }}" title="{{ ban.info.createdTime|date('r') }}">{{ ban.info.createdTime|time_format }}</time>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-11-30 04:09:29 +00:00
|
|
|
{% if ban.info.permanent %}
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="manage__bans__item__attribute manage__bans__item__permanent">
|
|
|
|
<div class="manage__bans__item__permanent__icon"><i class="fas fa-dumpster"></i></div>
|
|
|
|
<div class="manage__bans__item__permanent__time">
|
|
|
|
PERMANENT
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="manage__bans__item__attribute manage__bans__item__expires">
|
|
|
|
<div class="manage__bans__item__expires__icon"><i class="fas fa-stopwatch"></i></div>
|
|
|
|
<div class="manage__bans__item__expires__time" title="{{ ban.info.expiresTime|date('r') }}">
|
2024-11-30 04:09:29 +00:00
|
|
|
{% if ban.info.active %}
|
2023-07-26 18:19:46 +00:00
|
|
|
<span>{{ ban.info.remainingString }} remaining</span>
|
|
|
|
{% else %}
|
|
|
|
<span>{{ ban.info.durationString }}</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2024-11-30 04:09:29 +00:00
|
|
|
{% if ban.info.active %}
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="manage__bans__item__expires__status manage__bans__item__expires__status--active">
|
|
|
|
<span>active</span>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="manage__bans__item__expires__status manage__bans__item__expires__status--expired">
|
|
|
|
<span>expired</span>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-08-02 22:12:47 +00:00
|
|
|
<div class="manage__bans__item__attribute manage__bans__item__user" style="--user-colour: {{ ban.user_colour }}">
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="manage__bans__item__user__prefix">Subject</div>
|
|
|
|
<div class="manage__bans__item__user__avatar">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('manage-user', {'user': ban.user.id}) }}">{{ avatar(ban.user.id, 20, ban.user.name) }}</a>
|
2023-07-26 18:19:46 +00:00
|
|
|
</div>
|
|
|
|
<div class="manage__bans__item__user__name">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('manage-user', {'user': ban.user.id}) }}">{{ ban.user.name }}</a>
|
2023-07-26 18:19:46 +00:00
|
|
|
</div>
|
|
|
|
{% if not bans_filtering %}
|
|
|
|
<div class="manage__bans__item__user__filter">
|
|
|
|
<a href="{{ url('manage-users-bans', {'user': ban.user.id}) }}">Filter</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="manage__bans__item__actions">
|
2023-09-10 20:02:11 +00:00
|
|
|
<a href="{{ url('manage-users-ban-delete', { ban: ban.info.id, csrf: csrf_token() }) }}" title="Revoke/Delete" class="input__button input__button--autosize input__button--destroy manage__bans__item__action" onclick="return confirm('Are you sure?');"><i class="fas fa-times fa-fw"></i></a>
|
2023-07-26 18:19:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-11-30 04:09:29 +00:00
|
|
|
{% if ban.info.publicReason is not empty %}
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="manage__bans__item__reason">
|
|
|
|
<div class="manage__bans__item__reason__title">Reason displayed publicly and to the user themselves:</div>
|
|
|
|
<div class="manage__bans__item__reason__body">{{ ban.info.publicReason }}</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="manage__bans__item__reason">
|
|
|
|
<div class="manage__bans__item__reason__title">This ban does not display any reason.</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2024-11-30 04:09:29 +00:00
|
|
|
{% if ban.info.privateReason is not empty %}
|
2023-07-26 18:19:46 +00:00
|
|
|
<div class="manage__bans__item__reason">
|
|
|
|
<div class="manage__bans__item__reason__title">Additional information for moderators:</div>
|
|
|
|
<div class="manage__bans__item__reason__body">{{ ban.info.privateReason }}</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="manage__bans__item__reason">
|
|
|
|
<div class="manage__bans__item__reason__title">This ban does not provide additional information for moderators.</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if bans_pagination|trim|length > 0 %}
|
|
|
|
<div class="manage__bans__pagination">
|
|
|
|
{{ bans_pagination }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|