diff options
-rw-r--r-- | views/elements/animetable.html.php | 4 | ||||
-rw-r--r-- | views/layouts/default.html.php | 4 | ||||
-rw-r--r-- | views/search/anime.html.php | 5 | ||||
-rw-r--r-- | views/search/index.html.php | 43 |
4 files changed, 14 insertions, 42 deletions
diff --git a/views/elements/animetable.html.php b/views/elements/animetable.html.php index 16e8260..a074c68 100644 --- a/views/elements/animetable.html.php +++ b/views/elements/animetable.html.php @@ -1,5 +1,3 @@ -<?= $this->Paginator->paginate(array('separator' => '')) ?> - <table> <th>Title</th> <th>Date</th> @@ -29,5 +27,3 @@ </tr> <?php endforeach ?> </table> - -<?= $this->Paginator->paginate(array('separator' => '')) ?> diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index ee76dd1..bfb04d9 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -62,8 +62,8 @@ use \lithium\security\Auth; '; ?> - <?= $this->form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'method' => 'get')); ?> - <?= $this->form->text('search', array('placeholder' => 'Search...')); ?> + <?= $this->form->create(null, array('url' => '/search/', 'class' => 'search', 'method' => 'get')); ?> + <?= $this->form->text('q', array('placeholder' => 'Search...')); ?> <input type="submit" value="Go"> <?= $this->form->end(); ?> diff --git a/views/search/anime.html.php b/views/search/anime.html.php index 4d0332f..89cc9e9 100644 --- a/views/search/anime.html.php +++ b/views/search/anime.html.php @@ -7,4 +7,9 @@ $this->styles($this->html->style('pagination')); <h2>Anime Search Results</h2> (search instead for ...) + +<?= $this->Paginator->paginate(array('separator' => '')) ?> + <?= $this->_render('element', 'animetable', compact('anime')) ?> + +<?= $this->Paginator->paginate(array('separator' => '')) ?> diff --git a/views/search/index.html.php b/views/search/index.html.php index f4f7259..a269d01 100644 --- a/views/search/index.html.php +++ b/views/search/index.html.php @@ -1,41 +1,12 @@ -<?php +<?php $this->styles($this->html->style('pagination')); ?> -<?= var_dump($this->request()->controller); ?> - - -<h3> Anime </h3> -<hr> -<table> -<th>Title</th> -<th>Date</th> -<th>Type</th> -<?php if(count($anime) > 0): ?> -<?php foreach ($anime 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"> +<h3>Anime</h3> +<?= $this->_render('element', 'animetable', compact('anime')) ?> <?= $this->html->link("More", array('controller' => 'search', 'action' => 'anime')); ?> -</div> -<?php else: ?> -<p> No results found</p> -<?php endif; ?> - - -<h3> Manga </h3> +<h3>Manga</h3> <hr> <table> <th>Title</th> @@ -64,7 +35,7 @@ $this->styles($this->html->style('pagination')); <p> No entries found </p> <?php endif; ?> -<h3> K Drama </h3> +<h3> K Drama </h3> <hr> <table> <th>Title</th> @@ -90,5 +61,5 @@ $this->styles($this->html->style('pagination')); 'action' => 'anime')); ?> </div> <?php else: ?> -<p> No Entries found </p> -<?php endif; ?>
\ No newline at end of file +<p>No Entries found</p> +<?php endif; ?> |