diff options
author | raylu <raylu@mixpanel.com> | 2011-07-16 16:57:53 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-07-16 16:57:53 -0700 |
commit | 30bd3dc2c8e1dea9fb394115138f4f5ef9aedc33 (patch) | |
tree | f57f67d2ebec64bb7110665bf09a37ec04083266 /views | |
parent | ec5b4d4fbfa3f4daecbd01ca6fd38a3d5944990b (diff) | |
download | otakuhub-30bd3dc2c8e1dea9fb394115138f4f5ef9aedc33.tar.xz |
make search index work
clean up a lot of code
renamed anime.css to table.css
Diffstat (limited to 'views')
-rw-r--r-- | views/elements/animetable.html.php | 18 | ||||
-rw-r--r-- | views/search/anime.html.php | 4 | ||||
-rw-r--r-- | views/search/index.html.php | 64 |
3 files changed, 18 insertions, 68 deletions
diff --git a/views/elements/animetable.html.php b/views/elements/animetable.html.php index a074c68..0d9f9fb 100644 --- a/views/elements/animetable.html.php +++ b/views/elements/animetable.html.php @@ -2,27 +2,27 @@ <th>Title</th> <th>Date</th> <th>Type</th> -<?php foreach ($content as $anime): ?> +<?php foreach ($anime as $a): ?> <tr> <td> - <a href="/anime/view/<?= $anime->special_id ?>"><?= $anime->title ?></a> - <?php if ($anime->foreign_titles || $anime->alternative_titles): ?> + <a href="/anime/view/<?= $a->special_id ?>"><?= $a->title ?></a> + <?php if ($a->foreign_titles || $a->alternative_titles): ?> <span class="alt_titles"> - <?php if ($anime->foreign_titles): ?> - <?= $anime->foreign_titles[0] ?> + <?php if ($a->foreign_titles): ?> + <?= $a->foreign_titles[0] ?> <?php endif ?> - <?php if ($anime->alternative_titles): ?> + <?php if ($a->alternative_titles): ?> - <?= $anime->alternative_titles[0] ?> + <?= $a->alternative_titles[0] ?> <?php endif ?> </span> <?php endif ?> </td> <td> - <?= $anime->aired ?> + <?= $a->aired ?> </td> <td> - <?= $anime->view_type ?> + <?= $a->view_type ?> </td> </tr> <?php endforeach ?> diff --git a/views/search/anime.html.php b/views/search/anime.html.php index 89cc9e9..94acb84 100644 --- a/views/search/anime.html.php +++ b/views/search/anime.html.php @@ -1,6 +1,6 @@ <?php -$this->styles($this->html->style('anime')); $this->styles($this->html->style('pagination')); +$this->styles($this->html->style('table')); ?> <?= $this->_render('element', 'search') ?> @@ -10,6 +10,6 @@ $this->styles($this->html->style('pagination')); <?= $this->Paginator->paginate(array('separator' => '')) ?> -<?= $this->_render('element', 'animetable', compact('anime')) ?> +<?= $this->_render('element', 'animetable') ?> <?= $this->Paginator->paginate(array('separator' => '')) ?> diff --git a/views/search/index.html.php b/views/search/index.html.php index a269d01..a05f269 100644 --- a/views/search/index.html.php +++ b/views/search/index.html.php @@ -1,65 +1,15 @@ <?php -$this->styles($this->html->style('pagination')); +$this->styles($this->html->style('table')); ?> <h3>Anime</h3> <?= $this->_render('element', 'animetable', compact('anime')) ?> <?= $this->html->link("More", array('controller' => 'search', - 'action' => 'anime')); ?> + 'action' => 'anime')); ?> <h3>Manga</h3> -<hr> -<table> -<th>Title</th> -<th>Date</th> -<th>Type</th> -<?php if(count($manga) > 0): ?> -<?php foreach ($manga as $item): ?> - <tr> - <td> - <a href="/anime/view/<?= $item->special_id ?>"><?= $item->title ?></a> - </td> - <td> - <?= $item->aired ?> - </td> - <td> - <?= $item->view_type ?> - </td> - </tr> -<?php endforeach ?> -</table> -<div style = "float:right"> - <?= $this->html->link("More", array('controller' => 'search', - 'action' => 'anime')); ?> -</div> -<?php else: ?> -<p> No entries found </p> -<?php endif; ?> +<?= $this->html->link("More", array('controller' => 'search', + 'action' => 'anime')); ?> -<h3> K Drama </h3> -<hr> -<table> -<th>Title</th> -<th>Date</th> -<th>Type</th> -<?php if(count($kdrama) > 0): ?> -<?php foreach ($kdrama as $item): ?> - <tr> - <td> - <a href="/anime/view/<?= $item->special_id ?>"><?= $item->title ?></a> - </td> - <td> - <?= $item->aired ?> - </td> - <td> - <?= $item->view_type ?> - </td> - </tr> -<?php endforeach ?> -</table> -<div style = "float:right"> - <?= $this->html->link("More", array('controller' => 'search', - 'action' => 'anime')); ?> -</div> -<?php else: ?> -<p>No Entries found</p> -<?php endif; ?> +<h3>K Drama</h3> +<?= $this->html->link("More", array('controller' => 'search', + 'action' => 'anime')); ?> |