layout.phtml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. /**
  3. * @version 7.9 [rev.7.9.02]
  4. */
  5. /** @var \Cube\Controller\Request $request */
  6. $request = $this->request()->getRequest();
  7. $module = $request->getModule();
  8. $controller = $request->getController();
  9. $action = $request->getAction();
  10. $indexPage = ($module == 'App' && $controller == 'Index' && $action == 'Index') ? true : false;
  11. $browsePage = ($module == 'Listings' && $controller == 'Browse' && $action == 'Index') ? true : false;
  12. $parentId = $request->getParam('parent_id');
  13. $this->setGlobal('themeFolder', $this->baseUrl . '/' . $this->themesFolder . '/' . 'standard');
  14. $this->setGlobal('indexPage', $indexPage);
  15. $this->setGlobal('browsePage', $browsePage);
  16. ?>
  17. <!DOCTYPE html>
  18. <html dir="<?php echo $htmlDir = $this->htmlDir(); ?>" lang="<?php echo $this->htmlLang(); ?>">
  19. <head>
  20. <?php echo $this->headTitle(); ?>
  21. <?php
  22. $this->headMeta()
  23. ->appendName('viewport', 'width=device-width, initial-scale=1.0')
  24. ->appendHttpEquiv('X-UA-Compatible', 'IE=edge');
  25. echo $this->headMeta();
  26. /** add rtl bootstrap css if the case */
  27. if ($htmlDir == \Cube\View\Helper\HtmlDir::RTL) {
  28. $this->script()
  29. ->addHeaderCode('<link href="' . $this->baseUrl . '/css/bootstrap-rtl.min.css" rel="stylesheet" type="text/css">')
  30. ->addHeaderCode('<link href="' . $this->baseUrl . '/css/style.rtl.css" media="all" rel="stylesheet" type="text/css">');
  31. }
  32. $this->script()->addHeaderCode('<link href="' . $this->themeFolder . '/css/style.css" media="all" rel="stylesheet" type="text/css">')
  33. ->addHeaderCode('<link href="' . $this->themeFolder . '/css/navigation.css" media="all" rel="stylesheet" type="text/css">')
  34. ->addHeaderCode('<link href="' . $this->themeFolder . '/css/responsive.css" media="all" rel="stylesheet" type="text/css">');
  35. ?>
  36. <?php echo $this->script()->displayHeaderCode(); ?>
  37. </head>
  38. <body>
  39. <!--container fluid -->
  40. <div class="container">
  41. <!-- desktop & mobile headers -->
  42. <?php
  43. $container = $this->navigation()->getInitialContainer()->findOneBy('id', 'header');
  44. // desktop header partial
  45. echo $this->navigation()
  46. ->setContainer($container)
  47. ->setPartial('navigation/desktop.phtml')
  48. ->menu();
  49. // mobile header partial
  50. echo $this->navigation()
  51. ->setPartial('navigation/mobile.phtml')
  52. ->menu();
  53. ?>
  54. <div class="clearfix"></div>
  55. <!-- layout content -->
  56. <?php if ($this->isMembersModule === true) { ?>
  57. <?php echo $this->render('_members.phtml'); ?>
  58. <?php
  59. }
  60. else {
  61. ?>
  62. <?php echo $this->render('_heading.phtml'); ?>
  63. <?php echo $this->getContent(); ?>
  64. <?php } ?>
  65. <div class="clearfix"></div>
  66. <footer>
  67. <?php
  68. if ($this->settings['enable_recently_viewed_listings']) {
  69. echo $this->action('recently-viewed', 'browse', 'listings');
  70. }
  71. ?>
  72. <!-- footer adverts -->
  73. <?php
  74. $advert = $this->advert()->findBySection('footer', false, array($parentId));
  75. if ($advert !== null) {
  76. ?>
  77. <p class="text-center">
  78. <?php echo $this->advert($advert)->display(); ?>
  79. </p>
  80. <?php } ?>
  81. <div class="col-sm-5 col-xs-12">
  82. <div>
  83. Powered by <a href="http://www.phpprobid.com/" target="_blank">PHP Pro Bid</a>.
  84. &copy;<?php echo date('Y'); ?> Online Ventures Software
  85. </div>
  86. <?php if ($this->settings['enable_social_network_links']) { ?>
  87. <div class="social">
  88. <?php echo $this->social()->clearListing()->display(); ?>
  89. </div>
  90. <?php } ?>
  91. </div>
  92. <div class="col-sm-7 col-xs-12">
  93. <?php
  94. $contentSectionsService = $this->contentSections()->getContentSections();
  95. $contentSections = $this->contentSections(
  96. $contentSectionsService->getTable()
  97. ->select()
  98. ->where('parent_id IS NULL')
  99. ->order('order_id ASC')
  100. );
  101. ?>
  102. <!-- these links are only temporary - will alter all of this while in beta -->
  103. <ul class="links">
  104. <?php
  105. /** @var \Ppb\Db\Table\Row\ContentSection $section */
  106. foreach ($contentSections as $section) {
  107. ?>
  108. <li>
  109. &nbsp;
  110. <a href="<?php echo $this->url($section->link()); ?>">
  111. <?php echo $this->_($section['name']); ?>
  112. </a>
  113. </li>
  114. <?php } ?>
  115. </ul>
  116. <?php if ($this->settings['newsletter_subscription_box']) { ?>
  117. <div class="box-newsletter-subscription text-right hidden-xs">
  118. <?php echo $this->partial('partials/newsletter-subscription.phtml'); ?>
  119. </div>
  120. <?php } ?>
  121. </div>
  122. </footer>
  123. </div>
  124. <!-- end container fluid -->
  125. <!-- cookie usage confirmation helper -->
  126. <?php echo $this->cookieUsage(); ?>
  127. <div class="loading-modal"></div>
  128. <!-- Scroll to Top -->
  129. <a class="scroll-top" style="display: none; ">&#8679;</a>
  130. <?php
  131. $this->script()->addBodyCode('<script src="' . $this->themeFolder . '/js/all.js" type="text/javascript"></script>');
  132. ?>
  133. <!-- client side scripts [loaded in bootstrap] -->
  134. <?php echo $this->script()->displayBodyCode(); ?>
  135. </body>
  136. </html>