2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
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>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if($auth->isAuthenticated()): ?>
|
2016-02-01 09:49:18 -05:00
|
|
|
<td class="no_border"> </td>
|
2017-01-05 13:41:32 -05:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<th>Title</th>
|
|
|
|
<th>Airing Status</th>
|
|
|
|
<th>Score</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th>Progress</th>
|
|
|
|
<th>Rated</th>
|
2017-01-13 16:49:46 -05:00
|
|
|
<th colspan="2">Attributes</th>
|
2015-10-01 16:01:23 -04:00
|
|
|
<th>Notes</th>
|
2015-07-02 14:04:04 -04:00
|
|
|
<th>Genres</th>
|
2015-06-16 11:11:35 -04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($items as $item): ?>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($item['private'] && ! $auth->isAuthenticated()) continue; ?>
|
2015-10-06 11:38:20 -04:00
|
|
|
<tr id="a-<?= $item['id'] ?>">
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
<td>
|
|
|
|
<a class="bracketed" href="<?= $urlGenerator->url("/anime/edit/{$item['id']}/{$item['watching_status']}") ?>">Edit</a>
|
|
|
|
</td>
|
2017-01-05 13:41:32 -05:00
|
|
|
<?php endif ?>
|
2016-02-01 09:49:18 -05:00
|
|
|
<td class="justify">
|
2016-04-08 11:56:17 -04:00
|
|
|
<a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]) ?>">
|
2017-01-05 22:24:45 -05:00
|
|
|
<?= array_shift($item['anime']['titles']) ?>
|
2015-06-11 16:44:52 -04:00
|
|
|
</a>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php foreach($item['anime']['titles'] as $title): ?>
|
|
|
|
<br /><?= $title ?>
|
|
|
|
<?php endforeach ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</td>
|
2017-01-05 22:24:45 -05:00
|
|
|
<td><?= $item['airing']['status'] ?></td>
|
2015-10-01 16:01:23 -04:00
|
|
|
<td><?= $item['user_rating'] ?> / 10 </td>
|
|
|
|
<td><?= $item['anime']['type'] ?></td>
|
2017-01-05 22:24:45 -05:00
|
|
|
<td id="<?= $item['anime']['slug'] ?>">
|
2016-01-04 10:53:03 -05:00
|
|
|
Episodes: <br />
|
|
|
|
<span class="completed_number"><?= $item['episodes']['watched'] ?></span> / <span class="total_number"><?= $item['episodes']['total'] ?></span>
|
|
|
|
</td>
|
2015-06-16 11:11:35 -04:00
|
|
|
<td><?= $item['anime']['age_rating'] ?></td>
|
2016-01-04 10:53:03 -05:00
|
|
|
<td>
|
2017-01-05 22:24:45 -05:00
|
|
|
<ul>
|
2016-01-06 11:08:56 -05:00
|
|
|
<?php if ($item['rewatched'] > 0): ?>
|
2017-01-05 22:24:45 -05:00
|
|
|
<li>Rewatched <?= $item['rewatched'] ?> time(s)</li>
|
2016-01-06 11:08:56 -05:00
|
|
|
<?php endif ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
<?php foreach(['private','rewatching'] as $attr): ?>
|
|
|
|
<?php if($item[$attr]): ?>
|
2017-01-05 22:24:45 -05:00
|
|
|
<li><?= ucfirst($attr); ?></li>
|
2016-01-04 10:53:03 -05:00
|
|
|
<?php endif ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endforeach ?>
|
2017-01-05 22:24:45 -05:00
|
|
|
</ul>
|
2016-01-04 10:53:03 -05:00
|
|
|
</td>
|
2017-01-13 16:49:46 -05:00
|
|
|
<td>
|
|
|
|
<?php foreach($item['anime']['streaming_links'] as $link): ?>
|
|
|
|
<?php if ($link['meta']['link'] !== FALSE): ?>
|
|
|
|
<a href="<?= $link['link'] ?>">
|
|
|
|
<?= $link['meta']['logo'] ?>
|
|
|
|
</a>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= $link['meta']['logo'] ?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</td>
|
2016-01-04 10:53:03 -05:00
|
|
|
<td>
|
|
|
|
<p><?= $escape->html($item['notes']) ?></p>
|
|
|
|
</td>
|
|
|
|
<td class="align_left">
|
|
|
|
<?php sort($item['anime']['genres']) ?>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?= implode(', ', $item['anime']['genres']) ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
</td>
|
2015-06-16 11:11:35 -04:00
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<?php endforeach ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</main>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php $group = ($auth->isAuthenticated()) ? 'table_edit' : 'table' ?>
|
2017-02-15 15:56:10 -05:00
|
|
|
<script defer="defer" src="<?= $urlGenerator->assetUrl("js.php/g/{$group}") ?>"></script>
|