Bug 11256: Opac: Set a number of items to display on a biblio detail page.
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 15 Nov 2013 11:02:53 +0000 (12:02 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 21 Feb 2014 18:34:27 +0000 (18:34 +0000)
commit31b732b8300d8e9fe953cac3ab50f367f3fbe376
tree9792f60ab0a5de8cf89c1690e61040f0cb283788
parent36eac129f7fdab89ffd77ba5f3bd3add688deedc
Bug 11256: Opac: Set a number of items to display on a biblio detail page.

Currently, the number of items to display is hardcoded (50).
But the perl script loads all items before to check if the number of
items is oversized.

This patch adds a new pref OpacMaxItemsToDisplay (default to 50). If the
*total* number of items for a biblio is greater, no item is displayed
and a link allows to display all items.

Test plan:
1/ search a biblio with many items
2/ set the pref according the number of items you want to display
3/ verify the items are not displayed if the number of items is greater
the pref value
4/ enable the OpacSeparateHoldings pref and verify the items are
displayed in different tabs (if items have different locations).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
opac/opac-detail.pl