<?php
$title = 'Homepage Approval Queue';
?>

<div class="container-fluid py-4">

<div class="card border-0 shadow-lg rounded-4">

<div class="card-body">

<h2 class="fw-bold">

<i class="fa fa-list-check text-primary"></i>

Homepage Approval Queue

</h2>

<hr>

<?php if(empty($queue)): ?>

<div class="alert alert-success">

No pending workflow actions.

</div>

<?php else: ?>

<div class="table-responsive">

<table class="table table-hover align-middle">

<thead>

<tr>

<th>Conference</th>

<th>Status</th>

<th>Actions</th>

</tr>

</thead>

<tbody>

<?php foreach($queue as $row): ?>

<tr>

<td>
<?= htmlspecialchars($row['conference']) ?>
</td>

<td>
<?= htmlspecialchars($row['status']) ?>
</td>

<td>

<div class="d-flex flex-wrap gap-2">

<?php foreach($row['actions'] as $a): ?>

<form
method="post"
action="/easychair/admin/conference-home/workflow/update">

<input
type="hidden"
name="status"
value="<?= htmlspecialchars($a['status']) ?>">

<button
class="btn btn-sm <?= htmlspecialchars($a['class']) ?>">

<?= htmlspecialchars($a['label']) ?>

</button>

</form>

<?php endforeach; ?>

</div>

</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

<?php endif; ?>

</div>

</div>

</div>
