diff --git a/module/VuFind/src/VuFind/Controller/BrowseController.php b/module/VuFind/src/VuFind/Controller/BrowseController.php index a7576dd4f4df8cf17b638a5df2c5e82a29520fdc..0b4adcf636d2a593b3ba0f1d870dfe2bd4b9fce1 100644 --- a/module/VuFind/src/VuFind/Controller/BrowseController.php +++ b/module/VuFind/src/VuFind/Controller/BrowseController.php @@ -356,7 +356,7 @@ class BrowseController extends AbstractBase 'query_field' => 'callnumber-first', 'facet_field' => 'callnumber-subject' ]; - $view->searchParams = []; + $view->searchParams = ['sort' => 'callnumber-sort']; return $this->performSearch($view); } @@ -378,6 +378,7 @@ class BrowseController extends AbstractBase ]; } $view->categoryList = $categoryList; + $view->query_field = 'dewey'; if ($this->params()->fromQuery('findby')) { $secondaryList = $this->quoteValues( $this->getFacetList( @@ -397,6 +398,7 @@ class BrowseController extends AbstractBase 'query_field' => 'dewey-tens', 'facet_field' => 'dewey-ones' ]; + $view->searchParams = ['sort' => 'dewey-sort']; } return $this->performSearch($view); } diff --git a/themes/bootstrap3/templates/browse/home.phtml b/themes/bootstrap3/templates/browse/home.phtml index 4533145aa2da969d69b9d11297e72ac20d39bb38..fff3aed7b65ada5f97829e515a9484d749617d59 100644 --- a/themes/bootstrap3/templates/browse/home.phtml +++ b/themes/bootstrap3/templates/browse/home.phtml @@ -61,7 +61,7 @@ <? endif; ?> </a> <? if($viewRecord): ?> - <a class="list-group-item view-record" href="<?=$SEARCH_BASE ?>?lookfor=<? if ($this->filter): ?>&filter[]=<?=urlencode($this->filter) ?>%3A<?=str_replace('+AND+','&filter[]=', urlencode($secondary['value'])) ?><? endif; ?>&filter[]=<?=$this->browse()->getSolrField($this->currentAction) ?>%3A[* TO *]"><?=$this->transEsc('View Records') ?></a> + <a class="list-group-item view-record" href="<?=$SEARCH_BASE ?>?lookfor=<? if ($this->filter): ?>&filter[]=<?=urlencode($this->filter) ?>%3A<?=str_replace('+AND+','&filter[]=', urlencode($secondary['value'])) ?><? endif; ?>&filter[]=<?=$this->browse()->getSolrField($this->currentAction) ?>%3A[* TO *]<? if($this->query_field == 'dewey'):?>&sort=dewey-sort<?endif;?>"><?=$this->transEsc('View Records') ?></a> <? endif; ?> <? endforeach; ?> </div>