{% include 'mcp_header.html' %}

<div class="iz-mcp">

	<form method="post" id="mcp" action="{{ U_POST_ACTION }}" class="iz-form">

		<header class="iz-pagehead" aria-labelledby="iz-warned-users-title">
			<h2 class="iz-pagehead__title" id="iz-warned-users-title">{{ L_WARNED_USERS }}</h2>
			<p class="iz-pagehead__lead">{{ L_WARNED_USERS_EXPLAIN }}</p>
		</header>

		{% if user %}

			<div class="iz-toolbar" role="region" aria-label="{{ L_PAGINATION }}">
				<div class="iz-toolbar__left"></div>
				<div class="iz-toolbar__right">
					<nav class="iz-pagination iz-pagination--compact" aria-label="{{ L_PAGINATION }}">
						<ul class="iz-pagination__list">
							<li class="iz-pagination__item"><span class="iz-pagination__meta">{{ TOTAL_USERS }}</span></li>

							{% if pagination %}
								{% include 'pagination.html' %}
							{% else %}
								<li class="iz-pagination__item">
									<span class="iz-pagination__current" aria-current="page">{{ PAGE_NUMBER }}</span>
								</li>
							{% endif %}
						</ul>
					</nav>
				</div>
			</div>

			<section class="iz-card iz-card--mcp" aria-labelledby="iz-warnings-title">
				<header class="iz-card__header">
					<h3 class="iz-card__title" id="iz-warnings-title">{{ L_WARNINGS }}</h3>
				</header>

				<div class="iz-card__body">
					<div class="iz-table" role="region" aria-label="{{ L_WARNINGS }}">
						<table class="iz-table__table">
							<thead class="iz-table__head">
								<tr class="iz-table__row">
									<th scope="col" class="iz-table__th iz-table__th--grow">{{ L_USERNAME }}</th>
									<th scope="col" class="iz-table__th">{{ L_WARNINGS }}</th>
									<th scope="col" class="iz-table__th">{{ L_LATEST_WARNING_TIME }}</th>
								</tr>
							</thead>

							<tbody class="iz-table__body">
								{% for user in user %}
									<tr class="iz-table__row">
										<td class="iz-table__td">{{ user.USERNAME_FULL }}</td>
										<td class="iz-table__td">
											{{ user.WARNINGS }}
											&nbsp;&#91;<a class="iz-link" href="{{ user.U_NOTES }}">{{ L_VIEW_NOTES }}</a>&#93;
										</td>
										<td class="iz-table__td"><time>{{ user.WARNING_TIME }}</time></td>
									</tr>
								{% endfor %}
							</tbody>
						</table>
					</div>

					<hr class="iz-hr" />

					<div class="iz-toolbar" role="region" aria-label="{{ L_PAGINATION }}">
						<div class="iz-toolbar__left"></div>
						<div class="iz-toolbar__right">
							<nav class="iz-pagination iz-pagination--compact" aria-label="{{ L_PAGINATION }}">
								<ul class="iz-pagination__list">
									<li class="iz-pagination__item"><span class="iz-pagination__meta">{{ TOTAL_USERS }}</span></li>

									{% if pagination %}
										{% include 'pagination.html' %}
									{% else %}
										<li class="iz-pagination__item">
											<span class="iz-pagination__current" aria-current="page">{{ PAGE_NUMBER }}</span>
										</li>
									{% endif %}
								</ul>
							</nav>
						</div>
					</div>

					{% include 'display_options.html' %}

				</div>
			</section>

		{% else %}
			<p class="iz-alert iz-alert--info" role="status">{{ L_NO_WARNINGS }}</p>
		{% endif %}

		{{ S_FORM_TOKEN }}

	</form>

</div>

{% include 'mcp_footer.html' %}
