<?php
$title =
'Homepage Multi-Version Manager';
?>

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

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

<div class="card-body">

<h2 class="fw-bold">

<i class="fa fa-layer-group text-primary"></i>

Homepage Multi-Version Manager

</h2>

<div class="text-muted">

Manage homepage versions, activation and cloning.

</div>

</div>

</div>

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

<div class="card-body">

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

<thead>

<tr>

<th>ID</th>

<th>Name</th>

<th>Version</th>

<th>Status</th>

<th>Active</th>

<th width="280">

Actions

</th>

</tr>

</thead>

<tbody>

<?php foreach($versions as $v): ?>

<tr>

<td>

<?= (int)$v['id'] ?>

</td>

<td>

<?= htmlspecialchars(
$v['name']
) ?>

</td>

<td>

<?= (int)(
$v['version_no']
?? 1
) ?>

</td>

<td>

<?= htmlspecialchars(
$v['status']
?? 'draft'
) ?>

</td>

<td>

<?php if(!empty($v['is_active'])): ?>

<span class="badge bg-success">

ACTIVE

</span>

<?php endif; ?>

</td>

<td>

<a
class="btn btn-success btn-sm"

href="/easychair/admin/conference-home/version/activate?id=<?= (int)$v['id'] ?>">

Activate

</a>

<a
class="btn btn-primary btn-sm"

href="/easychair/admin/conference-home/version/clone?id=<?= (int)$v['id'] ?>">

Clone

</a>

</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>
