diff --git a/themes/bootstrap/templates/search/advanced/checkbox-filters.phtml b/themes/bootstrap/templates/search/advanced/checkbox-filters.phtml new file mode 100644 index 0000000000000000000000000000000000000000..cf8c22b72ccf6f496fa618128ddccb85e7b8c687 --- /dev/null +++ b/themes/bootstrap/templates/search/advanced/checkbox-filters.phtml @@ -0,0 +1,12 @@ +<? if (isset($this->checkboxFacets) && count($this->checkboxFacets) > 0): ?> + <fieldset> + <? foreach ($this->checkboxFacets as $current): ?> + <div class="checkboxFilter"> + <label class="checkbox"> + <input type="checkbox" name="filter[]" value="<?=$this->escapeHtml($current['filter'])?>" id="<?=$this->escapeHtml(str_replace(' ', '', $current['desc']))?>"<? if ($current['selected']): ?> checked="checked"<? endif; ?>/> + <?=$this->transEsc($current['desc'])?> + </label> + </div> + <? endforeach; ?> + </fieldset> +<?endif;?> \ No newline at end of file diff --git a/themes/bootstrap/templates/search/advanced/solr.phtml b/themes/bootstrap/templates/search/advanced/solr.phtml index 74b0572f8a2c8f144dc080e75444a7e5287c2a2d..e7723c85f5d427d37516258779fac264585fcf1f 100644 --- a/themes/bootstrap/templates/search/advanced/solr.phtml +++ b/themes/bootstrap/templates/search/advanced/solr.phtml @@ -1,5 +1,12 @@ -<? if (!empty($this->facetList)): ?> +<? if (!empty($this->facetList) || !empty($this->checkboxFacets)): ?> <p class="lead"><?=$this->transEsc('Limit To')?></p> +<? endif; ?> + +<? if (!empty($this->checkboxFacets)): ?> + <?=$this->render('search/advanced/checkbox-filters.phtml')?> +<? endif; ?> + +<? if (!empty($this->facetList)): ?> <div class="row-fluid"> <? foreach ($this->facetList as $field => $list): ?> <div class="span<?=floor(12/count($this->facetList)) ?>"> diff --git a/themes/bootstrap/templates/search/advanced/summon.phtml b/themes/bootstrap/templates/search/advanced/summon.phtml index ce28d09242d819e1630f837fb04d2ee44f346e18..3102e37bec83a8133293ec0b3d26d651104a7e3d 100644 --- a/themes/bootstrap/templates/search/advanced/summon.phtml +++ b/themes/bootstrap/templates/search/advanced/summon.phtml @@ -1,19 +1,26 @@ +<? if (!empty($this->facetList) || !empty($this->checkboxFacets)): ?> + <p class="lead"><?=$this->transEsc('Limit To')?></p> +<? endif; ?> + +<? if (!empty($this->checkboxFacets)): ?> + <?=$this->render('search/advanced/checkbox-filters.phtml')?> +<? endif; ?> + <? if (!empty($this->facetList)): ?> - <h3><?=$this->transEsc('Limit To')?></h3> <div class="row-fluid"> <? foreach ($this->facetList as $field => $list): ?> <div class="span<?=floor(12/count($this->facetList)) ?>"> <label class="displayBlock" for="limit_<?=$this->escapeHtml(str_replace(' ', '', $field))?>"><?=$this->transEsc($list['label'])?>:</label> <select class="span12" id="limit_<?=$this->escapeHtml(str_replace(' ', '', $field))?>" name="filter[]" multiple="multiple" size="10"> <? - // Sort the current facet list alphabetically; we'll use this data - // along with the foreach below to display facet options in the - // correct order. - $sorted = array(); - foreach ($list['list'] as $i => $value) { - $sorted[$i] = $value['displayText']; - } - natcasesort($sorted); + // Sort the current facet list alphabetically; we'll use this data + // along with the foreach below to display facet options in the + // correct order. + $sorted = array(); + foreach ($list['list'] as $i => $value) { + $sorted[$i] = $value['displayText']; + } + natcasesort($sorted); ?> <? foreach ($sorted as $i => $display): ?> <? $value = $list['list'][$i]; ?>