misuzu/templates/manage/users/warnings.twig
flashwave 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

84 lines
4.7 KiB
Twig

{% extends 'manage/users/master.twig' %}
{% from 'macros.twig' import pagination, container_title, avatar %}
{% set warns_pagination = pagination(manage_warns_pagination, url('manage-users-warnings', {'user': manage_warns_filter_user.id|default(0)})) %}
{% set warns_filtering = manage_warns_filter_user is not null %}
{% block manage_content %}
<div class="container manage__warnings">
{{ container_title('<i class="fas fa-exclamation-circle fa-fw"></i> Warnings') }}
<div class="manage__description">
List of user warnings.
{% if not warns_filtering %}Filter by a user to issue a new warning.{% endif %}
</div>
{% if warns_pagination|trim|length > 0 %}
<div class="manage__warnings__pagination">
{{ warns_pagination }}
</div>
{% endif %}
{% 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 %}
<div class="manage__warnings__item__attribute manage__warnings__item__author" style="--user-colour: {{ warn.mod_colour }}">
<div class="manage__warnings__item__author__prefix">Issued by</div>
<div class="manage__warnings__item__author__avatar">
<a href="{{ url('user-profile', {'user': warn.mod.id}) }}">{{ avatar(warn.mod.id, 20, warn.mod.name) }}</a>
</div>
<div class="manage__warnings__item__author__name">
<a href="{{ url('user-profile', {'user': warn.mod.id}) }}">{{ warn.mod.name }}</a>
</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>
</div>
<div class="manage__warnings__item__attribute manage__warnings__item__user" style="--user-colour: {{ warn.user_colour }}">
<div class="manage__warnings__item__user__prefix">Subject</div>
<div class="manage__warnings__item__user__avatar">
<a href="{{ url('manage-user', {'user': warn.user.id}) }}">{{ avatar(warn.user.id, 20, warn.user.name) }}</a>
</div>
<div class="manage__warnings__item__user__name">
<a href="{{ url('manage-user', {'user': warn.user.id}) }}">{{ warn.user.name }}</a>
</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 %}
</div>
</div>
<div class="manage__warnings__item__actions">
<a href="{{ url('manage-users-warning-delete', {'warning': warn.info.id}) }}" 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>
</div>
</div>
<div class="manage__warnings__item__reason">
{% for line in warn.info.bodyLines %}
<p>{{ line }}</p>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
{% if warns_pagination|trim|length > 0 %}
<div class="manage__warnings__pagination">
{{ warns_pagination }}
</div>
{% endif %}
</div>
{% endblock %}