<?php $this->extend('admin/layout'); ?>
<?php $this->section('content'); ?>
<div class="container mt-4">
    <h2>All Authors</h2>
    <div class="card">
        <div class="card-header">Authors</div>
        <div class="card-body">
            <?php if (empty($authors)): ?>
                <div class="alert alert-info">No authors found.</div>
            <?php else: ?>
                <ul class="list-group">
                    <?php foreach ($authors as $author): ?>
                        <li class="list-group-item d-flex justify-content-between align-items-center">
                            <?= esc($author['author']) ?>
                            <a href="<?= site_url('admin/author-tickets/' . urlencode($author['author'])) ?>" class="btn btn-sm btn-primary">View Tickets</a>
                        </li>
                    <?php endforeach; ?>
                </ul>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php $this->endSection(); ?> 