site-fees.phtml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * @version 7.3
  4. */
  5. /** @var \Ppb\Service\Fees\ListingSetup $listingFees */
  6. /** @var string $tab */
  7. /** @var int $categoryId */
  8. /** @var array $categoriesMultiOptions */
  9. $element = $this->formElement('select', 'category_id')
  10. ->setLabel('Select Category')
  11. ->setMultiOptions($categoriesMultiOptions)
  12. ->setValue($categoryId)
  13. ->setAttributes(array(
  14. 'class' => 'form-control input-medium',
  15. 'onchange' => 'this.form.submit();'
  16. ));
  17. ?>
  18. <ul class="nav nav-tabs">
  19. <?php foreach ($tabs as $key => $value) { ?>
  20. <li <?php echo ($key == $tab) ? 'class="active"' : ''; ?>>
  21. <a href="<?php echo $this->url(array('tab' => $key), null, true, array('category_id')); ?>">
  22. <?php echo $this->_($value['name']); ?></a>
  23. </li>
  24. <?php } ?>
  25. </ul>
  26. <div class="fees-desc">
  27. <?php if ($tab == 'listings') { ?>
  28. <form action="" method="get">
  29. <input type="hidden" name="tab" value="<?php echo $tab; ?>">
  30. <?php echo $this->partial('partials/form-element.phtml', array('element' => $element)); ?>
  31. </form>
  32. <div class="clearfix"></div>
  33. <dl class="dl-horizontal site-fees">
  34. <?php foreach ($fees as $fee) { ?>
  35. <dt><?php echo $this->_($fee['desc']); ?></dt>
  36. <dd>
  37. <?php if ($fee['tier_from'] > 0 || $fee['tier_to'] > 0) { ?>
  38. <span class="fee-tier">
  39. [ <?php echo $this->amount($fee['tier_from']); ?>
  40. - <?php echo $this->amount($fee['tier_to']); ?> ]
  41. </span>
  42. <?php } ?>
  43. <span class="fee-amount">
  44. <?php echo ($fee['calculation_type'] == 'flat') ? $this->amount($fee['amount']) : $fee['amount'] . '%'; ?>
  45. </span>
  46. </dd>
  47. <?php } ?>
  48. </dl>
  49. <?php
  50. }
  51. else if ($tab == 'stores') {
  52. ?>
  53. <h4><?php echo $this->_('Store Subscriptions'); ?></h4>
  54. <?php foreach ($storesSubscriptions as $subscription) { ?>
  55. <div><?php echo $this->_($subscription); ?></div>
  56. <?php } ?>
  57. <?php
  58. }
  59. else {
  60. ?>
  61. <h4><?php echo $this->_('User Fees'); ?></h4>
  62. <dl class="dl-horizontal">
  63. <?php foreach ($fees as $fee) { ?>
  64. <dt><?php echo $this->_($fee['desc']); ?></dt>
  65. <dd><?php echo $this->amount($fee['amount']); ?></dd>
  66. <?php } ?>
  67. </dl>
  68. <?php } ?>
  69. </div>