Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <div class="index">
  2. <h2>Search</h2>
  3. <style>
  4. #breadcrumb{
  5.     margin-top:15px;
  6.     float:left;
  7.     margin-bottom:25px;
  8. }
  9. </style>
  10. <div id="breadcrumb">
  11.     <?php $html->addCrumb('Search'); ?>
  12.     <?php echo $html->getCrumbs(' &raquo; ','PMO'); ?> 
  13. </div>
  14.  
  15. <?php
  16. echo $form->create('Search', array(
  17.                                 'url' => '/posts/search',
  18.                                 'type' => 'post',
  19.                                 ));
  20. ?>
  21. <table style="width:500px"><tr>
  22. <td style="width:160px">
  23. <?php echo $form->input('category_id', array(
  24.                                         'type'  => 'select',
  25.                                         'selected' => isset($category_id) ? $category_id : null,
  26.                                         'options' => $categories,
  27.                                         'empty' => 'Select All',
  28.                                         'label' => false,
  29.                                         'error' => false,
  30.                                         'style' => 'margin-top:-6px;height:34px;width:160px'
  31.                                     )); ?>
  32. </td>
  33. <td>   
  34. <?php echo $form->text('query', array('value' => isset($query) ? $query : null) ); ?>
  35. </td>
  36. </tr></table>
  37. <?php echo $form->end('Search'); ?>    
  38. <?php
  39. if(!empty($results)){
  40. //debug($this->params);
  41.     echo $this->element('search_result', array('results' => $results));
  42.  
  43. }   ?> 
  44.                    
  45. </div>
  46. <div class="actions">
  47. <h2>Actions</h2>
  48. <ul>
  49. <li>
  50. <?php
  51. // generate link back ke index
  52. echo $html->link(
  53.                 $title = '&laquo; Back',
  54.                 $url   = '/posts/index',
  55.                 # escape untuk parse special character
  56.                 array('escape' => false)
  57.              );
  58. ?>
  59. </li>
  60. </ul>
  61. </div>