2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
2018-08-10 20:09:28 -04:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
|
|
|
<a class="bracketed" href="<?= $url->generate($collection_type . '.collection.add.get') ?>">Add Item</a>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php if (empty($sections)): ?>
|
|
|
|
<h3>There's nothing here!</h3>
|
|
|
|
<?php else: ?>
|
2019-07-10 13:32:05 -04:00
|
|
|
<br />
|
|
|
|
<label>Filter: <input type='text' class='media-filter' /></label>
|
|
|
|
<br />
|
2018-08-10 20:09:28 -04:00
|
|
|
<?php $i = 0; ?>
|
|
|
|
<div class="tabs">
|
|
|
|
<?php foreach ($sections as $name => $items): ?>
|
|
|
|
<input <?= $i === 0 ? 'checked="checked"' : '' ?> type="radio" id="collection-tab-<?= $i ?>"
|
|
|
|
name="collection-tabs"/>
|
2018-09-20 10:41:28 -04:00
|
|
|
<label for="collection-tab-<?= $i ?>"><h2><?= $name ?></h2></label>
|
2018-11-01 22:01:09 -04:00
|
|
|
<div class="content full-height">
|
2019-07-10 13:32:05 -04:00
|
|
|
<table class="full-width media-wrap">
|
2018-08-10 20:09:28 -04:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
|
|
|
<td>Actions</td>
|
|
|
|
<?php endif ?>
|
|
|
|
<th>Title</th>
|
|
|
|
<th>Episode Count</th>
|
|
|
|
<th>Episode Length</th>
|
|
|
|
<th>Show Type</th>
|
|
|
|
<th>Age Rating</th>
|
2018-08-21 17:09:42 -04:00
|
|
|
<th>Genres</th>
|
2018-08-10 20:09:28 -04:00
|
|
|
<th>Notes</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach ($items as $item): ?>
|
|
|
|
<?php include __DIR__ . '/list-item.php' ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<?php $i++ ?>
|
|
|
|
<?php endforeach ?>
|
2019-07-10 13:32:05 -04:00
|
|
|
<!-- All -->
|
|
|
|
<input type='radio' id='collection-tab-<?= $i ?>' name='collection-tabs' />
|
|
|
|
<label for='collection-tab-<?= $i ?>'><h2>All</h2></label>
|
|
|
|
<div class="content full-height">
|
|
|
|
<?php foreach ($sections as $name => $items): ?>
|
|
|
|
<h3><?= $name ?></h3>
|
|
|
|
<table class="full-width media-wrap">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
|
|
|
<td>Actions</td>
|
|
|
|
<?php endif ?>
|
|
|
|
<th>Title</th>
|
|
|
|
<th>Episode Count</th>
|
|
|
|
<th>Episode Length</th>
|
|
|
|
<th>Show Type</th>
|
|
|
|
<th>Age Rating</th>
|
|
|
|
<th>Genres</th>
|
|
|
|
<th>Notes</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach ($items as $item): ?>
|
|
|
|
<?php include __DIR__ . '/list-item.php' ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
2018-08-10 20:09:28 -04:00
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</main>
|
2018-08-20 12:58:56 -04:00
|
|
|
<script defer="defer" src="<?= $urlGenerator->assetUrl('js/tables.min.js') ?>"></script>
|