OpenNIT

Quelltext des aktuellen Standes

Fassung 1.1.1

tickets.php

2 KB
<?php $this->layout('layouts/portal', [
    'page_title' => 'Meine Tickets',
    'ssp_active' => 'tickets',
]);
$du = ($portal_address ?? 'du') !== 'sie';
?>
<div class="ssp-pagehead">
    <div class="ssp-hello">
        <h1><?= $this->te('Meine Tickets') ?></h1>
        <p><?= $du
            ? $this->te('Alle Tickets, die du gemeldet hast โ€“ mit aktuellem Bearbeitungsstand.')
            : $this->te('Alle Tickets, die Sie gemeldet haben โ€“ mit aktuellem Bearbeitungsstand.') ?></p>
    </div>
    <div class="ssp-page-actions">
        <a href="/portal/tickets/new" class="btn btn-primary"><i class="fas fa-plus" aria-hidden="true"></i> <?= $this->te('Neues Ticket') ?></a>
    </div>
</div>

<?php if (empty($tickets)): ?>
<div class="ssp-empty">
    <i class="fas fa-ticket-alt" aria-hidden="true"></i>
    <p><?= $du ? $this->te('Du hast noch keine Tickets gemeldet.') : $this->te('Sie haben noch keine Tickets gemeldet.') ?></p>
    <a href="/portal/tickets/new" class="btn btn-primary"><i class="fas fa-plus" aria-hidden="true"></i> <?= $this->te('Erstes Ticket erstellen') ?></a>
</div>
<?php else: ?>
<div class="ssp-list">
    <?php foreach ($tickets as $t): ?>
    <a class="ssp-ticket" href="/portal/tickets/<?= (int)$t['id'] ?>">
        <span class="ssp-ticket-icon"><i class="fas fa-ticket-alt" aria-hidden="true"></i></span>
        <span class="ssp-ticket-main">
            <span class="ssp-ticket-subject"><?= $this->e($t['subject']) ?></span>
            <span class="ssp-ticket-meta">#<?= (int)$t['id'] ?> ยท aktualisiert <?= $this->te('{zeitpunkt} Uhr', ['zeitpunkt' => date('d.m.Y H:i', strtotime($t['updated_at'] ?? $t['created_at']))]) ?></span>
        </span>
        <span class="status-pill <?= $this->e($status_pills[$t['status']] ?? 'status-pill--neutral') ?>">
            <?= $this->e($status_labels[$t['status']] ?? $t['status']) ?>
        </span>
    </a>
    <?php endforeach; ?>
</div>
<?php endif; ?>