<h2><?= htmlspecialchars($note['jmeno'] . ' ' . $note['prijmeni']) ?></h2>
<p class="text-muted mb-3"><?= htmlspecialchars($note['tym_nazev']) ?></p>

<div class="card">
    <div class="card-body">
        <p><?= nl2br(htmlspecialchars($note['obsah'])) ?></p>
        <small class="text-muted">
            <?= date('d.m.Y H:i', strtotime($note['datum'])) ?>
        </small>
    </div>
</div>

<div class="mt-3 d-flex gap-2">
    <?php if ($muzeUpravit): ?>
        <a href="<?= BASE_URL ?>/nastenka/edit?id=<?= $note['id'] ?>"
           title="Upravit" class="btn btn-success"><i class="ti ti-edit fs-4"></i></a>

        <a href="<?= BASE_URL ?>/nastenka/delete?id=<?= $note['id'] ?>"
           title="Smazat" class="btn btn-danger"
           onclick="return confirm('Opravdu chcete poznámku smazat?');">
            <i class="ti ti-trash fs-4"></i>
        </a>
    <?php endif; ?>
    <a class="btn btn-outline-secondary" href="<?= BASE_URL ?>/nastenka/index"><i class="ti ti-arrow-back-up fs-4"></i></a>
</div>
