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

Make paging of favorites lists configurable.

- Thanks to Debbie Lawlor for most of the development work.
parent a59f04e9
Branches
Tags
No related merge requests found
......@@ -1424,6 +1424,10 @@ comments = enabled
; create. If you change this to a more restrictive option, it is your responsibility
; to update the user_list database table to update the status of existing lists.
lists = enabled
; The following two settings are equivalent to default_limit / limit_options in
; searches.ini, but used to control the page sizes of lists of favorites:
lists_default_limit = 20
;lists_limit_options = 10,20,40,60,80,100
; Tags may be "enabled" or "disabled" (default = "enabled")
; When disabling tags, don't forget to also turn off tag search in searches.ini.
tags = enabled
......
......@@ -52,6 +52,13 @@ class Options extends \VuFind\Search\Base\Options
'title' => 'sort_title', 'author' => 'sort_author',
'year DESC' => 'sort_year', 'year' => 'sort_year asc'
];
$config = $configLoader->get('config');
if (isset($config->Social->lists_default_limit)) {
$this->defaultLimit = $config->Social->lists_default_limit;
}
if (isset($config->Social->lists_limit_options)) {
$this->limitOptions = explode(',', $config->Social->lists_limit_options);
}
}
/**
......
......@@ -52,6 +52,7 @@
<? if ($recordTotal > 0): ?>
<div class="resulthead">
<div class="pull-right flip">
<?=$this->render('search/controls/limit.phtml')?>
<?=$this->render('search/controls/sort.phtml')?>
</div>
</div>
......
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