HummingBirdAnimeClient/app/views/manga/list.php

48 lines
1.5 KiB
PHP
Raw Normal View History

<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*/ ?>
<?php if (empty($sections)): ?>
<h3>There's nothing here!</h3>
<?php else: ?>
<?php foreach ($sections as $name => $items): ?>
<h2><?= $name ?></h2>
<table>
<thead>
<tr>
2017-01-03 21:06:49 -05:00
<?php /*if ($auth->is_authenticated()): ?>
<th>&nbsp;</th>
2017-01-03 21:06:49 -05:00
<?php endif*/ ?>
<th>Title</th>
<th>Rating</th>
2017-01-04 13:16:58 -05:00
<th>Completed Chapters</th>
<th># of Volumes</th>
<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-03 21:06:49 -05:00
<?php /*if($auth->is_authenticated()): ?>
<td>
<a class="bracketed" href="<?= $urlGenerator->url("manga/edit/{$item['id']}/{$name}") ?>">Edit</a>
</td>
2017-01-03 21:06:49 -05:00
<?php endif*/ ?>
<td class="align_left">
2016-04-14 17:51:00 -04:00
<a href="<?= $url->generate('manga.details', ['id' => $item['manga']['slug']]) ?>">
2015-10-01 16:01:23 -04:00
<?= $item['manga']['title'] ?>
</a>
2015-10-01 16:01:23 -04:00
<?= ( ! is_null($item['manga']['alternate_title'])) ? " &middot; " . $item['manga']['alternate_title'] : "" ?>
</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>
</tr>
<?php endforeach ?>
</tbody>
</table>
<?php endforeach ?>
<?php endif ?>
</main>
<script src="<?= $urlGenerator->asset_url('js.php/g/table') ?>"></script>