From 3f6f5e077e70f1a6f43c11c99e85c35cbe959853 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Wed, 15 Oct 2014 13:48:04 -0400 Subject: [PATCH] Bootstrap3 fix (showCart not implemented yet, see searchtools pull request). Style fix in CombinedController.php --- module/VuFind/src/VuFind/Controller/CombinedController.php | 2 +- themes/bootstrap3/templates/combined/results-list.phtml | 2 +- themes/bootstrap3/templates/search/list-list.phtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/VuFind/src/VuFind/Controller/CombinedController.php b/module/VuFind/src/VuFind/Controller/CombinedController.php index efb032d0f55..32b7a6027fd 100644 --- a/module/VuFind/src/VuFind/Controller/CombinedController.php +++ b/module/VuFind/src/VuFind/Controller/CombinedController.php @@ -160,7 +160,7 @@ class CombinedController extends AbstractSearch $currentOptions = $options->get($current); $supportsCartOptions[] = $currentOptions->supportsCart(); if ($currentOptions->supportsCart()) { - $supportsCart = true; + $supportsCart = true; } list($controller, $action) = explode('-', $currentOptions->getSearchAction()); diff --git a/themes/bootstrap3/templates/combined/results-list.phtml b/themes/bootstrap3/templates/combined/results-list.phtml index de2d54fa7c1..6a0dee49038 100644 --- a/themes/bootstrap3/templates/combined/results-list.phtml +++ b/themes/bootstrap3/templates/combined/results-list.phtml @@ -70,7 +70,7 @@ 'results' => $results, 'params' => $params ); - if(isset($this->showCartControls) && !$this->showCartControls) { + if(!isset($this->showCartControls) || !$this->showCartControls) { $viewParams['hideCartControls'] = true; } ?> diff --git a/themes/bootstrap3/templates/search/list-list.phtml b/themes/bootstrap3/templates/search/list-list.phtml index db6556a5c01..1f444ad6675 100644 --- a/themes/bootstrap3/templates/search/list-list.phtml +++ b/themes/bootstrap3/templates/search/list-list.phtml @@ -1,5 +1,5 @@ <? if (!isset($this->indexStart)) $this->indexStart = 0; ?> -<? $showCheckboxes = (isset($this->showCartControls) && $this->showCartControls) ?> +<? $showCheckboxes = !isset($this->hideCartControls) && $this->cart()->isActive() ?> <? $i = $this->indexStart; foreach ($this->results->getResults() as $current): $recordNumber = $this->results->getStartRecord()+$i-$this->indexStart; ?> <div id="result<?=$i++ ?>" class="row result clearfix"> -- GitLab