HummingBirdAnimeClient/app/views/collection/cover.php

27 lines
822 B
PHP
Raw Normal View History

2020-08-26 17:26:42 -04:00
<?php use function Aviat\AnimeClient\renderTemplate; ?>
2018-08-10 20:09:28 -04:00
<main class="media-list">
<?php if ($_->isAuthenticated()): ?>
<a class="bracketed" href="<?= $_->urlFromRoute($collection_type . '.collection.add.get') ?>">Add Item</a>
2015-12-08 14:52:59 -05:00
<?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 />
<?= $_->component->tabs('collection-tab', $sections, static function ($items) use ($_, $collection_type) {
2020-08-26 17:26:42 -04:00
$rendered = [];
foreach ($items as $item)
{
$rendered[] = renderTemplate(__DIR__ . '/cover-item.php', [
'_' => $_,
2020-08-26 17:26:42 -04:00
'collection_type' => $collection_type,
'item' => $item,
]);
}
return implode('', array_map('mb_trim', $rendered));
}, 'media-wrap', true) ?>
<?php endif ?>
2015-09-28 14:41:45 -04:00
</main>