2018-08-10 20:09:28 -04:00
|
|
|
<main class="media-list">
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2016-03-07 14:37:49 -05:00
|
|
|
<a class="bracketed" href="<?= $url->generate('anime.add.get') ?>">Add Item</a>
|
2017-01-05 13:41:32 -05:00
|
|
|
<?php endif ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?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>
|
2017-09-14 17:33:24 -04:00
|
|
|
<?php if (empty($items)): ?>
|
|
|
|
<h3>There's nothing here!</h3>
|
|
|
|
<?php else: ?>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<?php if($auth->isAuthenticated()): ?>
|
2018-11-02 10:48:20 -04:00
|
|
|
<td class="no-border"> </td>
|
2016-01-06 11:08:56 -05:00
|
|
|
<?php endif ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
<th>Title</th>
|
|
|
|
<th>Airing Status</th>
|
|
|
|
<th>Score</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Progress</th>
|
|
|
|
<th>Rated</th>
|
|
|
|
<th colspan="2">Attributes</th>
|
|
|
|
<th>Notes</th>
|
|
|
|
<th>Genres</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($items as $item): ?>
|
|
|
|
<?php if ($item['private'] && ! $auth->isAuthenticated()) continue; ?>
|
|
|
|
<tr id="a-<?= $item['id'] ?>">
|
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
|
|
|
<td>
|
|
|
|
<a class="bracketed" href="<?= $url->generate('edit', [
|
|
|
|
'controller' => 'anime',
|
|
|
|
'id' => $item['id'],
|
|
|
|
'status' => $item['watching_status']
|
|
|
|
]) ?>">Edit</a>
|
|
|
|
</td>
|
|
|
|
<?php endif ?>
|
|
|
|
<td class="justify">
|
|
|
|
<a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]) ?>">
|
2018-08-08 10:12:45 -04:00
|
|
|
<?= $item['anime']['title'] ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
</a>
|
2018-08-08 10:12:45 -04:00
|
|
|
<?php foreach ($item['anime']['titles'] as $title): ?>
|
|
|
|
<br/><?= $title ?>
|
|
|
|
<?php endforeach ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
</td>
|
|
|
|
<td><?= $item['airing']['status'] ?></td>
|
|
|
|
<td><?= $item['user_rating'] ?> / 10 </td>
|
2018-08-08 10:12:45 -04:00
|
|
|
<td><?= $item['anime']['show_type'] ?></td>
|
2017-09-14 17:33:24 -04:00
|
|
|
<td id="<?= $item['anime']['slug'] ?>">
|
|
|
|
Episodes: <br />
|
|
|
|
<span class="completed_number"><?= $item['episodes']['watched'] ?></span> / <span class="total_number"><?= $item['episodes']['total'] ?></span>
|
|
|
|
</td>
|
|
|
|
<td><?= $item['anime']['age_rating'] ?></td>
|
|
|
|
<td>
|
|
|
|
<ul>
|
|
|
|
<?php if ($item['rewatched'] > 0): ?>
|
|
|
|
<li>Rewatched <?= $item['rewatched'] ?> time(s)</li>
|
2016-01-04 10:53:03 -05:00
|
|
|
<?php endif ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
<?php foreach(['private','rewatching'] as $attr): ?>
|
|
|
|
<?php if($item[$attr]): ?>
|
|
|
|
<li><?= ucfirst($attr); ?></li>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php foreach($item['anime']['streaming_links'] as $link): ?>
|
|
|
|
<?php if ($link['meta']['link'] !== FALSE): ?>
|
|
|
|
<a href="<?= $link['link'] ?>" title="Stream '<?= $item['anime']['title'] ?>' on <?= $link['meta']['name'] ?>">
|
2018-11-05 09:56:38 -05:00
|
|
|
<?= $helper->picture("images/{$link['meta']['image']}", 'svg', [
|
|
|
|
'class' => 'streaming-logo',
|
|
|
|
'width' => 50,
|
|
|
|
'height' => 50,
|
|
|
|
'alt' => "{$link['meta']['name']} logo",
|
|
|
|
]); ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
</a>
|
|
|
|
<?php else: ?>
|
2018-11-05 09:56:38 -05:00
|
|
|
<?= $helper->picture("images/{$link['meta']['image']}", 'svg', [
|
|
|
|
'class' => 'streaming-logo',
|
|
|
|
'width' => 50,
|
|
|
|
'height' => 50,
|
|
|
|
'alt' => "{$link['meta']['name']} logo",
|
|
|
|
]); ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<p><?= $escape->html($item['notes']) ?></p>
|
|
|
|
</td>
|
2018-11-02 10:48:20 -04:00
|
|
|
<td class="align-left">
|
2018-08-08 10:12:45 -04:00
|
|
|
<?php sort($item['anime']->genres) ?>
|
|
|
|
<?= implode(', ', $item['anime']->genres) ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php endforeach ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</main>
|
2018-08-20 12:58:56 -04:00
|
|
|
<script defer="defer" src="<?= $urlGenerator->assetUrl('js/tables.min.js') ?>"></script>
|