details-manage-buttons.phtml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * @version 7.10 [rev.7.10.01]
  4. */
  5. /** @var bool $live */
  6. /** @var int $social */
  7. /** @var \Ppb\Db\Table\Row\Listing $listing */
  8. $printButton = (isset($printButton)) ? $printButton : true;
  9. if ($live === true) {
  10. ?>
  11. <?php
  12. if ($printButton) {
  13. echo $this->formElement('\Ppb\Form\Element\PrintButton', 'printButton', $this->_('Print'))
  14. ->setAttributes(array(
  15. 'class' => 'print-button btn btn-default',
  16. 'rel' => 'print-area',
  17. ))
  18. ->render();
  19. }
  20. ?>
  21. <?php if ($listing->isOwner()) { ?>
  22. <?php if ($listing->canEdit()) { ?>
  23. <a class="btn btn-default"
  24. href="<?php echo $this->url(array('id' => $listing['id']), 'listings-edit'); ?>"
  25. title="<?php echo $this->_('Edit Listing'); ?>">
  26. <?php echo $this->_('Edit'); ?>
  27. </a>
  28. <?php } ?>
  29. <?php if ($listing['active'] == 0) { ?>
  30. <a class="btn btn-success"
  31. href="<?php echo $this->url(array('module' => 'app', 'controller' => 'payment', 'action' => 'listing-setup', 'id' => $listing['id'])); ?>"
  32. title="<?php echo $this->_('Make Listing Setup Fee Payment'); ?>">
  33. <?php echo $this->_('Pay Listing Setup Fee'); ?>
  34. </a>
  35. <?php } ?>
  36. <a class="btn btn-default"
  37. href="<?php echo $this->url(array('id' => $listing['id']), 'listings-create-similar'); ?>"
  38. title="<?php echo $this->_('Create Similar Listing'); ?>">
  39. <?php echo $this->_('List Similar'); ?>
  40. </a>
  41. <?php if ($listing->canClose()) { ?>
  42. <a class="btn btn-default confirm-box"
  43. href="<?php echo $this->url(array('module' => 'listings', 'controller' => 'listing', 'action' => 'close', 'id' => $listing['id']),
  44. null, true); ?>"
  45. title="<?php echo $this->_('Close Listing'); ?>"
  46. data-message="<?php echo $this->_('Are you sure you want to close this listing?'); ?>">
  47. <?php echo $this->_('Close'); ?>
  48. </a>
  49. <?php } ?>
  50. <?php if ($listing->canDelete()) { ?>
  51. <a class="btn btn-danger confirm-box"
  52. href="<?php echo $this->url(array('module' => 'listings', 'controller' => 'listing', 'action' => 'delete', 'id' => $listing['id']),
  53. null, true); ?>"
  54. title="<?php echo $this->_('Delete Listing'); ?>"
  55. data-message="<?php echo $this->_('Are you sure you want to delete this listing?'); ?>">
  56. <?php echo $this->_('Delete'); ?>
  57. </a>
  58. <?php } ?>
  59. <?php
  60. }
  61. else {
  62. ?>
  63. <a class="btn btn-default"
  64. href="<?php echo $this->url(array('module' => 'listings', 'controller' => 'listing', 'action' => 'watch', 'id' => $listing['id']),
  65. null, true); ?>"
  66. title="<?php echo $this->_('Wishlist'); ?>">
  67. <?php echo ($listing->isWatched()) ? $this->_('Remove From Wishlist') : $this->_('Add To Wishlist'); ?>
  68. </a>
  69. <a class="btn btn-default"
  70. href="<?php echo $this->url(array('module' => 'members', 'controller' => 'messaging', 'action' => 'create', 'listing_id' => $listing['id'], 'topic_type' => \Ppb\Service\Messaging::ABUSE_REPORT_LISTING)); ?>"
  71. title="<?php echo $this->_('Report Abuse'); ?>">
  72. <?php echo $this->_('Report Abuse'); ?>
  73. </a>
  74. <?php } ?>
  75. <?php } ?>