2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2017-03-30 16:16:40 -04:00
|
|
|
<a class="bracketed" href="<?= $url->generate('manga.add.get') ?>">Add Item</a>
|
2017-02-15 15:56:10 -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-01-04 16:58:33 -05:00
|
|
|
<th> </th>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<th>Title</th>
|
|
|
|
<th>Rating</th>
|
2017-01-04 13:16:58 -05:00
|
|
|
<th>Completed Chapters</th>
|
|
|
|
<th># of Volumes</th>
|
2017-03-30 14:50:25 -04:00
|
|
|
<th>Attributes</th>
|
2015-06-16 11:11:35 -04:00
|
|
|
<th>Type</th>
|
2017-03-29 13:29:03 -04:00
|
|
|
<th>Genres</th>
|
2015-06-16 11:11:35 -04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($items as $item): ?>
|
2015-10-06 11:38:20 -04:00
|
|
|
<tr id="manga-<?= $item['id'] ?>">
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if($auth->isAuthenticated()): ?>
|
2016-01-04 16:58:33 -05:00
|
|
|
<td>
|
2017-03-30 16:16:40 -04:00
|
|
|
<a class="bracketed" href="<?= $url->generate('edit', [
|
|
|
|
'controller' => 'manga',
|
|
|
|
'id' => $item['id'],
|
|
|
|
'status' => $name
|
|
|
|
]) ?>">Edit</a>
|
2016-01-04 16:58:33 -05:00
|
|
|
</td>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<td class="align_left">
|
2016-04-14 17:51:00 -04:00
|
|
|
<a href="<?= $url->generate('manga.details', ['id' => $item['manga']['slug']]) ?>">
|
2017-01-05 22:24:45 -05:00
|
|
|
<?= array_shift($item['manga']['titles']) ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</a>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php foreach($item['manga']['titles'] as $title): ?>
|
|
|
|
<br /><?= $title ?>
|
|
|
|
<?php endforeach ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</td>
|
2015-10-01 16:01:23 -04:00
|
|
|
<td><?= $item['user_rating'] ?> / 10</td>
|
|
|
|
<td><?= $item['chapters']['read'] ?> / <?= $item['chapters']['total'] ?></td>
|
2017-01-04 13:16:58 -05:00
|
|
|
<td><?= $item['volumes']['total'] ?></td>
|
2017-03-30 14:50:25 -04:00
|
|
|
<td>
|
|
|
|
<ul>
|
|
|
|
<?php if ($item['reread'] > 0): ?>
|
|
|
|
<li>Reread <?= $item['reread'] ?> time(s)</li>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php foreach(['rereading'] as $attr): ?>
|
|
|
|
<?php if($item[$attr]): ?>
|
|
|
|
<li><?= ucfirst($attr); ?></li>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
</td>
|
2015-10-01 16:01:23 -04:00
|
|
|
<td><?= $item['manga']['type'] ?></td>
|
2017-03-29 13:29:03 -04:00
|
|
|
<td class="align_left">
|
|
|
|
<?= implode(', ', $item['manga']['genres']) ?>
|
|
|
|
</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 15:56:10 -05:00
|
|
|
<script defer="defer" src="<?= $urlGenerator->assetUrl('js.php/g/table') ?>"></script>
|