summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorraylu <raylu@mixpanel.com>2011-07-16 22:07:00 -0700
committerraylu <raylu@mixpanel.com>2011-07-16 22:07:00 -0700
commit5cc64bc633e8ff287cf7bb16ab1a8b8d2afb29b3 (patch)
tree77cfb712e6bc2b469702101d031791e16f2a022e /views
parent3404aebda95c78a98e477c120354f20891f55c7b (diff)
downloadotakuhub-5cc64bc633e8ff287cf7bb16ab1a8b8d2afb29b3.tar.xz
kdrama search results on search/index
Diffstat (limited to 'views')
-rw-r--r--views/elements/animesearch.html.php4
-rw-r--r--views/elements/kdramatable.html.php28
-rw-r--r--views/search/index.html.php8
3 files changed, 32 insertions, 8 deletions
diff --git a/views/elements/animesearch.html.php b/views/elements/animesearch.html.php
deleted file mode 100644
index 370ff1a..0000000
--- a/views/elements/animesearch.html.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<tr><th>img</th><th>Name</th><th>Episodes</th><th>Type</th><th>Score</th></tr>
- <?php foreach($content as $item): ?>
- <tr><td>"image"</td><td><a href="/anime/view/<?= $item->special_id ?>"><?= $item->title ?></a></td> <td><?= $item->episode_count ?></td><td><?= $item->view_type ?></td><td><?= $item->mal_score ?></td></tr>
-<?php endforeach; ?> \ No newline at end of file
diff --git a/views/elements/kdramatable.html.php b/views/elements/kdramatable.html.php
new file mode 100644
index 0000000..956d59f
--- /dev/null
+++ b/views/elements/kdramatable.html.php
@@ -0,0 +1,28 @@
+<table>
+<th>Title</th>
+<th>Date</th>
+<?php foreach ($kdrama as $k): ?>
+ <tr>
+ <td>
+ <a href="/kdrama/view/<?= $k->special_id ?>"><?= $k->title ?></a>
+ <?php if (isset($k->foreign_titles) || isset($k->alternative_titles)): ?>
+ <span class="alt_titles">
+ <?php if (isset($k->foreign_titles)): ?>
+ <?= $k->foreign_titles[0] ?>
+ <?php endif ?>
+ <?php if (isset($k->alternative_titles)): ?>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <?= $k->alternative_titles[0] ?>
+ <?php endif ?>
+ </span>
+ <?php endif ?>
+ </td>
+ <td>
+ <?php
+ $network = array_values($k->networks->data());
+ ?>
+ <?= $network[0]['broadcast_period'] ?>
+ </td>
+ </tr>
+<?php endforeach ?>
+</table>
diff --git a/views/search/index.html.php b/views/search/index.html.php
index f8889e2..bee0bb8 100644
--- a/views/search/index.html.php
+++ b/views/search/index.html.php
@@ -9,7 +9,7 @@ $this->styles($this->html->style('search'));
<div class="triangle-ribbon"></div>
<?= $this->_render('element', 'animetable', compact('anime')) ?>
<p class="more">
-<a href="/search/anime/<?= $q ?>">More</a>
+<a href="/search/anime/?q=<?= $q ?>">More</a>
</p>
<h2 class="ribbon">Manga</h2>
@@ -17,15 +17,15 @@ $this->styles($this->html->style('search'));
<p>results</p>
<?php if(count($manga) > 0): ?>
<p class="more">
-<a href="/search/manga/<?= $q ?>">More</a>
+<a href="/search/manga/?q=<?= $q ?>">More</a>
</p>
<?php endif ?>
<h2 class="ribbon">K-Drama</h2>
<div class="triangle-ribbon"></div>
-<p>results</p>
+<?= $this->_render('element', 'kdramatable', compact('anime')) ?>
<?php if(count($kdrama) > 0): ?>
<p class="more">
-<a href="/search/kdrama/<?= $q ?>">More</a>
+<a href="/search/kdrama/?q=<?= $q ?>">More</a>
</p>
<?php endif ?>