2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
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: ?>
|
2018-08-08 17:04:35 -04:00
|
|
|
<div class="tabs">
|
|
|
|
<?php $i = 0; ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php foreach ($sections as $name => $items): ?>
|
2018-08-08 17:04:35 -04:00
|
|
|
<input <?= $i === 0 ? 'checked="checked"' : '' ?> type="radio" id="collection-tab-<?= $i ?>" name="collection-tabs" />
|
|
|
|
<label for="collection-tab-<?= $i ?>"><?= $name ?></label>
|
|
|
|
<div class="content">
|
2015-06-16 11:11:35 -04:00
|
|
|
<h2><?= $name ?></h2>
|
|
|
|
<section class="media-wrap">
|
2018-08-08 17:04:35 -04:00
|
|
|
<?php foreach ($items as $item): ?>
|
|
|
|
<article class="media" id="a-<?= $item['hummingbird_id'] ?>">
|
|
|
|
<img src="<?= $urlGenerator->assetUrl("images/anime/{$item['hummingbird_id']}.jpg") ?>"
|
|
|
|
alt="<?= $item['title'] ?> cover image"/>
|
|
|
|
<div class="name">
|
|
|
|
<a href="<?= $url->generate('anime.details', ['id' => $item['slug']]) ?>">
|
|
|
|
<?= $item['title'] ?>
|
|
|
|
<?= ($item['alternate_title'] != "") ? "<small><br />{$item['alternate_title']}</small>" : ""; ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="table">
|
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
|
|
|
<div class="row">
|
|
|
|
<span class="edit">
|
|
|
|
<a class="bracketed"
|
|
|
|
href="<?= $url->generate($collection_type . '.collection.edit.get', [
|
2017-03-30 16:16:40 -04:00
|
|
|
'id' => $item['hummingbird_id']
|
|
|
|
]) ?>">Edit</a>
|
2018-08-08 17:04:35 -04:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="completion">Episodes: <?= $item['episode_count'] ?></div>
|
|
|
|
<div class="media_type"><?= $item['show_type'] ?></div>
|
|
|
|
<div class="age_rating"><?= $item['age_rating'] ?></div>
|
2016-01-04 10:53:03 -05:00
|
|
|
</div>
|
2015-06-17 08:50:01 -04:00
|
|
|
</div>
|
2018-08-08 17:04:35 -04:00
|
|
|
</article>
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php endforeach ?>
|
2015-06-11 12:54:54 -04:00
|
|
|
</section>
|
2018-08-08 17:04:35 -04:00
|
|
|
</div>
|
|
|
|
<?php $i++; ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php endforeach ?>
|
2018-08-08 17:04:35 -04:00
|
|
|
</div>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-09-28 14:41:45 -04:00
|
|
|
</main>
|