2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
2017-01-03 21:06:49 -05:00
|
|
|
<?php /*if ($auth->is_authenticated()): ?>
|
2016-02-02 11:34:03 -05:00
|
|
|
<a class="bracketed" href="<?= $urlGenerator->url('manga/add') ?>">Add Item</a>
|
2017-01-03 21:06:49 -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-01-05 22:24:45 -05:00
|
|
|
<?php if ($auth->is_authenticated()): ?>
|
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>
|
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'] ?>">
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php if($auth->is_authenticated()): ?>
|
2016-01-04 16:58:33 -05:00
|
|
|
<td>
|
|
|
|
<a class="bracketed" href="<?= $urlGenerator->url("manga/edit/{$item['id']}/{$name}") ?>">Edit</a>
|
|
|
|
</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>
|
2015-10-01 16:01:23 -04:00
|
|
|
<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>
|
2016-02-04 21:57:14 -05:00
|
|
|
<script src="<?= $urlGenerator->asset_url('js.php/g/table') ?>"></script>
|