71 lines
3.3 KiB
PHP
71 lines
3.3 KiB
PHP
|
|
<?php
|
|||
|
|
/** @var array $users */
|
|||
|
|
?>
|
|||
|
|
<div class="page-head page-head--compact">
|
|||
|
|
<div>
|
|||
|
|
<p class="eyebrow">Verwaltung</p>
|
|||
|
|
<h1>Benutzer</h1>
|
|||
|
|
<p class="page-head__lede">Zugänge werden ausschließlich hier angelegt – eine Selbstregistrierung gibt es nicht.</p>
|
|||
|
|
</div>
|
|||
|
|
<div class="page-head__actions">
|
|||
|
|
<a class="btn primary" href="<?= e(url('/admin/users/new')) ?>"><svg class="ico" aria-hidden="true"><use href="#i-plus"/></svg> Benutzer anlegen</a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<?php require __DIR__ . '/_admin_nav.php'; ?>
|
|||
|
|
|
|||
|
|
<section class="panel">
|
|||
|
|
<div class="panel__head">
|
|||
|
|
<div>
|
|||
|
|
<h2><?= count($users) ?> Benutzerkonto<?= count($users) === 1 ? '' : 'en' ?></h2>
|
|||
|
|
<p>Angemeldet wird mit Vorname, Nachname und Passwort.</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="table-wrap">
|
|||
|
|
<table class="data-table">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th>Name</th>
|
|||
|
|
<th>Rolle</th>
|
|||
|
|
<th>Mitarbeiterkonto</th>
|
|||
|
|
<th>Status</th>
|
|||
|
|
<th>Letzte Anmeldung</th>
|
|||
|
|
<th class="ta-right">Aktionen</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody>
|
|||
|
|
<?php foreach ($users as $row): ?>
|
|||
|
|
<tr>
|
|||
|
|
<td>
|
|||
|
|
<span class="table-person">
|
|||
|
|
<span class="avatar avatar--small"><?= e(initials($row['first_name'] . ' ' . $row['last_name'])) ?></span>
|
|||
|
|
<span><strong><?= e($row['first_name'] . ' ' . $row['last_name']) ?></strong>
|
|||
|
|
<small><?= e($row['email'] ?: 'keine E-Mail hinterlegt') ?></small></span>
|
|||
|
|
</span>
|
|||
|
|
</td>
|
|||
|
|
<td><span class="pill <?= $row['role'] === 'admin' ? 'pill--blue' : 'pill--grey' ?>"><?= $row['role'] === 'admin' ? 'Administrator' : 'Mitarbeiter' ?></span></td>
|
|||
|
|
<td><?= e($row['employee_name'] ?: '–') ?></td>
|
|||
|
|
<td><span class="pill <?= $row['status'] === 'active' ? 'pill--green' : 'pill--red' ?>"><?= $row['status'] === 'active' ? 'aktiv' : 'deaktiviert' ?></span></td>
|
|||
|
|
<td><?= e(fmt_datetime($row['last_login_at'])) ?></td>
|
|||
|
|
<td class="ta-right">
|
|||
|
|
<a class="btn small" href="<?= e(url('/admin/users/' . (int) $row['id'])) ?>"><svg class="ico" aria-hidden="true"><use href="#i-edit"/></svg> Bearbeiten</a>
|
|||
|
|
</td>
|
|||
|
|
</tr>
|
|||
|
|
<?php endforeach; ?>
|
|||
|
|
</tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
</section>
|
|||
|
|
|
|||
|
|
<div class="info-grid">
|
|||
|
|
<section class="card card--note">
|
|||
|
|
<h2>So funktioniert die Anmeldung</h2>
|
|||
|
|
<p>Benutzer melden sich mit <strong>Vorname</strong>, <strong>Nachname</strong> und <strong>Passwort</strong> an. Namen sind eindeutig; ein Benutzer kann nur vom Administrator angelegt, geändert oder deaktiviert werden.</p>
|
|||
|
|
</section>
|
|||
|
|
<section class="card card--note">
|
|||
|
|
<h2>Erinnerungen zuordnen</h2>
|
|||
|
|
<p>Verknüpfen Sie einen Benutzer mit einem Mitarbeiterkonto, damit er nur die für ihn relevanten Erinnerungen und Aufgaben sieht. Administratoren sehen alle Erinnerungen.</p>
|
|||
|
|
</section>
|
|||
|
|
</div>
|