summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/anime/view.html.php142
-rw-r--r--views/elements/animetable.html.php6
-rw-r--r--views/elements/mangatable.html.php29
-rw-r--r--views/layouts/default.html.php4
-rw-r--r--views/search/index.html.php30
-rw-r--r--views/search/kdrama.html.php16
-rw-r--r--views/search/manga.html.php16
7 files changed, 168 insertions, 75 deletions
diff --git a/views/anime/view.html.php b/views/anime/view.html.php
index 4a3b8c9..a722935 100644
--- a/views/anime/view.html.php
+++ b/views/anime/view.html.php
@@ -1,68 +1,98 @@
-<h2 class="ribbon full"><?= $content->title ?></h2>
+<?php
+$this->styles($this->html->style('view'));
+?>
+
+<h2 class="ribbon full"><?= $anime->title ?></h2>
<div class="triangle-ribbon"></div>
-<br class="cl" />
+<br class="cl">
-<div class="container_12">
-<!-- Start Sidebar -->
-<div class="grid_4" id="sidebar">
-<img src="<?=$content->image ?>" >
+<aside id="img">
+<img src="<?=$anime->image ?>" alt="<?= $anime->title ?>">
+</aside>
-<h2 class="ribbon"> Alternative Titles </h2>
-<hr/>
-<p>
-<?php if(isset($content->alternative_titles)) : ?>
-<?php foreach($content->alternative_titles as $title): ?>
- <?= $title ?>
-<?php endforeach; ?>
+<section id="info"><p>
+<?php if(isset($anime->foreign_titles)):
+ $str = 'Foreign titles:';
+ for ($i = 0; $i < count($anime->foreign_titles); $i++) {
+ if ($i > 0) $str .= '<b>,</b>';
+ $str .= ' ' . $anime->foreign_titles[$i];
+ }
+ $str .= '<br>';
+ ?>
+ <?= $str ?>
+<?php endif; ?>
+<?php if(isset($anime->alternative_titles)):
+ $str = 'Alternative titles:';
+ for ($i = 0; $i < count($anime->alternative_titles); $i++) {
+ if ($i > 0) $str .= '<b>,</b>';
+ $str .= ' ' . $anime->alternative_titles[$i];
+ }
+ $str .= '<br>';
+ ?>
+ <?= $str ?>
<?php endif; ?>
+Type: <?= $anime->view_type ?><br>
+Episodes: <?= $anime->episode_count ?><br>
+Aired: <?= $anime->aired ?><br>
+Producers: <?php
+$str = '';
+for ($i = 0; $i < count($anime->producers); $i++) {
+ if ($i > 0) $str .= ',';
+ $str .= ' <a href="/producer/view/' . $anime->producers[$i] . '">' . $anime->producers[$i] . '</a>';
+} ?><?= $str ?><br>
+Genres: <?php
+$str = '';
+for ($i = 0; $i < count($anime->genres); $i++) {
+ if ($i > 0) $str .= ',';
+ $str .= ' <a href="/genre/view/' . $anime->genres[$i] . '">' . $anime->genres[$i] . '</a>';
+} ?><?= $str ?><br>
+Duration: <?= $anime->episode_duration ?><br>
+Rating: <?= $anime->rated ?><br>
+Related: <?= $related ?>
</p>
-<h2> Information </h2>
-<span> Type: <?= $content->view_type ?> </span>
-Episodes: <?= $content->episode_count ?><br/>
-Status: <?= $content->status ?><br/>
-Aired: <?= $content->aired ?><br/>
-Producers: <?php foreach($content->producers as $producer): ?>
-<a href="/producer/view/<?= $producer ?>"><?= $producer ?></a>,
-<?php endforeach; ?><br/>
-Genres: <?php foreach($content->genres as $genres): ?>
-<a href="/genres/view/<?= $genres ?>"><?= $genres ?></a>,
-<?php endforeach ?><br/>
-Duration: <?= $content->episode_duration ?><br/>
-Rating: <?= $content->rating ?><br/>
+</section>
-<h2 class="ribbon">Statistics</h2>
-Score: <br/>
-Ranked: <br/>
-Popularity: <br/>
-Members:<br/>
-Favorited by: over 9000 Users<br/>
-
-<h2 class="ribbon"> My Info </h2>
-<hr/>
-<!-- End Sidebar -->
-</div>
-<div class="grid_8" id="content">
-<!-- Start Content -->
-<h2>Synopsis</h2>
-<hr/>
-<?= $content->synopsis ?>
-
-<h2>Related Animes</h2>
-<hr/>
+<aside id="malstats">
+<h2>MAL Stats</h2>
+<p>
+Score: <?= $anime->mal_score ?><br>
+Votes: <?= $anime->mal_score_voted ?><br>
+Ranked: <?= $anime->mal_rank ?><br>
+Popularity: <?= $anime->mal_popularity ?><br>
+Members: <?= $anime->mal_score ?>
+</p>
+</aside>
-<h2>Characters And VA's </h2>
-<hr/>
-<?php foreach($content->cast as $char): ?>
-<?= $char->character ?>
-<?= $char->role ?>
-Played by:
+<section id="cast">
+<p>
+<a href="/anime/cast/<?= $anime->special_id ?>" onclick="return toggleCast()">Cast &#x2193;</a>
+</p>
+<p><table>
+<?php foreach($anime->cast as $char): ?>
+ <tr>
+ <td colspan="3">
+ <?= $char->character ?>
+ </td>
+ </tr>
<?php if (isset($char->people)): ?>
<?php foreach($char->people as $actor): ?>
- <?= $actor->name ?>
- <?= $actor->language ?>
+ <tr>
+ <td></td>
+ <td><?= $actor->name ?></td>
+ <td><?= $actor->language ?></td>
+ </tr>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
-</div>
-<br class="cl"/>
-</div> \ No newline at end of file
+</table></p>
+<p id="castlink">
+<a href="" onclick="return toggleCast()">Cast &#x2191;</a>
+</p>
+</section>
+
+<br class="cl">
+
+<h2 class="ribbon">Synopsis</h2>
+<div class="triangle-ribbon"></div>
+<br class="cl">
+<p><?= $anime->synopsis ?></p>
diff --git a/views/elements/animetable.html.php b/views/elements/animetable.html.php
index 0d9f9fb..ea222a6 100644
--- a/views/elements/animetable.html.php
+++ b/views/elements/animetable.html.php
@@ -6,12 +6,12 @@
<tr>
<td>
<a href="/anime/view/<?= $a->special_id ?>"><?= $a->title ?></a>
- <?php if ($a->foreign_titles || $a->alternative_titles): ?>
+ <?php if (isset($a->foreign_titles) || isset($a->alternative_titles)): ?>
<span class="alt_titles">
- <?php if ($a->foreign_titles): ?>
+ <?php if (isset($a->foreign_titles)): ?>
<?= $a->foreign_titles[0] ?>
<?php endif ?>
- <?php if ($a->alternative_titles): ?>
+ <?php if (isset($a->alternative_titles)): ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?= $a->alternative_titles[0] ?>
<?php endif ?>
diff --git a/views/elements/mangatable.html.php b/views/elements/mangatable.html.php
new file mode 100644
index 0000000..c92ff83
--- /dev/null
+++ b/views/elements/mangatable.html.php
@@ -0,0 +1,29 @@
+<table>
+<th>Title</th>
+<th>Date</th>
+<th style="width: 200px">Type</th>
+<?php foreach ($manga as $m): ?>
+ <tr>
+ <td>
+ <a href="/manga/view/<?= $m->special_id ?>"><?= $m->title ?></a>
+ <?php if (isset($m->foreign_titles) || isset($m->alternative_titles)): ?>
+ <span class="alt_titles">
+ <?php if (isset($m->foreign_titles)): ?>
+ <?= $m->foreign_titles[0] ?>
+ <?php endif ?>
+ <?php if (isset($m->alternative_titles)): ?>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <?= $m->alternative_titles[0] ?>
+ <?php endif ?>
+ </span>
+ <?php endif ?>
+ </td>
+ <td>
+ <?= $m->publish_period ?>
+ </td>
+ <td>
+ <?= $m->author ?>
+ </td>
+ </tr>
+<?php endforeach ?>
+</table>
diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php
index 9464d80..9313414 100644
--- a/views/layouts/default.html.php
+++ b/views/layouts/default.html.php
@@ -69,9 +69,9 @@ use \lithium\security\Auth;
<br class="cl" />
</header>
-<div id="page">
+<article>
<?php echo $this->content() ?>
-</div>
+</article>
<footer>
<p>Copyright ©2011, <a href="http://www.melenion.org">Melenion Dev Studios</a></p>
<br class="cl" />
diff --git a/views/search/index.html.php b/views/search/index.html.php
index bee0bb8..1672570 100644
--- a/views/search/index.html.php
+++ b/views/search/index.html.php
@@ -5,27 +5,29 @@ $this->styles($this->html->style('search'));
<?= $this->_render('element', 'search') ?>
+<?php if(count($anime) > 0): ?>
<h2 class="ribbon">Anime</h2>
<div class="triangle-ribbon"></div>
-<?= $this->_render('element', 'animetable', compact('anime')) ?>
-<p class="more">
-<a href="/search/anime/?q=<?= $q ?>">More</a>
-</p>
+ <?= $this->_render('element', 'animetable') ?>
+ <p class="more">
+ <a href="/search/anime/?q=<?= $q ?>">More</a>
+ </p>
+<?php endif ?>
+<?php if(count($manga) > 0): ?>
<h2 class="ribbon">Manga</h2>
<div class="triangle-ribbon"></div>
-<p>results</p>
-<?php if(count($manga) > 0): ?>
-<p class="more">
-<a href="/search/manga/?q=<?= $q ?>">More</a>
-</p>
+ <?= $this->_render('element', 'mangatable') ?>
+ <p class="more">
+ <a href="/search/manga/?q=<?= $q ?>">More</a>
+ </p>
<?php endif ?>
+<?php if(count($kdrama) > 0): ?>
<h2 class="ribbon">K-Drama</h2>
<div class="triangle-ribbon"></div>
-<?= $this->_render('element', 'kdramatable', compact('anime')) ?>
-<?php if(count($kdrama) > 0): ?>
-<p class="more">
-<a href="/search/kdrama/?q=<?= $q ?>">More</a>
-</p>
+ <?= $this->_render('element', 'kdramatable') ?>
+ <p class="more">
+ <a href="/search/kdrama/?q=<?= $q ?>">More</a>
+ </p>
<?php endif ?>
diff --git a/views/search/kdrama.html.php b/views/search/kdrama.html.php
new file mode 100644
index 0000000..8736902
--- /dev/null
+++ b/views/search/kdrama.html.php
@@ -0,0 +1,16 @@
+<?php
+$this->styles($this->html->style('pagination'));
+$this->styles($this->html->style('table'));
+$this->styles($this->html->style('search'));
+?>
+
+<?= $this->_render('element', 'search') ?>
+
+<h2>K-Drama Search Results</h2>
+(search instead for ...)
+
+<?= $this->Paginator->paginate(array('separator' => '')) ?>
+
+<?= $this->_render('element', 'kdramatable') ?>
+
+<?= $this->Paginator->paginate(array('separator' => '')) ?>
diff --git a/views/search/manga.html.php b/views/search/manga.html.php
new file mode 100644
index 0000000..181994b
--- /dev/null
+++ b/views/search/manga.html.php
@@ -0,0 +1,16 @@
+<?php
+$this->styles($this->html->style('pagination'));
+$this->styles($this->html->style('table'));
+$this->styles($this->html->style('search'));
+?>
+
+<?= $this->_render('element', 'search') ?>
+
+<h2>Manga Search Results</h2>
+(search instead for ...)
+
+<?= $this->Paginator->paginate(array('separator' => '')) ?>
+
+<?= $this->_render('element', 'mangatable') ?>
+
+<?= $this->Paginator->paginate(array('separator' => '')) ?>