store.phtml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /**
  3. * @version 7.9 [rev.7.9.02]
  4. */
  5. $this->script()->addHeaderCode(
  6. '<link href="' . $this->baseUrl . '/css/stores/default.css" media="all" rel="stylesheet" type="text/css">');
  7. /* @var \Ppb\Db\Table\Row\User $store */
  8. $this->userDetails($store);
  9. $storeSettings = $store->getStoreSettings();
  10. $logo = $store->storeLogo();
  11. $storeLink = $store->storeLink();
  12. ?>
  13. <div id="store">
  14. <header>
  15. <div class="row">
  16. <div class="col-sm-2">
  17. <?php echo $this->thumbnail($logo, 150, true, array('alt' => $store->storeName(), 'crop' => false)); ?>
  18. </div>
  19. <div class="col-sm-2">
  20. <dl>
  21. <dt><?php echo $this->_('Owner'); ?></dt>
  22. <dd>
  23. <?php echo $this->userDetails()->display(); ?>
  24. </dd>
  25. <dd>
  26. <i class="fa fa-globe"></i>
  27. <?php echo $this->userDetails()->location(); ?>
  28. </dd>
  29. <dt><?php echo $this->_('Member Since'); ?></dt>
  30. <dd><?php echo $this->date($store->getData('created_at'), true); ?></dd>
  31. </dl>
  32. </div>
  33. <div class="col-sm-8">
  34. <h1 class="pull-left">
  35. <?php echo $store->storeName(); ?>
  36. </h1>
  37. <?php if (!empty($this->loggedInUser['id'])) { ?>
  38. <div class="pull-right">
  39. <a class="btn btn-default"
  40. href="<?php echo $this->url(array('action' => 'favorite-store', 'id' => $store['id'])); ?>">
  41. <?php echo ($store->isFavoriteStore($this->loggedInUser['id'])) ? $this->_('Remove from Favorites') : $this->_('Add to Favorites'); ?>
  42. </a>
  43. </div>
  44. <?php } ?>
  45. <div class="clearfix"></div>
  46. <div>
  47. <?php echo !empty($storeSettings['store_description']) ? $storeSettings['store_description'] : null; ?>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="navbar navbar-default">
  52. <div class="container">
  53. <a class="navbar-brand"
  54. href="<?php echo $this->url($storeLink); ?>"><?php echo $store->storeName(); ?></a>
  55. <ul class="nav navbar-nav">
  56. <li>
  57. <a href="<?php echo $this->url($storeLink); ?>">
  58. <?php echo $this->_('Home'); ?>
  59. </a>
  60. </li>
  61. <li>
  62. <a href="<?php echo $this->url($storeLink + array('page' => 'store_about')); ?>">
  63. <?php echo $this->_('About Us'); ?>
  64. </a>
  65. </li>
  66. <li>
  67. <a href="<?php echo $this->url($storeLink + array('page' => 'store_shipping_information')); ?>">
  68. <?php echo $this->_('Shipping Information'); ?>
  69. </a>
  70. </li>
  71. <li>
  72. <a href="<?php echo $this->url($storeLink + array('page' => 'store_company_policies')); ?>">
  73. <?php echo $this->_('Company Policies'); ?>
  74. </a>
  75. </li>
  76. </ul>
  77. </div>
  78. </div>
  79. </header>
  80. <?php if (!empty($page) && !is_numeric($page)) {
  81. if (isset($storeSettings[$page])) {
  82. echo $this->renderHtml($storeSettings[$page], false, false);
  83. }
  84. }
  85. else {
  86. echo
  87. $this->partial('listings/browse/index.phtml',
  88. array(
  89. 'storeId' => $store['id'],
  90. 'paginator' => $paginator,
  91. 'parentId' => $parentId,
  92. 'params' => $params,
  93. 'itemsPerPage' => $itemsPerPage,
  94. 'browsePageTitle' => $browsePageTitle,
  95. 'basicSearchForm' => $basicSearchForm,
  96. )
  97. );
  98. }
  99. ?>
  100. </div>