<div class="index">
<h2>Search</h2>
<style>
#breadcrumb{
margin-top:15px;
float:left;
margin-bottom:25px;
}
</style>
<div id="breadcrumb">
<?php $html->addCrumb('Search'); ?>
<?php echo $html->getCrumbs(' » ','PMO'); ?>
</div>
<?php
echo $form->create('Search', array(
'url' => '/posts/search',
'type' => 'post',
));
?>
<table style="width:500px"><tr>
<td style="width:160px">
<?php echo $form->input('category_id', array(
'type' => 'select',
'selected' => isset($category_id) ? $category_id : null,
'options' => $categories,
'empty' => 'Select All',
'label' => false,
'error' => false,
'style' => 'margin-top:-6px;height:34px;width:160px'
)); ?>
</td>
<td>
<?php echo $form->text('query', array('value' => isset($query) ? $query : null) ); ?>
</td>
</tr></table>
<?php echo $form->end('Search'); ?>
<?php
if(!empty($results)){
//debug($this->params);
echo $this->element('search_result', array('results' => $results));
} ?>
</div>
<div class="actions">
<h2>Actions</h2>
<ul>
<li>
<?php
// generate link back ke index
echo $html->link(
$title = '« Back',
$url = '/posts/index',
# escape untuk parse special character
array('escape' => false)
);
?>
</li>
</ul>
</div>