From d17d135c37774b42817e6517fe97246f3ae5252a Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Wed, 15 Oct 2014 11:32:29 -0400 Subject: [PATCH] Remove bulk code. --- .../src/VuFind/Controller/CombinedController.php | 12 ++---------- .../bootstrap3/templates/combined/results-list.phtml | 3 +-- themes/bootstrap3/templates/combined/results.phtml | 5 +---- .../templates/combined/stack-distributed.phtml | 2 -- .../bootstrap3/templates/combined/stack-left.phtml | 2 -- .../bootstrap3/templates/combined/stack-right.phtml | 2 -- themes/bootstrap3/templates/search/list-list.phtml | 7 +------ themes/bootstrap3/templates/search/results.phtml | 8 -------- 8 files changed, 5 insertions(+), 36 deletions(-) diff --git a/module/VuFind/src/VuFind/Controller/CombinedController.php b/module/VuFind/src/VuFind/Controller/CombinedController.php index ef04476b8fc..8331340602f 100644 --- a/module/VuFind/src/VuFind/Controller/CombinedController.php +++ b/module/VuFind/src/VuFind/Controller/CombinedController.php @@ -109,10 +109,7 @@ class CombinedController extends AbstractSearch 'searchClassId' => $searchClassId, 'currentSearch' => $settings, 'showCartControls' => $currentOptions->supportsCart() - && $cart->isActive(), - 'showBulkOptions' => $currentOptions->supportsCart() - && isset($general->Site->showBulkOptions) - && $general->Site->showBulkOptions + && $cart->isActive() ); $html = $this->getViewRenderer()->render( 'combined/results-list.phtml', @@ -194,9 +191,6 @@ class CombinedController extends AbstractSearch $placement = 'distributed'; } - // Get default config for showBulkOptions - $settings = $this->getServiceLocator()->get('VuFind\Config')->get('config'); - // Build view model: return $this->createViewModel( array( @@ -207,9 +201,7 @@ class CombinedController extends AbstractSearch 'placement' => $placement, 'results' => $results, 'supportsCart' => $supportsCart, - 'supportsCartOptions' => $supportsCartOptions, - 'showBulkOptions' => isset($settings->Site->showBulkOptions) - && $settings->Site->showBulkOptions + 'supportsCartOptions' => $supportsCartOptions ) ); } diff --git a/themes/bootstrap3/templates/combined/results-list.phtml b/themes/bootstrap3/templates/combined/results-list.phtml index fa1f250eee0..6b5f7ee54cb 100644 --- a/themes/bootstrap3/templates/combined/results-list.phtml +++ b/themes/bootstrap3/templates/combined/results-list.phtml @@ -69,8 +69,7 @@ $viewParams = array( 'results' => $results, 'params' => $params, - 'showCartControls' => $this->showCartControls, - 'showBulkOptions' => $this->showBulkOptions + 'showCartControls' => $this->showCartControls ); ?> <?=$this->render('search/list-' . $viewType . '.phtml', $viewParams)?> diff --git a/themes/bootstrap3/templates/combined/results.phtml b/themes/bootstrap3/templates/combined/results.phtml index e2988b6daac..68f85321dfe 100644 --- a/themes/bootstrap3/templates/combined/results.phtml +++ b/themes/bootstrap3/templates/combined/results.phtml @@ -36,8 +36,6 @@ // Disable cart if appropriate: $this->showCartControls = $this->supportsCart && $this->cart()->isActive(); - // Disable bulk options if appropriate: - $this->showBulkOptions = $this->supportsCart && $this->showBulkOptions; // Load Javascript dependencies into header: $this->headScript()->appendFile("check_item_statuses.js"); @@ -64,8 +62,7 @@ 'searchClassId' => $searchClassId, 'combinedResults' => $this->combinedResults, 'supportsCartOptions' => $this->supportsCartOptions, - 'showCartControls' => $this->showCartControls, - 'showBulkOptions' => $this->showBulkOptions + 'showCartControls' => $this->showCartControls ); ?> <?=$this->context($this)->renderInContext('combined/stack-'.$placement.'.phtml', $viewParams)?> diff --git a/themes/bootstrap3/templates/combined/stack-distributed.phtml b/themes/bootstrap3/templates/combined/stack-distributed.phtml index 6344f61f376..d0634162e16 100644 --- a/themes/bootstrap3/templates/combined/stack-distributed.phtml +++ b/themes/bootstrap3/templates/combined/stack-distributed.phtml @@ -18,8 +18,6 @@ $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); // Disable cart if appropriate: $viewParams['showCartControls'] = $this->supportsCartOptions[$columnIndex] && $this->showCartControls; - // Disable bulk options if appropriate: - $viewParams['showBulkOptions'] = $this->supportsCartOptions[$columnIndex] && $this->showBulkOptions; ?> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> diff --git a/themes/bootstrap3/templates/combined/stack-left.phtml b/themes/bootstrap3/templates/combined/stack-left.phtml index 66666fd86f2..803cd3fc9fc 100644 --- a/themes/bootstrap3/templates/combined/stack-left.phtml +++ b/themes/bootstrap3/templates/combined/stack-left.phtml @@ -11,8 +11,6 @@ $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); // Disable cart if appropriate: $viewParams['showCartControls'] = $this->showCartControls; - // Disable bulk options if appropriate: - $viewParams['showBulkOptions'] = $this->showBulkOptions; ?> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> diff --git a/themes/bootstrap3/templates/combined/stack-right.phtml b/themes/bootstrap3/templates/combined/stack-right.phtml index c38a48f17b7..adeb4ee29e8 100644 --- a/themes/bootstrap3/templates/combined/stack-right.phtml +++ b/themes/bootstrap3/templates/combined/stack-right.phtml @@ -11,8 +11,6 @@ $viewParams = array('searchClassId' => $searchClassId, 'currentSearch' => $currentSearch); // Disable cart if appropriate: $viewParams['showCartControls'] = $this->showCartControls; - // Disable bulk options if appropriate: - $viewParams['showBulkOptions'] = $this->showBulkOptions; ?> <div id="combined_<?=$this->escapeHtmlAttr($searchClassId)?>"> <? $templateSuffix = (isset($currentSearch['ajax']) && $currentSearch['ajax']) ? 'ajax' : 'list'; ?> diff --git a/themes/bootstrap3/templates/search/list-list.phtml b/themes/bootstrap3/templates/search/list-list.phtml index 624b9d9f0c6..db6556a5c01 100644 --- a/themes/bootstrap3/templates/search/list-list.phtml +++ b/themes/bootstrap3/templates/search/list-list.phtml @@ -1,16 +1,11 @@ <? if (!isset($this->indexStart)) $this->indexStart = 0; ?> -<? $showCheckboxes = (isset($this->showCartControls) && $this->showCartControls) - || (isset($this->showBulkOptions) && $this->showBulkOptions); ?> +<? $showCheckboxes = (isset($this->showCartControls) && $this->showCartControls) ?> <? $i = $this->indexStart; foreach ($this->results->getResults() as $current): $recordNumber = $this->results->getStartRecord()+$i-$this->indexStart; ?> <div id="result<?=$i++ ?>" class="row result clearfix"> <div class="col-xs-1 hidden-print<? if ($showCheckboxes): ?> checkbox<? endif; ?>"> <label> -<<<<<<< HEAD - <? if (!isset($this->hideCartControls) && $this->cart()->isActive()): ?> -======= <? if ($showCheckboxes): ?> ->>>>>>> b916700... Per column cart support checking and logic compression. <?=$this->record($current)->getCheckbox()?> <? endif; ?> <?=$recordNumber?> diff --git a/themes/bootstrap3/templates/search/results.phtml b/themes/bootstrap3/templates/search/results.phtml index dfa5837445e..318cee83371 100644 --- a/themes/bootstrap3/templates/search/results.phtml +++ b/themes/bootstrap3/templates/search/results.phtml @@ -31,15 +31,7 @@ } // Disable cart if appropriate: -<<<<<<< HEAD - if (!$this->params->getOptions()->supportsCart()) { - $this->hideCartControls = true; - } -======= $this->showCartControls = $this->params->getOptions()->supportsCart() && $this->cart()->isActive(); - // Disable bulk options if appropriate: - $this->showBulkOptions = $this->params->getOptions()->supportsCart() && $this->showBulkOptions; ->>>>>>> b916700... Per column cart support checking and logic compression. // Load Javascript dependencies into header: $this->headScript()->appendFile("check_item_statuses.js"); -- GitLab