Bug 17367 - Showing all items must keep show holdings tab in OPAC details
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 28 Sep 2016 12:49:32 +0000 (14:49 +0200)
committerFrédéric Demians <f.demians@tamil.fr>
Sat, 22 Oct 2016 13:01:04 +0000 (15:01 +0200)
commit2a62a9a18cc3a36288e6abf3586a7e606e6e07db
tree97be4d89211d575b25ba4935668e4f52e1e1430c
parentf620fbe0d9ec8c4df258dd3a35b839b466479d52
Bug 17367 - Showing all items must keep show holdings tab in OPAC details

In OPAC details page, when record as too many items (depending on syspref OpacMaxItemsToDisplay), they are not displayed in holdings tab.
You can click on link "Click here to view them all" to show them : page reloads with a new arg viewallitems=1.
Also you can choose which tab is shown by default using syspref opacSerialDefaultTab.

The bug is that when default tab is not holdings, clicking on link to show all items will show another tab. So one must reclick on holings tab to see all items.

This patch corrects by forcing holdings tab when arg viewallitems is defined.

Test plan :
- Create a serial record with more items than syspref OpacMaxItemsToDisplay (or decrease this syspref)
- Select "Subscriptions tab" for syspref opacSerialDefaultTab
- Go to opac details on this record : /cgi-bin/koha/opac-detail.pl?biblionumber=xxx
=> You see Subscriptions tab selected
- Click on Holdings tab
=> You see no items but a link "Click here to view them all"
- Click on this link
=> Without patch you see Subscriptions tab selected
=> Wih patch you see Holdings tab selected and the items

Signed-off-by: Juliette <juliette.levast@iepg.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit f1298dc7828757fe9277a5128910335d2d6c0f2c)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
opac/opac-detail.pl