Skip to content
Snippets Groups Projects
Commit ed93d99a authored by Demian Katz's avatar Demian Katz
Browse files

Fixed bug in CollectionList tab plugin (related to refactoring of search...

Fixed bug in CollectionList tab plugin (related to refactoring of search templates to use separate params/results variables).
parent 23c797c4
No related merge requests found
......@@ -72,6 +72,16 @@ class CollectionList extends AbstractBase
return 'Collection Items';
}
/**
* Get the current search parameters.
*
* @return \VuFind\Search\SolrCollection\Params
*/
public function getParams()
{
return $this->getResults()->getParams();
}
/**
* Get the processed search results.
*
......
......@@ -4,6 +4,8 @@
// Get search results
$results = $this->tab->getResults();
$params = $this->tab->getParams();
$searchDetails = array('results' => $results, 'params' => $params);
?>
<? if (($recordTotal = $results->getResultTotal()) > 0): // only display these at very top if we have results ?>
<? foreach ($results->getRecommendations('top') as $current): ?>
......@@ -14,16 +16,16 @@
<? if (!isset($this->skipTotalCount)): ?>
<?=$this->transEsc('of')?> <strong><?=$recordTotal?></strong> <?=$this->transEsc('Items')?>
<? endif; ?>
<?=$this->render('search/controls/sort.phtml', array('results' => $results))?>
<?=$this->render('search/controls/view.phtml', array('results' => $results))?>
<?=$this->render('search/controls/sort.phtml', $searchDetails)?>
<?=$this->render('search/controls/view.phtml', $searchDetails)?>
<div class="paginationTop">
<?=$this->paginationControl($results->getPaginator(), 'Sliding', 'search/pagination.phtml', array('results' => $results))?>
</div>
<div class="clearer"></div>
<form method="post" name="bulkActionForm" action="<?=$this->url('cart-home')?>">
<?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', array('results' => $results, 'idPrefix' => ''))?>
<?=$this->render('search/list-' . $results->getParams()->getView() . '.phtml', array('results' => $results))?>
<?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', array('results' => $results, 'idPrefix' => 'bottom_'))?>
<?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', $searchDetails + array('idPrefix' => ''))?>
<?=$this->render('search/list-' . $results->getParams()->getView() . '.phtml', $searchDetails)?>
<?=$this->context($this)->renderInContext('search/bulk-action-buttons.phtml', $searchDetails + array('idPrefix' => 'bottom_'))?>
<?=$this->paginationControl($results->getPaginator(), 'Sliding', 'search/pagination.phtml', array('results' => $results))?>
</form>
<? else: ?>
......
......@@ -4,6 +4,8 @@
// Get search results
$results = $this->tab->getResults();
$params = $this->tab->getParams();
$searchDetails = array('results' => $results, 'params' => $params);
?>
<? if (($recordTotal = $results->getResultTotal()) > 0): // only display these at very top if we have results ?>
<p>
......@@ -11,7 +13,7 @@
<strong><?=$results->getStartRecord()?></strong> - <strong><?=$results->getEndRecord()?></strong>
<?=$this->transEsc('of')?> <strong><?=$recordTotal?></strong> <?=$this->transEsc('Items')?>
</p>
<?=$this->render('search/list-' . $results->getParams()->getView() . '.phtml', array('results' => $results))?>
<?=$this->render('search/list-' . $results->getParams()->getView() . '.phtml', $searchDetails)?>
<?=$this->paginationControl($results->getPaginator(), 'Sliding', 'search/pagination.phtml', array('results' => $results))?>
<? else: ?>
<?=$this->transEsc('collection_empty')?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment