diff --git a/themes/bootstrap3/templates/Recommend/SideFacets.phtml b/themes/bootstrap3/templates/Recommend/SideFacets.phtml index 7116b00d2525f83b23ea3f64b636923188eb84f4..abe370c8969da5bd8889f877423b47a00c7a55e8 100644 --- a/themes/bootstrap3/templates/Recommend/SideFacets.phtml +++ b/themes/bootstrap3/templates/Recommend/SideFacets.phtml @@ -47,8 +47,14 @@ <? if (isset($rangeFacets[$title])): ?> <?=$this->context($this)->renderInContext('Recommend/SideFacets/range-slider.phtml', ['title' => $title, 'facet' => $rangeFacets[$title]]); ?> <? else: ?> + <? $contextVars = [ + 'allowExclude' => $this->recommend->excludeAllowed($title), + 'title' => $title, + 'sortOptions' => isset($hierarchicalFacetSortOptions[$title]) ? $hierarchicalFacetSortOptions[$title] : '', + 'collapsedFacets' => $collapsedFacets + ]; ?> <? if (in_array($title, $hierarchicalFacets)): ?> - <?=$this->context($this)->renderInContext('Recommend/SideFacets/hierarchical-facet.phtml', ['title' => $title, 'sortOptions' => $hierarchicalFacetSortOptions[$title]]); ?> + <?=$this->context($this)->renderInContext('Recommend/SideFacets/hierarchical-facet.phtml', $contextVars); ?> <noscript> <? endif; ?> <? $contextVars = [ diff --git a/themes/bootstrap3/templates/Recommend/SideFacets/hierarchical-facet.phtml b/themes/bootstrap3/templates/Recommend/SideFacets/hierarchical-facet.phtml index 83c50e22aca4b514c6d61b913ea2089ad824084e..cf26f37cad77e7a7bd4a5e1839d080bb38261c3f 100644 --- a/themes/bootstrap3/templates/Recommend/SideFacets/hierarchical-facet.phtml +++ b/themes/bootstrap3/templates/Recommend/SideFacets/hierarchical-facet.phtml @@ -1,5 +1,5 @@ <? $this->headScript()->appendFile('vendor/jsTree/jstree.min.js'); ?> -<? if (!in_array($this->title, $collapsedFacets)): ?> +<? if (!in_array($this->title, $this->collapsedFacets)): ?> <? $script = <<<JS $(document).ready(function() { @@ -21,7 +21,7 @@ JS; <li id="facet_<?=$this->escapeHtml($this->title)?>" class="jstree-facet" data-facet="<?=$this->escapeHtmlAttr($this->title)?>" data-path="<?=$this->currentPath()?>" - data-exclude="<?=$allowExclude?>" + data-exclude="<?=$this->allowExclude?>" data-operator="<?=$this->recommend->getFacetOperator($this->title)?>" data-exclude-title="<?=$this->transEsc('exclude_facet')?>" data-sort="<?=isset($this->sortOptions) ? $this->sortOptions : ''?>">