layout.phtml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?php
  2. /**
  3. * @version 7.9 [rev.7.9.03]
  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 . '/' . 'green');
  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. <header>
  40. <!-- desktop & mobile headers -->
  41. <?php
  42. $container = $this->navigation()->getInitialContainer()->findOneBy('id', 'header');
  43. // desktop header partial
  44. echo $this->navigation()
  45. ->setContainer($container)
  46. ->setPartial('navigation/desktop.phtml')
  47. ->menu();
  48. // mobile header partial
  49. echo $this->navigation()
  50. ->setPartial('navigation/mobile.phtml')
  51. ->menu();
  52. ?>
  53. </header>
  54. <!--container fluid -->
  55. <div id="wrapper">
  56. <div class="container">
  57. <!-- layout content -->
  58. <?php if ($this->isMembersModule === true) { ?>
  59. <?php echo $this->render('_members.phtml'); ?>
  60. <?php
  61. }
  62. else {
  63. ?>
  64. <?php echo $this->render('_heading.phtml'); ?>
  65. <?php echo $this->getContent(); ?>
  66. <?php } ?>
  67. <div class="clearfix"></div>
  68. <?php
  69. if ($this->settings['enable_recently_viewed_listings']) {
  70. echo $this->action('recently-viewed', 'browse', 'listings');
  71. }
  72. ?>
  73. </div>
  74. <!-- end container fluid -->
  75. </div>
  76. <footer>
  77. <div class="container">
  78. <!-- footer adverts -->
  79. <?php
  80. $advert = $this->advert()->findBySection('footer', false, array($parentId));
  81. if ($advert !== null) {
  82. ?>
  83. <p class="text-center">
  84. <?php echo $this->advert($advert)->display(); ?>
  85. </p>
  86. <?php } ?>
  87. <div class="col-sm-5 col-xs-12">
  88. <div>
  89. Powered by <a href="http://www.phpprobid.com/" target="_blank">PHP Pro Bid</a>.
  90. &copy;<?php echo date('Y'); ?> Online Ventures Software
  91. </div>
  92. <?php if ($this->settings['enable_social_network_links']) { ?>
  93. <div class="social">
  94. <?php echo $this->social()->clearListing()->display(); ?>
  95. </div>
  96. <?php } ?>
  97. </div>
  98. <div class="col-sm-7 col-xs-12">
  99. <?php
  100. $contentSectionsService = $this->contentSections()->getContentSections();
  101. $contentSections = $this->contentSections(
  102. $contentSectionsService->getTable()
  103. ->select()
  104. ->where('parent_id IS NULL')
  105. ->order('order_id ASC')
  106. );
  107. ?>
  108. <!-- these links are only temporary - will alter all of this while in beta -->
  109. <ul class="links">
  110. <?php
  111. /** @var \Ppb\Db\Table\Row\ContentSection $section */
  112. foreach ($contentSections as $section) {
  113. ?>
  114. <li>
  115. &nbsp;
  116. <a href="<?php echo $this->url($section->link()); ?>">
  117. <?php echo $this->_($section['name']); ?>
  118. </a>
  119. </li>
  120. <?php } ?>
  121. </ul>
  122. <?php if ($this->settings['newsletter_subscription_box']) { ?>
  123. <div class="box-newsletter-subscription text-right hidden-xs">
  124. <?php echo $this->partial('partials/newsletter-subscription.phtml'); ?>
  125. </div>
  126. <?php } ?>
  127. </div>
  128. </div>
  129. </footer>
  130. <div class="loading-modal"></div>
  131. <!-- cookie usage confirmation helper -->
  132. <?php echo $this->cookieUsage(); ?>
  133. <!-- Scroll to Top -->
  134. <a class="scroll-top" style="display: none; ">&#8679;</a>
  135. <?php
  136. $this->script()->addBodyCode('<script src="' . $this->themeFolder . '/js/all.js" type="text/javascript"></script>');
  137. ?>
  138. <!-- client side scripts [loaded in bootstrap] -->
  139. <?php echo $this->script()->displayBodyCode(); ?>
  140. </body>
  141. </html>