2018-12-26 23:21:44 +00:00
|
|
|
{% extends 'manage/users/master.twig' %}
|
|
|
|
{% from 'macros.twig' import pagination, container_title %}
|
|
|
|
{% from 'user/macros.twig' import user_profile_warning %}
|
2018-12-27 21:01:57 +00:00
|
|
|
{% from '_layout/input.twig' import input_text, input_csrf, input_select, input_hidden %}
|
2018-12-26 23:21:44 +00:00
|
|
|
|
|
|
|
{% block manage_content %}
|
2018-12-27 21:01:57 +00:00
|
|
|
<form class="container container--lazy" action="" method="post">
|
|
|
|
{{ container_title('<i class="fas fa-users fa-fw"></i> Filters') }}
|
|
|
|
{{ input_text('lookup', null, warnings.username, 'text', 'Enter a username') }}
|
|
|
|
<button class="input__button">Filter</button>
|
|
|
|
</form>
|
|
|
|
|
2018-12-28 05:03:42 +00:00
|
|
|
{% if warnings.notices|length > 0 %}
|
|
|
|
<div class="warning">
|
|
|
|
<div class="warning__content">
|
|
|
|
{% for notice in warnings.notices %}
|
|
|
|
{{ notice }}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2018-12-27 21:01:57 +00:00
|
|
|
{% if warnings.user_id > 0 and warnings.username|length > 0 %}{# shittiest validation in the world, but it should work #}
|
|
|
|
<form class="container container--lazy" method="post" action="">
|
|
|
|
{{ container_title('<i class="fas fa-user-shield fa-fw"></i> Warn ' ~ warnings.username) }}
|
|
|
|
{{ input_csrf('users_edit') }}
|
|
|
|
{{ input_hidden('warning[user]', warnings.user_id) }}
|
|
|
|
|
|
|
|
{{ input_select('warning[type]', warnings.types) }}
|
|
|
|
{{ input_text('warning[note]', '', '', 'text', 'Public note') }}
|
2018-12-28 05:03:42 +00:00
|
|
|
{{ input_select('warning[duration]', warnings.durations) }}
|
|
|
|
{{ input_text('warning[duration_custom]', '', '', 'text', 'Custom Duration') }}
|
2018-12-27 21:01:57 +00:00
|
|
|
<button class="input__button">Add</button><br>
|
|
|
|
|
|
|
|
<textarea class="input__textarea" name="warning[private]" placeholder="Private note"></textarea>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="container container--lazy">
|
2018-12-27 02:59:57 +00:00
|
|
|
{{ container_title('<i class="fas fa-exclamation-circle fa-fw"></i> Warnings') }}
|
2018-12-26 23:21:44 +00:00
|
|
|
{% set warnpag = pagination(warnings.count, warnings.take, warnings.offset, '/manage/users.php?v=warnings') %}
|
|
|
|
|
|
|
|
{{ warnpag }}
|
|
|
|
|
|
|
|
<div class="profile__warnings__container">
|
2018-12-27 21:01:57 +00:00
|
|
|
<div class="profile__warning profile__warning--extendo">
|
2018-12-26 23:21:44 +00:00
|
|
|
<div class="profile__warning__background"></div>
|
|
|
|
|
2018-12-27 21:01:57 +00:00
|
|
|
<div class="profile__warning__tools">
|
|
|
|
<div class="profile__warning__user">
|
|
|
|
<div class="profile__warning__user__username">
|
|
|
|
User
|
|
|
|
</div>
|
|
|
|
<div class="profile__warning__user__ip">
|
|
|
|
User IP
|
|
|
|
</div>
|
2018-12-26 23:21:44 +00:00
|
|
|
</div>
|
|
|
|
|
2018-12-27 21:01:57 +00:00
|
|
|
<div class="profile__warning__user">
|
|
|
|
<div class="profile__warning__user__username">
|
|
|
|
Issuer
|
|
|
|
</div>
|
|
|
|
<div class="profile__warning__user__ip">
|
|
|
|
Issuer IP
|
|
|
|
</div>
|
2018-12-26 23:21:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile__warning__content">
|
|
|
|
<div class="profile__warning__type">
|
|
|
|
Type
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile__warning__created">
|
|
|
|
Created
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile__warning__duration">
|
|
|
|
Expires
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="profile__warning__note">
|
|
|
|
Note
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-12-27 21:01:57 +00:00
|
|
|
|
|
|
|
{% for warning in warnings.list %}
|
2018-12-28 05:03:42 +00:00
|
|
|
{{ user_profile_warning(warning, true, true, csrf_token('warning-delete[%d]'|format(warning.warning_id))) }}
|
2018-12-27 21:01:57 +00:00
|
|
|
{% endfor %}
|
2018-12-26 23:21:44 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ warnpag }}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|