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>
|
2016-01-04 10:53:03 -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-09 11:14:57 -04:00
|
|
|
<?php $i = 0; ?>
|
|
|
|
<div class="tabs">
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php foreach ($sections as $name => $items): ?>
|
2018-08-09 11:14:57 -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>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if($auth->isAuthenticated()): ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
<th>Actions</th>
|
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<th>Title</th>
|
|
|
|
<th>Episode Count</th>
|
|
|
|
<th>Episode Length</th>
|
|
|
|
<th>Show Type</th>
|
|
|
|
<th>Age Rating</th>
|
|
|
|
<th>Notes</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($items as $item): ?>
|
|
|
|
<tr>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if($auth->isAuthenticated()): ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
<td>
|
2017-09-14 15:32:53 -04:00
|
|
|
<a class="bracketed" href="<?= $url->generate($collection_type . '.collection.edit.get', ['id' => $item['hummingbird_id']]) ?>">Edit</a>
|
2016-01-04 10:53:03 -05:00
|
|
|
</td>
|
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<td class="align_left">
|
2017-03-30 16:16:40 -04:00
|
|
|
<a href="<?= $url->generate('anime.details', ['id' => $item['slug']]) ?>">
|
2015-06-16 11:11:35 -04:00
|
|
|
<?= $item['title'] ?>
|
|
|
|
</a>
|
2017-01-16 14:03:30 -05:00
|
|
|
<?= ( ! empty($item['alternate_title'])) ? " <br /><small> " . $item['alternate_title'] . "</small>" : "" ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</td>
|
|
|
|
<td><?= $item['episode_count'] ?></td>
|
|
|
|
<td><?= $item['episode_length'] ?></td>
|
|
|
|
<td><?= $item['show_type'] ?></td>
|
|
|
|
<td><?= $item['age_rating'] ?></td>
|
|
|
|
<td class="align_left"><?= $item['notes'] ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2018-08-09 11:14:57 -04:00
|
|
|
</div>
|
|
|
|
<?php $i++ ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php endforeach ?>
|
2018-08-09 11:14:57 -04:00
|
|
|
</div>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</main>
|
2017-02-15 15:56:10 -05:00
|
|
|
<script defer="defer" src="<?= $urlGenerator->assetUrl('js.php/g/table') ?>"></script>
|