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. It would be great to have a syspref for this number and not to load all items in the perl script.
Created attachment 22958 [details] [review] 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).
Good idea. Loading all the items was probably one of the cause of a performance issue we suffered from last year in serials display. Mathieu
Wanted to test, Patch does not apply.
Created attachment 25363 [details] [review] 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).
Testing Record with 6 physical items With prog theme --------------- OpacMaxItemsToDisplay > 6 OK (Displays all) OpacMaxItemsToDisplay 6 OK (Displays all) OpacMaxItemsToDisplay < 6 OK (Displays "Many-Message" + Link, Link displays all) OpacMaxItemsToDisplay 0 OK (Displays "Many-Message" + Link, Link displays all) OpacMaxItemsToDisplay (Empty) (Displays "Many-Message" + Link, Link displays all) With ccsr theme ------------------------- Same as with prog theme With bootstrap theme -------------------- OpacMaxItemsToDisplay > 6 OK (Displays all) OpacMaxItemsToDisplay 6 OK (Displays all) OpacMaxItemsToDisplay < 6 Wrong ( No physical items for this record ) OpacMaxItemsToDisplay 0 Wrong ( No physical items for this record ) OpacMaxItemsToDisplay (Empty) Wrong ( No physical items for this record ) I had first bootstrap theme active. It took me a while to find out why I got "No physical items..."
Hello Marc, The patch does not include changes for the bootstrap theme. I am going to provide a follow-up.
Created attachment 25370 [details] [review] Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap This patch adds the changes for the bootstrap theme. See test plan in the previous patch.
Created attachment 25401 [details] [review] 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>
Created attachment 25402 [details] [review] Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap This patch adds the changes for the bootstrap theme. See test plan in the previous patch. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 25534 [details] [review] 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>
Created attachment 25535 [details] [review] Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap This patch adds the changes for the bootstrap theme. See test plan in the previous patch. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master. Thanks, Jonathan!