2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
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>
|
2016-01-04 16:58:33 -05:00
|
|
|
<?php if ($auth->is_authenticated()): ?>
|
|
|
|
<th> </th>
|
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<th>Title</th>
|
|
|
|
<th>Rating</th>
|
|
|
|
<th>Chapters</th>
|
2015-06-26 16:39:10 -04:00
|
|
|
<th>Volumes</th>
|
2015-06-16 11:11:35 -04:00
|
|
|
<th>Type</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach($items as $item): ?>
|
2015-10-06 11:38:20 -04:00
|
|
|
<tr id="manga-<?= $item['id'] ?>">
|
2016-01-04 16:58:33 -05:00
|
|
|
<?php if($auth->is_authenticated()): ?>
|
|
|
|
<td>
|
|
|
|
<a class="bracketed" href="<?= $urlGenerator->url("manga/edit/{$item['id']}/{$name}") ?>">Edit</a>
|
|
|
|
</td>
|
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<td class="align_left">
|
2015-10-06 11:38:20 -04:00
|
|
|
<a href="<?= $item['manga']['url'] ?>">
|
2015-10-01 16:01:23 -04:00
|
|
|
<?= $item['manga']['title'] ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
</a>
|
2015-10-01 16:01:23 -04:00
|
|
|
<?= ( ! is_null($item['manga']['alternate_title'])) ? " · " . $item['manga']['alternate_title'] : "" ?>
|
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>
|
|
|
|
<td><?= $item['volumes']['read'] ?> / <?= $item['volumes']['total'] ?></td>
|
|
|
|
<td><?= $item['manga']['type'] ?></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>
|
2015-09-14 16:14:02 -04:00
|
|
|
<script src="<?= $urlGenerator->asset_url('js.php?g=table') ?>"></script>
|