diff options
Diffstat (limited to 'views/anime/view.html.php')
-rw-r--r-- | views/anime/view.html.php | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/views/anime/view.html.php b/views/anime/view.html.php index 11ac437..ce291c5 100644 --- a/views/anime/view.html.php +++ b/views/anime/view.html.php @@ -63,33 +63,35 @@ for ($i = 0; $i < count($anime->genres); $i++) { </p> </aside> -<section id="cast"> -<p> -<a href="/anime/cast/<?= $anime->special_id ?>" onclick="return toggleCast()">Cast ↓</a> -</p> -<table> -<?php for ($i = 0; $i < count($anime->cast); $i++): ?> - <tr<? if ($i > 0) echo ' class="char"' ?>> - <td colspan="3"> - <?= $anime->cast[$i]->character ?> - </td> - </tr> - <?php if (isset($anime->cast[$i]->people)): ?> - <?php foreach($anime->cast[$i]->people as $actor): ?> - <tr> - <td></td> - <td><?= $actor->name ?></td> - <td><?= $actor->language ?></td> - </tr> - <?php endforeach; ?> - <?php endif; ?> -<?php endfor; ?> -</table> -<br> -<p id="castlink"> -<a href="" onclick="return toggleCast()">Cast ↑</a> -</p> -</section> +<?php if (count($anime->cast) > 1): // why is this 1? ?> + <section id="cast"> + <p> + <a href="/anime/cast/<?= $anime->special_id ?>" onclick="return toggleCast()">Cast ↓</a> + </p> + <table> + <?php for ($i = 0; $i < count($anime->cast); $i++): ?> + <tr<? if ($i > 0) echo ' class="char"' ?>> + <td colspan="3"> + <?= $anime->cast[$i]->character ?> + </td> + </tr> + <?php if (isset($anime->cast[$i]->people)): ?> + <?php foreach($anime->cast[$i]->people as $actor): ?> + <tr> + <td></td> + <td><?= $actor->name ?></td> + <td><?= $actor->language ?></td> + </tr> + <?php endforeach; ?> + <?php endif; ?> + <?php endfor; ?> + </table> + <br> + <p id="castlink"> + <a href="" onclick="return toggleCast()">Cast ↑</a> + </p> + </section> +<?php endif; ?> <br class="cl"> |