2018-08-10 20:09:28 -04:00
|
|
|
<main class="media-list">
|
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: ?>
|
2019-07-10 13:32:05 -04:00
|
|
|
<br />
|
|
|
|
<label>Filter: <input type='text' class='media-filter' /></label>
|
|
|
|
<br />
|
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: ?>
|
2019-07-10 13:32:05 -04:00
|
|
|
<table class='media-wrap'>
|
2017-09-14 17:33:24 -04:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2018-08-10 20:09:28 -04:00
|
|
|
<td> </td>
|
2017-03-30 14:50:25 -04:00
|
|
|
<?php endif ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
<th>Title</th>
|
2022-01-02 16:29:08 -05:00
|
|
|
<th class='numeric'>Score</th>
|
|
|
|
<th class='numeric'>Completed Chapters</th>
|
2017-09-14 17:33:24 -04:00
|
|
|
<th>Attributes</th>
|
|
|
|
<th>Type</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($items as $item): ?>
|
|
|
|
<tr id="manga-<?= $item['id'] ?>">
|
|
|
|
<?php if($auth->isAuthenticated()): ?>
|
|
|
|
<td>
|
|
|
|
<a class="bracketed" href="<?= $url->generate('edit', [
|
|
|
|
'controller' => 'manga',
|
|
|
|
'id' => $item['id'],
|
|
|
|
'status' => $name
|
|
|
|
]) ?>">Edit</a>
|
|
|
|
</td>
|
|
|
|
<?php endif ?>
|
2018-11-02 10:48:20 -04:00
|
|
|
<td class="align-left">
|
2017-09-14 17:33:24 -04:00
|
|
|
<a href="<?= $url->generate('manga.details', ['id' => $item['manga']['slug']]) ?>">
|
2018-08-08 13:05:38 -04:00
|
|
|
<?= $item['manga']['title'] ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
</a>
|
|
|
|
<?php foreach($item['manga']['titles'] as $title): ?>
|
|
|
|
<br /><?= $title ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</td>
|
|
|
|
<td><?= $item['user_rating'] ?> / 10</td>
|
|
|
|
<td><?= $item['chapters']['read'] ?> / <?= $item['chapters']['total'] ?></td>
|
|
|
|
<td>
|
|
|
|
<ul>
|
2020-05-05 19:12:17 -04:00
|
|
|
<?php if ($item['reread'] == 1): ?>
|
|
|
|
<li>Reread once</li>
|
|
|
|
<?php elseif ($item['reread'] == 2): ?>
|
|
|
|
<li>Reread twice</li>
|
|
|
|
<?php elseif ($item['reread'] == 3): ?>
|
|
|
|
<li>Reread thrice</li>
|
|
|
|
<?php elseif ($item['reread'] > 3): ?>
|
|
|
|
<li>Reread <?= $item['reread'] ?> times</li>
|
2017-03-30 14:50:25 -04:00
|
|
|
<?php endif ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
<?php foreach(['rereading'] as $attr): ?>
|
|
|
|
<?php if($item[$attr]): ?>
|
|
|
|
<li><?= ucfirst($attr); ?></li>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
<td><?= $item['manga']['type'] ?></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>
|