2015-06-16 11:11:35 -04:00
< main >
2016-01-04 10:53:03 -05:00
< ? php if ( $auth -> is_authenticated ()) : ?>
< a class = " bracketed " href = " <?= $urlGenerator->url ('anime/add', 'anime') ?> " > Add Item </ a >
< ? 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 ) : ?>
2016-01-04 10:53:03 -05:00
< ? php if ( $item [ 'private' ] && ! $auth -> is_authenticated ()) continue ; ?>
2015-11-13 11:33:27 -05:00
< article class = " media " id = " <?= $item['anime'] ['slug'] ?> " >
< ? php if ( $auth -> is_authenticated ()) : ?>
2016-01-04 10:53:03 -05:00
< button title = " Increment episode count " class = " plus_one " hidden >+ 1 Episode </ button >
2015-11-13 11:33:27 -05:00
< ? php endif ?>
2015-09-28 14:41:45 -04:00
< ? = $helper -> img ( $item [ 'anime' ][ 'image' ]); ?>
2015-06-17 08:50:01 -04:00
< div class = " name " >
2016-01-04 10:53:03 -05:00
< a href = " <?= $escape->attr ( $item['anime'] ['url']) ?> " target = " _blank " >
2015-09-17 23:11:18 -04:00
< ? = $escape -> html ( $item [ 'anime' ][ 'title' ]) ?>
2015-06-16 11:11:35 -04:00
< ? = ( $item [ 'anime' ][ 'alternate_title' ] != " " ) ? " <br />( { $item [ 'anime' ][ 'alternate_title' ] } ) " : " " ; ?>
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 " >
2016-01-04 10:53:03 -05:00
< ? php if ( $auth -> is_authenticated ()) : ?>
< div class = " row " >
< span class = " edit " >
2016-01-04 16:58:33 -05:00
< a class = " bracketed " title = " Edit information about this anime " href = " <?= $urlGenerator->url ( " anime / edit / { $item [ 'id' ]} / { $item [ 'watching_status' ]} " ) ?> " > Edit </ a >
2016-01-04 10:53:03 -05:00
</ span >
</ div >
< ? php endif ?>
< ? php if ( $item [ 'private' ] || $item [ 'rewatching' ]) : ?>
< div class = " row " >
2016-01-04 16:58:33 -05:00
< ? php foreach ([ 'private' , 'rereading' ] 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 ?>
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 >
2015-11-13 11:33:27 -05:00
< ? php if ( $auth -> is_authenticated ()) : ?>
< script src = " <?= $urlGenerator->asset_url ('js.php?g=edit') ?> " ></ script >
< ? php endif ?>