main • app/views/repos/list.php
<?php require __DIR__ . '/../layout/header.php'; ?>
<div class="d-flex justify-content-between align-items-center mb-3">
<h3 class="m-0">Your Repositories</h3>
<a class="btn btn-dark" href="/repos/new">New Repo</a>
</div>
<?php if ($owned): ?>
<div class="mb-3 text-muted fw-bold">Owned</div>
<div class="list-group mb-4">
<?php foreach ($owned as $r): ?>
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
href="/r/<?= (int)$r['id'] ?>">
<div>
<div class="fw-bold"><?= e($r['owner_username']) ?>/<?= e($r['name']) ?></div>
<div class="small text-muted"><?= e($r['description'] ?? '') ?></div>
</div>
<span class="badge bg-secondary"><?= e($r['visibility']) ?></span>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($collab): ?>
<div class="mb-3 text-muted fw-bold">Collaborating</div>
<div class="list-group">
<?php foreach ($collab as $r): ?>
<a class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
href="/r/<?= (int)$r['id'] ?>">
<div>
<div class="fw-bold"><?= e($r['owner_username']) ?>/<?= e($r['name']) ?></div>
<div class="small text-muted"><?= e($r['description'] ?? '') ?></div>
</div>
<span class="badge bg-secondary"><?= e($r['collab_role']) ?></span>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!$owned && !$collab): ?>
<div class="text-muted">No repositories yet.</div>
<?php endif; ?>
<?php require __DIR__ . '/../layout/footer.php'; ?>