Bug 11256

Summary: Set a number of items to display on a biblio detail page
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle, mathsabypro, veron, ztajoli
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 23024    
Attachments: Bug 11256: Opac: Set a number of items to display on a biblio detail page.
Bug 11256: Opac: Set a number of items to display on a biblio detail page.
Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap
Bug 11256: Opac: Set a number of items to display on a biblio detail page.
Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap
Bug 11256: Opac: Set a number of items to display on a biblio detail page.
Bug 11256: Opac: Set a number of items to display on a biblio detail page - bootstrap

Description Jonathan Druart 2013-11-15 11:11:15 UTC
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.
Comment 1 Jonathan Druart 2013-11-15 11:12:50 UTC Comment hidden (obsolete)
Comment 2 Mathieu Saby 2013-11-15 11:45:46 UTC
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
Comment 3 Marc Véron 2014-02-17 17:38:33 UTC
Wanted to test, Patch does not apply.
Comment 4 Jonathan Druart 2014-02-18 09:10:53 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2014-02-18 13:08:54 UTC
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..."
Comment 6 Jonathan Druart 2014-02-18 13:14:32 UTC
Hello Marc,
The patch does not include changes for the bootstrap theme. I am going to provide a follow-up.
Comment 7 Jonathan Druart 2014-02-18 13:28:39 UTC Comment hidden (obsolete)
Comment 8 Chris Cormack 2014-02-18 21:56:17 UTC Comment hidden (obsolete)
Comment 9 Chris Cormack 2014-02-18 21:56:35 UTC Comment hidden (obsolete)
Comment 10 Kyle M Hall 2014-02-21 13:53:25 UTC
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>
Comment 11 Kyle M Hall 2014-02-21 13:53:30 UTC
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>
Comment 12 Galen Charlton 2014-02-21 18:45:08 UTC
Pushed to master.  Thanks, Jonathan!