diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index b0a7da3c53191bbca5b4f23a5009cd7160d775b9..922987af7a06232384ce40fb31154f6516fab816 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -735,12 +735,15 @@ class AbstractSearch extends AbstractBase $this->params()->fromQuery('facetop', 'AND') == 'OR' ); $list = $facets[$facet]['data']['list']; + $params->activateAllFacets(); + $facetLabel = $params->getFacetLabel($facet); $view = $this->createViewModel( [ 'data' => $list, 'exclude' => $this->params()->fromQuery('facetexclude', 0), 'facet' => $facet, + 'facetLabel' => $facetLabel, 'operator' => $this->params()->fromQuery('facetop', 'AND'), 'page' => $page, 'results' => $results, diff --git a/themes/bootstrap3/templates/layout/layout.phtml b/themes/bootstrap3/templates/layout/layout.phtml index d21b224333ae02883bbe48e9f4725d486ecd33bf..dc37ae8fc8c9bbffd126fda422175d48e41c44c9 100644 --- a/themes/bootstrap3/templates/layout/layout.phtml +++ b/themes/bootstrap3/templates/layout/layout.phtml @@ -45,8 +45,11 @@ 'libphonenumber_tooshort' => 'libphonenumber_tooshort', 'libphonenumber_tooshortidd' => 'libphonenumber_tooshortidd', 'loading' => 'Loading', - 'sms_success' => 'sms_success', - 'number_thousands_separator' => ['number_thousands_separator', null, ','] + 'more' => 'more', + 'number_thousands_separator' => [ + 'number_thousands_separator', null, ',' + ], + 'sms_success' => 'sms_success' ) ); // Add libphonenumber.js strings diff --git a/themes/bootstrap3/templates/search/facet-list.phtml b/themes/bootstrap3/templates/search/facet-list.phtml index cb070b85ad5462145d2da75c246b3947bcf80b5e..97c859d65d323e21f85698c4b48e007f0a91df98 100644 --- a/themes/bootstrap3/templates/search/facet-list.phtml +++ b/themes/bootstrap3/templates/search/facet-list.phtml @@ -7,15 +7,18 @@ } $urlBase = $this->url($facetLightbox) . $results->getUrlQuery()->getParams() . '&facet=' . urlencode($this->facet) . '&facetexclude=' . $this->exclude . '&facetop=' . $this->operator; ?> +<h2><?=$this->transEsc($this->facetLabel) ?></h2> <? if (count($this->sortOptions) > 1): ?> - <label><?=$this->translate('Sort') ?></label> - <div class="btn-group"> - <? foreach ($this->sortOptions as $key=>$sort): ?> - <a href="<?=$urlBase . '&facetpage=1&facetsort=' . urlencode($key) ?>" class="btn btn-default js-facet-sort<? if($this->sort == $key): ?> active<? endif; ?>" data-sort="<?=$key ?>" data-lightbox-ignore><?=$this->translate($sort) ?></a> - <? endforeach; ?> + <div class="full-facet-sort-options"> + <label><?=$this->translate('Sort') ?></label> + <div class="btn-group"> + <? foreach ($this->sortOptions as $key=>$sort): ?> + <a href="<?=$urlBase . '&facetpage=1&facetsort=' . urlencode($key) ?>" class="btn btn-default js-facet-sort<? if($this->sort == $key): ?> active<? endif; ?>" data-sort="<?=$key ?>" data-lightbox-ignore><?=$this->translate($sort) ?></a> + <? endforeach; ?> + </div> </div> <? endif; ?> -<div class="lightbox-scroll"> +<div class="lightbox-scroll full-facets"> <? foreach ($this->sortOptions as $key=>$sort): ?> <? $active = $this->sort == $key; ?> <div class="full-facet-list list-group<? if(!$active): ?> hidden<? endif; ?>" id="facet-list-<?=$this->escapeHtmlAttr($key) ?>"> @@ -69,4 +72,4 @@ <? endforeach; ?> </div> <button class="btn btn-default lightbox-only" data-dismiss="modal"><?=$this->translate('close') ?></button> -<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, 'VuFind.lightbox_facets.setup();', 'SET'); ?> +<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '(typeof VuFind.lightbox_facets !== "undefined") && VuFind.lightbox_facets.setup();', 'SET'); ?>