2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php if (is_logged_in()): ?>
|
2015-09-14 16:14:02 -04:00
|
|
|
[<a href="<?= $urlGenerator->full_url('collection/add', 'anime') ?>">Add Item</a>]
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
|
|
|
<?php if (empty($sections)): ?>
|
|
|
|
<h3>There's nothing here!</h3>
|
|
|
|
<?php else: ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php foreach ($sections as $name => $items): ?>
|
|
|
|
<h2><?= $name ?></h2>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Title</th>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php /*<th>Alternate Title</th>*/ ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<th>Episode Count</th>
|
|
|
|
<th>Episode Length</th>
|
|
|
|
<th>Show Type</th>
|
|
|
|
<th>Age Rating</th>
|
|
|
|
<th>Notes</th>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php if (is_logged_in()): ?>
|
|
|
|
<th> </th>
|
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($items as $item): ?>
|
|
|
|
<tr>
|
|
|
|
<td class="align_left">
|
|
|
|
<a href="https://hummingbird.me/anime/<?= $item['slug'] ?>">
|
|
|
|
<?= $item['title'] ?>
|
|
|
|
</a>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?= ( ! empty($item['alternate_title'])) ? " · " . $item['alternate_title'] : "" ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</td>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php /*<td class="align_left">
|
|
|
|
<a href="https://hummingbird.me/anime/<?= $item['slug'] ?>">
|
|
|
|
<?= $item['title'] ?>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="align_left"><?= $item['alternate_title'] ?></td>*/ ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<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>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php if (is_logged_in()): ?>
|
2015-09-14 16:14:02 -04:00
|
|
|
<td>[<a href="<?= $urlGenerator->full_url("collection/edit/{$item['hummingbird_id']}", "anime") ?>">Edit</a>]</td>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<?php endforeach ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</main>
|
2015-09-14 16:14:02 -04:00
|
|
|
<script src="<?= $urlGenerator->asset_url('js.php?g=table') ?>"></script>
|