40 lines
1.9 KiB
PHP
40 lines
1.9 KiB
PHP
<h1><?= e(t('Journal')) ?> <small><?= e(tn(count($lignes), '%d dernière action', '%d dernières actions')) ?></small></h1>
|
|
|
|
<form class="filtres" method="get" action="index.php" data-auto>
|
|
<input type="hidden" name="p" value="journal">
|
|
<label><?= e(t('Compte')) ?>
|
|
<select name="utilisateur">
|
|
<option value="0"><?= e(t('Tous')) ?></option>
|
|
<?php foreach ($comptes as $u): ?><option value="<?= (int) $u['id'] ?>"<?= $qui === (int) $u['id'] ? ' selected' : '' ?>><?= e($u['nom_affiche']) ?></option><?php endforeach; ?>
|
|
</select>
|
|
</label>
|
|
<button type="submit" data-auto-masquer><?= e(t('Filtrer')) ?></button>
|
|
</form>
|
|
|
|
<section class="carte">
|
|
<?php if (!$lignes): ?>
|
|
<p class="vide"><?= e(t('Aucune action enregistrée.')) ?></p>
|
|
<?php else: ?>
|
|
<div class="defile"><table>
|
|
<thead><tr><th><?= e(t('Date')) ?></th><th><?= e(t('Compte')) ?></th><th><?= e(t('Profil')) ?></th><th><?= e(t('Action')) ?></th><th><?= e(t('Détail')) ?></th></tr></thead>
|
|
<tbody>
|
|
<?php foreach ($lignes as $h): ?>
|
|
<tr>
|
|
<td><?= e(date_fr($h['cree_le'], true)) ?></td>
|
|
<td><?= e($h['nom_affiche']) ?></td>
|
|
<td>
|
|
<?php if ($h['nom'] !== null && $h['supprime_le'] !== null): ?>
|
|
<em><?= e(sprintf('ITC-%04d', $h['candidat_id'])) ?> · <?= e(t('à la corbeille')) ?></em>
|
|
<?php elseif ($h['nom'] !== null): ?>
|
|
<a href="<?= e(url('profil', ['id' => $h['candidat_id']])) ?>#historique"><?= e($h['prenom'] . ' ' . $h['nom']) ?></a>
|
|
<?php elseif ($h['candidat_id'] !== null): ?><em><?= e(t('supprimé')) ?></em><?php endif; ?>
|
|
</td>
|
|
<td><?= e(t(ACTIONS_JOURNAL[$h['action']] ?? $h['action'])) ?></td>
|
|
<td><?= e(detail_journal($h)) ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table></div>
|
|
<?php endif; ?>
|
|
</section>
|