2015-06-16 11:11:35 -04:00
|
|
|
<main>
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2016-03-07 14:37:49 -05:00
|
|
|
<a class="bracketed" href="<?= $url->generate('anime.add.get') ?>">Add Item</a>
|
2017-01-05 13:41:32 -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): ?>
|
|
|
|
<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-02-15 16:30:14 -05:00
|
|
|
<?php if ($item['private'] && ! $auth->isAuthenticated()) continue; ?>
|
2017-01-13 16:49:46 -05: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()): ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
<button title="Increment episode count" class="plus_one" hidden>+1 Episode</button>
|
2017-01-05 13:41:32 -05:00
|
|
|
<?php endif ?>
|
2017-04-13 11:26:28 -04:00
|
|
|
<img src="<?= $urlGenerator->assetUrl("images/anime/{$item['anime']['id']}.jpg") ?>" alt="" />
|
2015-06-17 08:50:01 -04:00
|
|
|
<div class="name">
|
2016-04-08 11:56:17 -04:00
|
|
|
<a href="<?= $url->generate('anime.details', ['id' => $item['anime']['slug']]); ?>">
|
2017-01-06 21:39:01 -05:00
|
|
|
<?= array_shift($item['anime']['titles']) ?>
|
|
|
|
<?php foreach ($item['anime']['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-17 08:50:01 -04:00
|
|
|
<div class="table">
|
2017-02-15 16:30:14 -05:00
|
|
|
<?php if ($auth->isAuthenticated()): ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
<div class="row">
|
|
|
|
<span class="edit">
|
2017-04-13 11:26:28 -04:00
|
|
|
<a class="bracketed" title="Edit information about this anime" href="<?=
|
2017-02-17 08:25:19 -05:00
|
|
|
$url->generate('edit', [
|
2017-04-13 11:26:28 -04:00
|
|
|
'controller' => 'anime',
|
|
|
|
'id' => $item['id'],
|
2017-02-17 08:25:19 -05:00
|
|
|
'status' => $item['watching_status']
|
|
|
|
]);
|
|
|
|
?>">Edit</a>
|
2016-01-04 10:53:03 -05:00
|
|
|
</span>
|
|
|
|
</div>
|
2017-01-05 13:41:32 -05:00
|
|
|
<?php endif ?>
|
2017-04-13 11:26:28 -04:00
|
|
|
|
2016-01-04 10:53:03 -05:00
|
|
|
<?php if ($item['private'] || $item['rewatching']): ?>
|
|
|
|
<div class="row">
|
2016-01-06 11:08:56 -05:00
|
|
|
<?php foreach(['private', 'rewatching'] as $attr): ?>
|
2016-01-04 10:53:03 -05:00
|
|
|
<?php if($item[$attr]): ?>
|
|
|
|
<span class="item-<?= $attr ?>"><?= ucfirst($attr) ?></span>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2017-04-13 11:26:28 -04:00
|
|
|
|
2016-01-06 11:08:56 -05:00
|
|
|
<?php if ($item['rewatched'] > 0): ?>
|
|
|
|
<div class="row">
|
|
|
|
<div>Rewatched <?= $item['rewatched'] ?> time(s)</div>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2017-04-13 11:26:28 -04:00
|
|
|
|
2017-01-13 16:49:46 -05:00
|
|
|
<?php if (count($item['anime']['streaming_links']) > 0): ?>
|
|
|
|
<div class="row">
|
|
|
|
<?php foreach($item['anime']['streaming_links'] as $link): ?>
|
|
|
|
<div class="cover_streaming_link">
|
|
|
|
<?php if($link['meta']['link']): ?>
|
2017-01-25 13:37:39 -05:00
|
|
|
<a href="<?= $link['link']?>" title="Stream '<?= $item['anime']['title'] ?>' on <?= $link['meta']['name'] ?>">
|
2017-02-16 14:30:39 -05:00
|
|
|
<img class="streaming-logo" width="20" height="20" src="<?= $urlGenerator->assetUrl('images', $link['meta']['image']) ?>" alt="<?= $link['meta']['name'] ?> logo" />
|
2017-01-13 16:49:46 -05:00
|
|
|
</a>
|
|
|
|
<?php else: ?>
|
2017-02-16 14:30:39 -05:00
|
|
|
<img class="streaming-logo" width="20" height="20" src="<?= $urlGenerator->assetUrl('images', $link['meta']['image']) ?>" alt="<?= $link['meta']['name'] ?> logo" />
|
2017-01-13 16:49:46 -05:00
|
|
|
<?php endif ?>
|
|
|
|
</div>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2017-04-13 11:26:28 -04:00
|
|
|
|
2015-06-17 08:50:01 -04:00
|
|
|
<div class="row">
|
2015-09-28 14:41:45 -04:00
|
|
|
<div class="user_rating">Rating: <?= $item['user_rating'] ?> / 10</div>
|
2015-06-24 16:01:35 -04:00
|
|
|
<div class="completion">Episodes:
|
2015-09-28 14:41:45 -04:00
|
|
|
<span class="completed_number"><?= $item['episodes']['watched'] ?></span> /
|
|
|
|
<span class="total_number"><?= $item['episodes']['total'] ?></span>
|
2015-06-24 16:01:35 -04:00
|
|
|
</div>
|
2015-06-17 08:50:01 -04:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
2015-09-28 14:41:45 -04:00
|
|
|
<div class="media_type"><?= $escape->html($item['anime']['type']) ?></div>
|
|
|
|
<div class="airing_status"><?= $escape->html($item['airing']['status']) ?></div>
|
2015-09-17 23:11:18 -04:00
|
|
|
<div class="age_rating"><?= $escape->html($item['anime']['age_rating']) ?></div>
|
2015-06-17 08:50:01 -04:00
|
|
|
</div>
|
2015-06-16 11:11:35 -04:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<?php endforeach ?>
|
2015-07-02 14:04:04 -04:00
|
|
|
<?php endif ?>
|
2015-06-16 11:11: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 13:41:32 -05:00
|
|
|
<?php endif ?>
|