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">
|
2023-12-21 13:46:15 -05:00
|
|
|
<?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 ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?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 />
|
2023-12-21 13:46:15 -05:00
|
|
|
<?= $_->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', [
|
2023-12-21 13:46:15 -05:00
|
|
|
'_' => $_,
|
2020-08-26 17:26:42 -04:00
|
|
|
'collection_type' => $collection_type,
|
|
|
|
'item' => $item,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return implode('', array_map('mb_trim', $rendered));
|
|
|
|
}, 'media-wrap', true) ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-09-28 14:41:45 -04:00
|
|
|
</main>
|