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">
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2017-09-14 15:32:53 -04:00
|
|
|
<a class="bracketed" href="<?= $url->generate($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 />
|
2020-08-26 17:26:42 -04:00
|
|
|
<?= $component->tabs('collection-tab', $sections, static function ($items) use ($auth, $collection_type, $helper, $url, $component) {
|
|
|
|
$rendered = [];
|
|
|
|
foreach ($items as $item)
|
|
|
|
{
|
|
|
|
$rendered[] = renderTemplate(__DIR__ . '/cover-item.php', [
|
|
|
|
'auth' => $auth,
|
|
|
|
'collection_type' => $collection_type,
|
|
|
|
'helper' => $helper,
|
|
|
|
'item' => $item,
|
|
|
|
'url' => $url,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
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>
|