details.phtml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. /**
  3. * @version 7.6
  4. */
  5. ?>
  6. <?php echo $this->partial('partials/listing-box.phtml', array(
  7. 'listing' => $listing, 'enhanced' => false));
  8. ?>
  9. <div class="table-responsive">
  10. <table class="table table-striped table-hover">
  11. <caption>
  12. <strong><?php echo $this->paginator->getPages()->totalItemCount; ?></strong> <?php echo $this->_('offers found.'); ?>
  13. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  14. <?php echo $this->_('Showing results'); ?>
  15. <strong><?php echo $this->paginator->getPages()->firstItemNumber; ?></strong>
  16. <?php echo $this->_('to'); ?>
  17. <strong><?php echo $this->paginator->getPages()->lastItemNumber; ?></strong>
  18. <?php } ?>
  19. </caption>
  20. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  21. <thead>
  22. <tr>
  23. <th><?php echo $this->_('Offer Details'); ?></th>
  24. <th class="size-small"><?php echo $this->_('From'); ?></th>
  25. <th class="size-small"><?php echo $this->_('Type / Status'); ?></th>
  26. <th class="size-tiny"></th>
  27. </tr>
  28. </thead>
  29. <?php } ?>
  30. <tbody>
  31. <?php
  32. /** @var \Ppb\Db\Table\Row\Offer $offer */
  33. foreach ($this->paginator as $offer) {
  34. ?>
  35. <tr>
  36. <td>
  37. <?php if ($offer['type'] == 'offer') { ?>
  38. <p class="price-offer">
  39. <?php echo $this->amount($offer['amount'], $listing['currency']); ?>
  40. <small>/ <?php echo $this->_('item'); ?></small>
  41. </p>
  42. <?php } ?>
  43. <?php if (!empty($offer['product_attributes'])) { ?>
  44. <div>
  45. <small><?php echo $this->productAttributes($offer->getData('product_attributes'))->display(); ?></small>
  46. </div>
  47. <?php } ?>
  48. <p>
  49. <small><?php echo $this->_('Quantity'); ?>: <?php echo $offer['quantity']; ?></small>
  50. </p>
  51. </td>
  52. <td>
  53. <?php echo $this->userDetails($offer['user_id'])->display(); ?>
  54. </td>
  55. <td>
  56. <?php echo $this->offerStatus($offer, true); ?>
  57. <small><?php echo $this->date($offer['created_at']); ?></small>
  58. </td>
  59. <td>
  60. <div class="btn-group-vertical">
  61. <?php if ($offer->canAccept($listing)) { ?>
  62. <a class="btn btn-sm btn-success confirm-box"
  63. href="<?php echo $this->url(array('action' => 'accept', 'id' => $offer['id']),
  64. null,
  65. true); ?>"
  66. title="<?php echo $this->_('Accept Offer'); ?>"
  67. data-message="<?php echo $this->_('Are you sure you want to accept this offer?'); ?>">
  68. <i class="fa fa-check"></i>
  69. </a>
  70. <?php } ?>
  71. <?php if ($offer->canCounter($listing)) { ?>
  72. <a class="btn btn-sm btn-counter confirm-box"
  73. href="<?php echo $this->url(array('action' => 'counter', 'id' => $offer['id']),
  74. null,
  75. true); ?>"
  76. title="<?php echo $this->_('Counteroffer'); ?>"
  77. data-message="<?php echo $this->_('Are you sure you want to make a counteroffer?'); ?>">
  78. <i class="fa fa-arrows-h"></i>
  79. </a>
  80. <?php } ?>
  81. <?php if ($offer->canDecline()) { ?>
  82. <a class="btn btn-sm btn-danger confirm-box"
  83. href="<?php echo $this->url(array('action' => 'decline', 'id' => $offer['id']), null,
  84. true); ?>"
  85. title="<?php echo $this->_('Decline Offer'); ?>"
  86. data-message="<?php echo $this->_('Are you sure you want to decline this offer?'); ?>">
  87. <i class="fa fa-ban"></i>
  88. </a>
  89. <?php } ?>
  90. <?php if ($offer->canWithdraw()) { ?>
  91. <a class="btn btn-sm btn-warning confirm-box"
  92. href="<?php echo $this->url(array('action' => 'withdraw', 'id' => $offer['id']), null,
  93. true); ?>"
  94. title="<?php echo $this->_('Withdraw Offer'); ?>"
  95. data-message="<?php echo $this->_('Are you sure you want to withdraw this offer?'); ?>">
  96. <i class="fa fa-times"></i>
  97. </a>
  98. <?php } ?>
  99. </div>
  100. </td>
  101. </tr>
  102. <?php } ?>
  103. </tbody>
  104. </table>
  105. </div>