main • app/views/issues/list.php
<?php require __DIR__ . '/../layout/header.php'; ?>
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="m-0"><?= e($repo['owner_username']) ?>/<?= e($repo['name']) ?> • Issues</h4>
<div class="d-flex gap-2">
<?php if ($canWrite): ?>
<a class="btn btn-dark btn-sm" href="/r/<?= (int)$repo['id'] ?>/issues/new">New Issue</a>
<?php endif; ?>
<a class="btn btn-outline-dark btn-sm" href="/r/<?= (int)$repo['id'] ?>">Back</a>
</div>
</div>
<div class="card p-2">
<div class="list-group list-group-flush">
<?php if (!$issues): ?>
<div class="p-3 text-muted">No issues yet.</div>
<?php endif; ?>
<?php foreach ($issues as $i): ?>
<a class="list-group-item list-group-item-action" href="/r/<?= (int)$repo['id'] ?>/issues/<?= (int)$i['number'] ?>">
<div class="d-flex justify-content-between">
<div class="fw-bold">#<?= (int)$i['number'] ?> <?= e($i['title']) ?></div>
<span class="badge bg-secondary"><?= e($i['state']) ?></span>
</div>
<div class="small text-muted">by <?= e($i['author_name']) ?> • <?= e($i['updated_at']) ?></div>
</a>
<?php endforeach; ?>
</div>
</div>
<?php require __DIR__ . '/../layout/footer.php'; ?>