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-01-05 22:24:45 -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): ?>
|
2017-09-14 17:33:24 -04:00
|
|
|
<?php if (empty($items)): ?>
|
|
|
|
<section class="status">
|
|
|
|
<h2><?= $escape->html($name) ?></h2>
|
|
|
|
<h3>There's nothing here!</h3>
|
|
|
|
</section>
|
|
|
|
<?php else: ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<section class="status">
|
2015-09-17 23:11:18 -04:00
|
|
|
<h2><?= $escape->html($name) ?></h2>
|
2015-06-16 11:11:35 -04:00
|
|
|
<section class="media-wrap">
|
|
|
|
<?php foreach($items as $item): ?>
|
2017-03-29 13:29:03 -04:00
|
|
|
<article class="media" data-kitsu-id="<?= $item['id'] ?>" data-mal-id="<?= $item['mal_id'] ?>">
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2015-06-24 16:01:35 -04:00
|
|
|
<div class="edit_buttons" hidden>
|
|
|
|
<button class="plus_one_chapter">+1 Chapter</button>
|
2017-03-30 16:16:40 -04:00
|
|
|
<?php /* <button class="plus_one_volume">+1 Volume</button> */ ?>
|
2015-06-24 16:01:35 -04:00
|
|
|
</div>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php endif ?>
|
2017-04-13 11:44:03 -04:00
|
|
|
<img src="<?= $urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg") ?>" />
|
2015-06-16 11:11:35 -04:00
|
|
|
<div class="name">
|
2016-04-14 17:51:00 -04:00
|
|
|
<a href="<?= $url->generate('manga.details', ['id' => $item['manga']['slug']]) ?>">
|
2018-08-08 13:05:38 -04:00
|
|
|
<?= $escape->html($item['manga']['title']) ?>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php foreach($item['manga']['titles'] as $title): ?>
|
|
|
|
<br /><small><?= $title ?></small>
|
|
|
|
<?php endforeach ?>
|
2015-06-24 16:01:35 -04:00
|
|
|
</a>
|
2015-06-16 11:11:35 -04:00
|
|
|
</div>
|
2015-06-24 16:01:35 -04:00
|
|
|
<div class="table">
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2016-01-04 16:58:33 -05:00
|
|
|
<div class="row">
|
|
|
|
<span class="edit">
|
2017-03-30 16:16:40 -04:00
|
|
|
<a class="bracketed"
|
|
|
|
title="Edit information about this manga"
|
|
|
|
href="<?= $url->generate('edit', [
|
|
|
|
'controller' => 'manga',
|
|
|
|
'id' => $item['id'],
|
|
|
|
'status' => $name
|
|
|
|
]) ?>">
|
|
|
|
Edit
|
|
|
|
</a>
|
2016-01-04 16:58:33 -05:00
|
|
|
</span>
|
|
|
|
</div>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php endif ?>
|
2015-06-24 16:01:35 -04:00
|
|
|
<div class="row">
|
2015-10-01 16:01:23 -04:00
|
|
|
<div class="user_rating">Rating: <?= $item['user_rating'] ?> / 10</div>
|
2015-06-24 16:01:35 -04:00
|
|
|
</div>
|
2017-03-30 14:50:25 -04:00
|
|
|
|
|
|
|
<?php if ($item['rereading']): ?>
|
|
|
|
<div class="row">
|
|
|
|
<?php foreach(['rereading'] as $attr): ?>
|
|
|
|
<?php if($item[$attr]): ?>
|
|
|
|
<span class="item-<?= $attr ?>"><?= ucfirst($attr) ?></span>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php if ($item['reread'] > 0): ?>
|
|
|
|
<div class="row">
|
|
|
|
<div>Reread <?= $item['reread'] ?> time(s)</div>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2015-06-24 16:01:35 -04:00
|
|
|
<div class="row">
|
|
|
|
<div class="chapter_completion">
|
2015-10-01 16:01:23 -04:00
|
|
|
Chapters: <span class="chapters_read"><?= $item['chapters']['read'] ?></span> /
|
|
|
|
<span class="chapter_count"><?= $item['chapters']['total'] ?></span>
|
2015-06-24 16:01:35 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="volume_completion">
|
2017-01-04 13:16:58 -05:00
|
|
|
Volumes: <span class="volume_count"><?= $item['volumes']['total'] ?></span>
|
2015-06-24 16:01:35 -04:00
|
|
|
</div>
|
2015-06-16 11:11:35 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</section>
|
|
|
|
</section>
|
2017-09-14 17:33:24 -04:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11:35 -04:00
|
|
|
<?php endforeach ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-06-24 16:01:35 -04:00
|
|
|
</main>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2017-02-15 15:56:10 -05:00
|
|
|
<script defer="defer" src="<?= $urlGenerator->assetUrl('js.php/g/edit') ?>"></script>
|
2017-01-05 22:24:45 -05:00
|
|
|
<?php endif ?>
|