listing-box.phtml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /**
  3. * @version 7.10 [rev.7.10.01]
  4. */
  5. /* @var \Ppb\Db\Table\Row\Listing $listing */
  6. $link = $this->url($listing->link());
  7. $seller = (isset($seller)) ? $seller : false;
  8. $this->userDetails($listing->findParentRow('\Ppb\Db\Table\Users'));
  9. $class = ((!empty($class)) ? $class : 'list') .
  10. (($listing['highlighted']) ? ' highlighted' : '');
  11. $lazyLoad = (isset($lazyLoad)) ? $lazyLoad : true;
  12. ?>
  13. <div class="<?php echo $class; ?>">
  14. <div class="image">
  15. <a href="<?php echo $link; ?>">
  16. <?php echo $this->thumbnail($listing->getMainImage(), 250, true,
  17. array('alt' => $listing['name'], 'lazyLoad' => $lazyLoad)); ?>
  18. </a>
  19. </div>
  20. <div class="description">
  21. <div class="title">
  22. <h3>
  23. <a href="<?php echo $link; ?>"><?php echo $listing['name']; ?></a>
  24. </h3>
  25. <?php if ($this->enhanced) { ?>
  26. <div>
  27. <small>[ <?php echo $this->_('ID:') . ' ' . $listing['id']; ?> ]</small>
  28. </div>
  29. <?php } ?>
  30. <p><?php echo $listing['subtitle']; ?></p>
  31. </div>
  32. <div class="price">
  33. <?php echo $this->partial('partials/current-price.phtml', array('listing' => $listing)); ?>
  34. </div>
  35. <?php if (!$listing['draft']) { ?>
  36. <?php if ($listing['listing_type'] == 'auction') { ?>
  37. <?php if ($seller && $listing['reserve_price'] > 0) { ?>
  38. <div class="reserve">
  39. <abbr title="<?php echo $this->_('Reserve Price'); ?>">
  40. <?php echo $this->amount($listing['reserve_price'], $listing['currency']); ?>
  41. </abbr>
  42. </div>
  43. <?php } ?>
  44. <div class="bids">
  45. <?php echo $listing->countDependentRowset('\Ppb\Db\Table\Bids'); ?>
  46. <?php echo $this->_('bids'); ?>
  47. </div>
  48. <?php } ?>
  49. <?php if ($seller && empty($listing['stock_levels']) && $listing['listing_type'] == 'product') { ?>
  50. <div class="quantity">
  51. <?php echo $this->_('Quantity:'); ?>
  52. <?php echo $listing['quantity']; ?>
  53. </div>
  54. <?php } ?>
  55. <?php if (strtotime($listing['start_time']) > time()) { ?>
  56. <div class="ends text-info">
  57. <?php echo $this->_('Starts in'); ?>
  58. <?php echo $this->countdown($listing['start_time'])->timeLeft(); ?>
  59. </div>
  60. <?php
  61. }
  62. else if ($listing['end_time']) {
  63. ?>
  64. <div class="ends">
  65. <?php echo $this->countdown($listing['end_time'])->timeLeft(); ?>
  66. </div>
  67. <?php } ?>
  68. <?php } ?>
  69. <?php if (!$seller) { ?>
  70. <div class="owner">
  71. <div><?php echo $this->userDetails()->display(); ?></div>
  72. <div><?php echo $this->userDetails()->location(); ?></div>
  73. </div>
  74. <?php } ?>
  75. <?php if ($this->enhanced && !$listing['draft']) { ?>
  76. <div class="clearfix"></div>
  77. <div class="stats">
  78. <div>
  79. <?php echo $this->_('Start Time:'); ?>
  80. <?php echo $this->date($listing['start_time']); ?>
  81. </div>
  82. <div>
  83. <?php echo $this->_('End Time:'); ?>
  84. <?php echo $this->date($listing['end_time']); ?>
  85. </div>
  86. </div>
  87. <?php } ?>
  88. </div>
  89. </div>