HummingBirdAnimeClient/app/views/collection/list.php

46 lines
1.5 KiB
PHP
Raw Normal View History

2020-08-26 15:22:14 -04:00
<?php use function Aviat\AnimeClient\colNotEmpty; ?>
<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: ?>
<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): ?>
2020-08-26 15:22:14 -04:00
<?php $hasNotes = colNotEmpty($items, 'notes') ?>
2020-04-30 15:30:52 -04:00
<input type="radio" id="collection-tab-<?= $i ?>" name="collection-tabs" />
<label for="collection-tab-<?= $i ?>"><h2><?= $name ?></h2></label>
2018-11-01 22:01:09 -04:00
<div class="content full-height">
<table class="full-width media-wrap">
2018-08-10 20:09:28 -04:00
<thead>
2020-04-30 15:30:52 -04:00
<tr>
<?php if ($auth->isAuthenticated()): ?><td>&nbsp;</td><?php endif ?>
<th>Title</th>
<th>Episode Count</th>
<th>Episode Length</th>
<th>Show Type</th>
<th>Age Rating</th>
<?php if ($hasNotes): ?><th>Notes</th><?php endif ?>
<th>Genres</th>
</tr>
2018-08-10 20:09:28 -04:00
</thead>
<tbody>
<?php foreach ($items as $item): ?>
2020-04-30 15:30:52 -04:00
<?php include 'list-item.php' ?>
2018-08-10 20:09:28 -04:00
<?php endforeach ?>
</tbody>
</table>
</div>
<?php $i++ ?>
<?php endforeach ?>
<!-- All -->
2020-04-30 15:30:52 -04:00
<?php include 'list-all.php' ?>
2018-08-10 20:09:28 -04:00
</div>
<?php endif ?>
</main>
<script defer="defer" src="<?= $urlGenerator->assetUrl('js/tables.min.js') ?>"></script>