PageRenderTime 51ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/app/cache/prod/smarty/compile/e1/42/82/e14282a36d31398d8dba97f8a2d2aad196c6a101.file.facets.tpl.php

https://bitbucket.org/tippycracker/autokraitis
PHP | 180 lines | 175 code | 5 blank | 0 comment | 32 complexity | 987acec51313c5fada8749e366f6f45c MD5 | raw file
Possible License(s): BSD-2-Clause, GPL-2.0, GPL-3.0, BSD-3-Clause, Apache-2.0
  1. <?php /* Smarty version Smarty-3.1.19, created on 2018-04-11 22:17:58
  2. compiled from "/home/autokr/domains/autokrai.kraitis.lt/public_html/themes/pos_aboss3/templates/catalog/_partials/facets.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:12263916455ace5f66bd2544-13385948%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_valid = $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. 'e14282a36d31398d8dba97f8a2d2aad196c6a101' =>
  8. array (
  9. 0 => '/home/autokr/domains/autokrai.kraitis.lt/public_html/themes/pos_aboss3/templates/catalog/_partials/facets.tpl',
  10. 1 => 1523458027,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '12263916455ace5f66bd2544-13385948',
  15. 'function' =>
  16. array (
  17. ),
  18. 'variables' =>
  19. array (
  20. 'clear_all_link' => 0,
  21. 'facets' => 0,
  22. 'facet' => 0,
  23. 'filter' => 0,
  24. '_expand_id' => 0,
  25. '_collapse' => 0,
  26. 'js_enabled' => 0,
  27. 'sort_order' => 0,
  28. ),
  29. 'has_nocache_code' => false,
  30. 'version' => 'Smarty-3.1.19',
  31. 'unifunc' => 'content_5ace5f66cc6bc3_69334451',
  32. ),false); /*/%%SmartyHeaderCode%%*/?>
  33. <?php if ($_valid && !is_callable('content_5ace5f66cc6bc3_69334451')) {function content_5ace5f66cc6bc3_69334451($_smarty_tpl) {?>
  34. <div id="search_filters">
  35. <h4 class="text-uppercase h6 hidden-sm-down"><?php echo smartyTranslate(array('s'=>'Filter By','d'=>'Shop.Theme.Actions'),$_smarty_tpl);?>
  36. </h4>
  37. <div id="_desktop_search_filters_clear_all" class="hidden-sm-down clear-all-wrapper">
  38. <button data-search-url="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['clear_all_link']->value, ENT_QUOTES, 'UTF-8');?>
  39. " class="btn btn-tertiary js-search-filters-clear-all">
  40. <i class="material-icons">&#xE14C;</i>
  41. <?php echo smartyTranslate(array('s'=>'Clear all','d'=>'Shop.Theme.Actions'),$_smarty_tpl);?>
  42. </button>
  43. </div>
  44. <?php $_smarty_tpl->tpl_vars["facet"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["facet"]->_loop = false;
  45. $_from = $_smarty_tpl->tpl_vars['facets']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  46. foreach ($_from as $_smarty_tpl->tpl_vars["facet"]->key => $_smarty_tpl->tpl_vars["facet"]->value) {
  47. $_smarty_tpl->tpl_vars["facet"]->_loop = true;
  48. ?>
  49. <?php if ($_smarty_tpl->tpl_vars['facet']->value['displayed']) {?>
  50. <section class="facet">
  51. <h1 class="h6 facet-title hidden-sm-down"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['facet']->value['label'], ENT_QUOTES, 'UTF-8');?>
  52. </h1>
  53. <?php $_smarty_tpl->tpl_vars['_expand_id'] = new Smarty_variable(mt_rand(10,100000), null, 0);?>
  54. <?php $_smarty_tpl->tpl_vars['_collapse'] = new Smarty_variable(true, null, 0);?>
  55. <?php $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["filter"]->_loop = false;
  56. $_from = $_smarty_tpl->tpl_vars['facet']->value['filters']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  57. foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) {
  58. $_smarty_tpl->tpl_vars["filter"]->_loop = true;
  59. ?>
  60. <?php if ($_smarty_tpl->tpl_vars['filter']->value['active']) {?><?php $_smarty_tpl->tpl_vars['_collapse'] = new Smarty_variable(false, null, 0);?><?php }?>
  61. <?php } ?>
  62. <div class="title hidden-md-up" data-target="#facet_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['_expand_id']->value, ENT_QUOTES, 'UTF-8');?>
  63. " data-toggle="collapse"<?php if (!$_smarty_tpl->tpl_vars['_collapse']->value) {?> aria-expanded="true"<?php }?>>
  64. <h1 class="h6 facet-title"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['facet']->value['label'], ENT_QUOTES, 'UTF-8');?>
  65. </h1>
  66. <span class="pull-xs-right">
  67. <span class="navbar-toggler collapse-icons">
  68. <i class="material-icons add">&#xE313;</i>
  69. <i class="material-icons remove">&#xE316;</i>
  70. </span>
  71. </span>
  72. </div>
  73. <?php if ($_smarty_tpl->tpl_vars['facet']->value['widgetType']!=='dropdown') {?>
  74. <ul id="facet_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['_expand_id']->value, ENT_QUOTES, 'UTF-8');?>
  75. " class="collapse<?php if (!$_smarty_tpl->tpl_vars['_collapse']->value) {?> in<?php }?>">
  76. <?php $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["filter"]->_loop = false;
  77. $_from = $_smarty_tpl->tpl_vars['facet']->value['filters']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  78. foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) {
  79. $_smarty_tpl->tpl_vars["filter"]->_loop = true;
  80. ?>
  81. <?php if ($_smarty_tpl->tpl_vars['filter']->value['displayed']) {?>
  82. <li>
  83. <label class="facet-label<?php if ($_smarty_tpl->tpl_vars['filter']->value['active']) {?> active <?php }?>">
  84. <?php if ($_smarty_tpl->tpl_vars['facet']->value['multipleSelectionAllowed']) {?>
  85. <span class="custom-checkbox">
  86. <input
  87. data-search-url="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['nextEncodedFacetsURL'], ENT_QUOTES, 'UTF-8');?>
  88. "
  89. type="checkbox"
  90. <?php if ($_smarty_tpl->tpl_vars['filter']->value['active']) {?> checked <?php }?>
  91. >
  92. <?php if (isset($_smarty_tpl->tpl_vars['filter']->value['properties']['color'])) {?>
  93. <span class="color" style="background-color:<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['properties']['color'], ENT_QUOTES, 'UTF-8');?>
  94. "></span>
  95. <?php } elseif (isset($_smarty_tpl->tpl_vars['filter']->value['properties']['texture'])) {?>
  96. <span class="color texture" style="background-image:url(<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['properties']['texture'], ENT_QUOTES, 'UTF-8');?>
  97. )"></span>
  98. <?php } else { ?>
  99. <span <?php if (!$_smarty_tpl->tpl_vars['js_enabled']->value) {?> class="ps-shown-by-js" <?php }?>><i class="material-icons checkbox-checked">&#xE5CA;</i></span>
  100. <?php }?>
  101. </span>
  102. <?php } else { ?>
  103. <span class="custom-checkbox">
  104. <input
  105. data-search-url="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['nextEncodedFacetsURL'], ENT_QUOTES, 'UTF-8');?>
  106. "
  107. type="radio"
  108. name="filter <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['facet']->value['label'], ENT_QUOTES, 'UTF-8');?>
  109. "
  110. <?php if ($_smarty_tpl->tpl_vars['filter']->value['active']) {?> checked <?php }?>
  111. >
  112. <span <?php if (!$_smarty_tpl->tpl_vars['js_enabled']->value) {?> class="ps-shown-by-js" <?php }?>><i class="material-icons checkbox-checked">&#xE5CA;</i></span>
  113. </span>
  114. <?php }?>
  115. <a
  116. href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['nextEncodedFacetsURL'], ENT_QUOTES, 'UTF-8');?>
  117. "
  118. class="_gray-darker search-link js-search-link"
  119. rel="nofollow"
  120. >
  121. <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['label'], ENT_QUOTES, 'UTF-8');?>
  122. <?php if ($_smarty_tpl->tpl_vars['filter']->value['magnitude']) {?>
  123. <span class="magnitude">(<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['magnitude'], ENT_QUOTES, 'UTF-8');?>
  124. )</span>
  125. <?php }?>
  126. </a>
  127. </label>
  128. </li>
  129. <?php }?>
  130. <?php } ?>
  131. </ul>
  132. <?php } else { ?>
  133. <form>
  134. <input type="hidden" name="order" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['sort_order']->value, ENT_QUOTES, 'UTF-8');?>
  135. ">
  136. <select name="q">
  137. <option disabled selected hidden><?php echo smartyTranslate(array('s'=>'(no filter)','d'=>'Shop.Theme'),$_smarty_tpl);?>
  138. </option>
  139. <?php $_smarty_tpl->tpl_vars["filter"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["filter"]->_loop = false;
  140. $_from = $_smarty_tpl->tpl_vars['facet']->value['filters']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  141. foreach ($_from as $_smarty_tpl->tpl_vars["filter"]->key => $_smarty_tpl->tpl_vars["filter"]->value) {
  142. $_smarty_tpl->tpl_vars["filter"]->_loop = true;
  143. ?>
  144. <?php if ($_smarty_tpl->tpl_vars['filter']->value['displayed']) {?>
  145. <option
  146. <?php if ($_smarty_tpl->tpl_vars['filter']->value['active']) {?>
  147. selected
  148. value="<?php echo htmlspecialchars($_GET['q'], ENT_QUOTES, 'UTF-8');?>
  149. "
  150. <?php } else { ?>
  151. value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['nextEncodedFacets'], ENT_QUOTES, 'UTF-8');?>
  152. "
  153. <?php }?>
  154. >
  155. <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['label'], ENT_QUOTES, 'UTF-8');?>
  156. <?php if ($_smarty_tpl->tpl_vars['filter']->value['magnitude']) {?>
  157. (<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['filter']->value['magnitude'], ENT_QUOTES, 'UTF-8');?>
  158. )
  159. <?php }?>
  160. </option>
  161. <?php }?>
  162. <?php } ?>
  163. </select>
  164. <?php if (!$_smarty_tpl->tpl_vars['js_enabled']->value) {?>
  165. <button class="ps-hidden-by-js" type="submit">
  166. <?php echo smartyTranslate(array('s'=>'Filter','d'=>'Shop.Theme.Actions'),$_smarty_tpl);?>
  167. </button>
  168. <?php }?>
  169. </form>
  170. <?php }?>
  171. </section>
  172. <?php }?>
  173. <?php } ?>
  174. </div>
  175. <?php }} ?>