watched-items.phtml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * @version 7.4
  4. */
  5. ?>
  6. <form action="" method="post">
  7. <?php echo $this->formElement('hidden', 'option', '')->render(); ?>
  8. <div class="table-responsive">
  9. <table class="table table-striped table-hover">
  10. <caption>
  11. <strong><?php echo $this->paginator->getPages()->totalItemCount; ?></strong> <?php echo $this->_('results found.'); ?>
  12. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  13. <?php echo $this->_('Showing results'); ?>
  14. <strong><?php echo $this->paginator->getPages()->firstItemNumber; ?></strong>
  15. <?php echo $this->_('to'); ?>
  16. <strong><?php echo $this->paginator->getPages()->lastItemNumber; ?></strong>
  17. <?php } ?>
  18. </caption>
  19. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  20. <thead>
  21. <tr>
  22. <th class="size-tiny">
  23. <?php echo $this->formElement('checkbox', 'selectAll')
  24. ->setMultiOptions(array(1 => null))
  25. ->render();
  26. ?>
  27. </th>
  28. <th><?php echo $this->_('Listing'); ?></th>
  29. <th class="size-mini"><?php echo $this->_('Added'); ?></th>
  30. <!-- <th class="size-mini">--><?php //echo $this->_('Options'); ?><!--</th>-->
  31. </tr>
  32. </thead>
  33. <?php } ?>
  34. <tbody>
  35. <?php
  36. /** @var \Cube\Db\Table\Row $listingWatch */
  37. foreach ($this->paginator as $listingWatch) {
  38. /** @var \Ppb\Db\Table\Row\Listing $listing */
  39. $listing = $listingWatch->findParentRow('\Ppb\Db\Table\Listings');
  40. ?>
  41. <tr>
  42. <td>
  43. <?php echo $this->formElement('checkbox', 'id')
  44. ->setMultiOptions(array($listing['id'] => null))
  45. ->setAttributes(array('class' => 'select-all'))
  46. ->setMultiple()
  47. ->render();
  48. ?>
  49. </td>
  50. <td>
  51. <?php echo $this->partial('partials/listing-box.phtml', array(
  52. 'listing' => $listing));
  53. ?>
  54. </td>
  55. <td>
  56. <small><?php echo $this->date($listingWatch['created_at']); ?></small>
  57. </td>
  58. </tr>
  59. <?php } ?>
  60. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  61. <tr>
  62. <td colspan="3">
  63. <div class="btn-group">
  64. <button class="btn btn-default confirm-form" value="delete"
  65. data-message="<?php echo $this->_('Are you sure you want to remove the selected listings from your wishlist?'); ?>">
  66. <?php echo $this->_('Delete'); ?>
  67. </button>
  68. </div>
  69. </td>
  70. </tr>
  71. <?php } ?>
  72. </tbody>
  73. </table>
  74. </div>
  75. </form>
  76. <?php echo $this->pagination($this->paginator, 'sliding', 'partials/pagination.phtml'); ?>