bids.phtml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /**
  3. * @version 7.4
  4. */
  5. ?>
  6. <nav class="navbar navbar-filter">
  7. <form class="navbar-form navbar-right" action="<?php echo $this->url(null, null, true,
  8. array('listing_id', 'keywords', 'option', 'page', 'submit')); ?>" method="get">
  9. <div class="form-group">
  10. <?php echo $this->formElement('text', 'keywords', $this->keywords)
  11. ->setAttributes(array('placeholder' => $this->_('Listing Title'), 'class' => 'form-control input-default'))
  12. ->render();
  13. ?>
  14. <?php echo $this->formElement('text', 'listing_id', $this->listingId)
  15. ->setAttributes(array('placeholder' => $this->_('Listing ID'), 'class' => 'form-control input-default'))
  16. ->render();
  17. ?>
  18. </div>
  19. <?php echo $this->formElement('submit', 'submit', $this->_('Search'))
  20. ->setAttributes(array('class' => 'btn btn-default'))
  21. ->render();
  22. ?>
  23. </form>
  24. </nav>
  25. <div class="table-responsive">
  26. <table class="table table-striped table-hover">
  27. <caption>
  28. <strong><?php echo $this->paginator->getPages()->totalItemCount; ?></strong> <?php echo $this->_('bids found.'); ?>
  29. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  30. <?php echo $this->_('Showing results'); ?>
  31. <strong><?php echo $this->paginator->getPages()->firstItemNumber; ?></strong>
  32. <?php echo $this->_('to'); ?>
  33. <strong><?php echo $this->paginator->getPages()->lastItemNumber; ?></strong>
  34. <?php } ?>
  35. </caption>
  36. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  37. <thead>
  38. <tr>
  39. <th><?php echo $this->_('Listing'); ?></th>
  40. <th class="size-small"><?php echo $this->_('Bid Details'); ?></th>
  41. <th class="size-mini"><?php echo $this->_('Bid Date'); ?></th>
  42. </tr>
  43. </thead>
  44. <?php } ?>
  45. <tbody>
  46. <?php
  47. foreach ($this->paginator as $row) {
  48. /** @var \Ppb\Db\Table\Row\Bid $bid */
  49. $bid = $bidsService->findBy('id', $row['id']);
  50. /** @var \Ppb\Db\Table\Row\Listing $listing */
  51. $listing = $bid->findParentRow('\Ppb\Db\Table\Listings');
  52. ?>
  53. <tr>
  54. <td>
  55. <?php echo $this->partial('partials/listing-box.phtml', array(
  56. 'listing' => $listing, 'enhanced' => true));
  57. ?>
  58. </td>
  59. <td class="bid-details">
  60. <div><?php echo $this->amount($bid['amount'], $listing['currency']); ?></div>
  61. <?php if ($this->settings['proxy_bidding']) { ?>
  62. <div class="text-success" title="<?php echo $this->_('Proxy Bid'); ?>">
  63. <small><?php echo $this->amount($bid['maximum_bid'],
  64. $listing['currency']); ?></small>
  65. </div>
  66. <?php } ?>
  67. <p>
  68. <?php echo $this->bidStatus($bid); ?>
  69. </p>
  70. <?php if ($bid->canRetract($listing)) { ?>
  71. <div>
  72. <a class="btn btn-sm btn-default confirm-box"
  73. href="<?php echo $this->url(array('action' => 'retract-bid', 'id' => $bid['id']), null,
  74. true); ?>"
  75. title="<?php echo $this->_('Retract Bid'); ?>"
  76. data-message="<?php echo $this->_('Are you sure you want to retract this bid?'); ?>">
  77. <i class="fa fa-times"></i> <?php echo $this->_('Retract Bid'); ?>
  78. </a>
  79. </div>
  80. <?php } ?>
  81. </td>
  82. <td>
  83. <small>
  84. <?php echo $this->date($bid['created_at']); ?>
  85. </small>
  86. </td>
  87. </tr>
  88. <?php } ?>
  89. </tbody>
  90. </table>
  91. </div>
  92. <?php echo $this->pagination($this->paginator, 'sliding', 'partials/pagination.phtml'); ?>