2022-09-13 13:14:49 +00:00
|
|
|
{% extends 'manage/users/master.twig' %}
|
2023-07-26 22:43:50 +00:00
|
|
|
{% from 'macros.twig' import pagination, container_title, avatar %}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
2023-09-08 20:40:48 +00:00
|
|
|
{% set warns_pagination = pagination(manage_warns_pagination, 'manage-users-warnings', {'user': manage_warns_filter_user.id|default(0)}) %}
|
2023-07-26 22:43:50 +00:00
|
|
|
{% set warns_filtering = manage_warns_filter_user is not null %}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
2023-07-26 22:43:50 +00:00
|
|
|
{% block manage_content %}
|
|
|
|
<div class="container manage__warnings">
|
2022-09-13 13:14:49 +00:00
|
|
|
{{ container_title('<i class="fas fa-exclamation-circle fa-fw"></i> Warnings') }}
|
|
|
|
|
2023-07-26 22:43:50 +00:00
|
|
|
<div class="manage__description">
|
|
|
|
List of user warnings.
|
|
|
|
{% if not warns_filtering %}Filter by a user to issue a new warning.{% endif %}
|
|
|
|
</div>
|
2022-09-13 13:14:49 +00:00
|
|
|
|
2023-07-26 22:43:50 +00:00
|
|
|
{% if warns_pagination|trim|length > 0 %}
|
|
|
|
<div class="manage__warnings__pagination">
|
|
|
|
{{ warns_pagination }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-09-13 13:14:49 +00:00
|
|
|
|
2023-07-26 22:43:50 +00:00
|
|
|
{% if warns_filtering %}
|
|
|
|
<div class="manage__warnings__actions">
|
|
|
|
<a href="{{ url('manage-users-warning', {'user': manage_warns_filter_user.id}) }}" class="input__button">Issue new Warning</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="manage__warnings__list">
|
|
|
|
{% for warn in manage_warns %}
|
|
|
|
<div class="manage__warnings__item">
|
|
|
|
<div class="manage__warnings__item__header">
|
|
|
|
<div class="manage__warnings__item__attributes">
|
|
|
|
{% if warn.mod is not null %}
|
2023-08-02 22:12:47 +00:00
|
|
|
<div class="manage__warnings__item__attribute manage__warnings__item__author" style="--user-colour: {{ warn.mod_colour }}">
|
2023-07-26 22:43:50 +00:00
|
|
|
<div class="manage__warnings__item__author__prefix">Issued by</div>
|
|
|
|
<div class="manage__warnings__item__author__avatar">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('user-profile', {'user': warn.mod.id}) }}">{{ avatar(warn.mod.id, 20, warn.mod.name) }}</a>
|
2023-07-26 22:43:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="manage__warnings__item__author__name">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('user-profile', {'user': warn.mod.id}) }}">{{ warn.mod.name }}</a>
|
2023-07-26 22:43:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="manage__warnings__item__attribute manage__warnings__item__created">
|
|
|
|
<div class="manage__warnings__item__created__icon"><i class="fas fa-clock"></i></div>
|
|
|
|
<div class="manage__warnings__item__created__time">
|
|
|
|
<time datetime="{{ warn.info.createdTime|date('c') }}" title="{{ warn.info.createdTime|date('r') }}">{{ warn.info.createdTime|time_format }}</time>
|
|
|
|
</div>
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
2023-08-02 22:12:47 +00:00
|
|
|
<div class="manage__warnings__item__attribute manage__warnings__item__user" style="--user-colour: {{ warn.user_colour }}">
|
2023-07-26 22:43:50 +00:00
|
|
|
<div class="manage__warnings__item__user__prefix">Subject</div>
|
|
|
|
<div class="manage__warnings__item__user__avatar">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('manage-user', {'user': warn.user.id}) }}">{{ avatar(warn.user.id, 20, warn.user.name) }}</a>
|
2023-07-26 22:43:50 +00:00
|
|
|
</div>
|
|
|
|
<div class="manage__warnings__item__user__name">
|
2023-08-02 22:12:47 +00:00
|
|
|
<a href="{{ url('manage-user', {'user': warn.user.id}) }}">{{ warn.user.name }}</a>
|
2023-07-26 22:43:50 +00:00
|
|
|
</div>
|
|
|
|
{% if not warns_filtering %}
|
|
|
|
<div class="manage__warnings__item__user__filter">
|
|
|
|
<a href="{{ url('manage-users-warnings', {'user': warn.user.id}) }}">Filter</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-26 22:43:50 +00:00
|
|
|
<div class="manage__warnings__item__actions">
|
2023-09-10 20:02:11 +00:00
|
|
|
<a href="{{ url('manage-users-warning-delete', { warning: warn.info.id, csrf: csrf_token() }) }}" title="Remove" class="input__button input__button--autosize input__button--destroy manage__warnings__item__action" onclick="return confirm('Are you sure?');"><i class="fas fa-times fa-fw"></i></a>
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-26 22:43:50 +00:00
|
|
|
<div class="manage__warnings__item__reason">
|
|
|
|
{% for line in warn.info.bodyLines %}
|
|
|
|
<p>{{ line }}</p>
|
|
|
|
{% endfor %}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-26 22:43:50 +00:00
|
|
|
{% endfor %}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
|
2023-07-26 22:43:50 +00:00
|
|
|
{% if warns_pagination|trim|length > 0 %}
|
|
|
|
<div class="manage__warnings__pagination">
|
|
|
|
{{ warns_pagination }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|