Files
Vivier/vues/erreurs.php
T

32 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="barre-titre">
<h1><?= e(t('Erreurs')) ?> <small><?= count($lignes) ?></small></h1>
<?php if ($lignes): ?>
<form method="post" action="<?= e(url('erreurs')) ?>" data-confirmer="<?= e(t('Vider le journal des erreurs ?')) ?>">
<?= champ_csrf() ?>
<button type="submit" name="action" value="vider" class="secondaire"><?= e(t('Vider le journal')) ?></button>
</form>
<?php endif; ?>
</div>
<p class="aide"><?= e(t('Les erreurs imprévues des %d derniers incidents. Une personne qui voit « Une erreur est survenue » reçoit une référence : cherchez-la ici. Aucune donnée de candidat n\'y figure.', ERREURS_MAX)) ?></p>
<?php if (!$lignes): ?>
<section class="carte"><p class="vide"><?= e(t('Aucune erreur notée.')) ?></p></section>
<?php else: ?>
<section class="carte defile">
<table>
<thead><tr><th><?= e(t('Date')) ?></th><th><?= e(t('Référence')) ?></th><th><?= e(t('Compte')) ?></th><th><?= e(t('Page')) ?></th><th><?= e(t('Cause')) ?></th><th><?= e(t('Endroit du code')) ?></th></tr></thead>
<tbody>
<?php foreach ($lignes as $l): ?>
<tr>
<td><?= e(date_fr((string) $l['date'], true)) ?></td>
<td><code><?= e((string) $l['ref']) ?></code></td>
<td><?= e($l['compte'] !== null ? ($noms[$l['compte']] ?? '#' . $l['compte']) : '–') ?></td>
<td><?= e((string) $l['page']) ?> <small><?= e((string) $l['methode']) ?></small></td>
<td><?= e((string) $l['type']) ?><br><small><?= e((string) $l['message']) ?></small></td>
<td><code><?= e((string) $l['ou']) ?></code></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</section>
<?php endif; ?>