Bug 17367 - Showing all items must keep show holdings tab in OPAC details
Summary: Showing all items must keep show holdings tab in OPAC details
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-28 12:24 UTC by Fridolin Somers
Modified: 2017-06-15 19:48 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17367 - Showing all items must keep show holdings tab in OPAC details (1.94 KB, patch)
2016-09-28 12:57 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 17367 - Showing all items must keep show holdings tab in OPAC details (1.99 KB, patch)
2016-10-11 13:47 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 17367 - Showing all items must keep show holdings tab in OPAC details (2.04 KB, patch)
2016-10-14 14:01 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2016-09-28 12:24:01 UTC
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.
Comment 1 Fridolin Somers 2016-09-28 12:57:19 UTC
Created attachment 55886 [details] [review]
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
Comment 2 delaye 2016-10-11 10:00:52 UTC
i test the patch with de biblibre sandbox N°7
but the system preference opacSerialDefaultTab does not work
and  the enabling this system preference hide the link "Click here to view them all" in the tab "Holdings"
Comment 3 sandboxes@biblibre.com 2016-10-11 10:44:10 UTC
Patch tested with a sandbox, by Juliette <juliette.levast@iepg.fr>
Comment 4 sandboxes@biblibre.com 2016-10-11 13:47:29 UTC
Created attachment 56193 [details] [review]
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>
Comment 5 Nick Clemens 2016-10-14 14:01:30 UTC
Created attachment 56541 [details] [review]
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>
Comment 6 Nick Clemens 2016-10-14 14:03:13 UTC
I don't really like the viewalitems as a URL parameter, page refreshes don't revert to the original view, but that is more a comment saying this page would be a good candidate for a js render/Rest API call, but that's a different bug.

Nice work Frido!
Comment 7 Brendan Gallagher 2016-10-17 23:48:12 UTC
Pushed to Master - Should be in the November 16.11 Release.  Thanks!
Comment 8 Frédéric Demians 2016-10-22 12:53:07 UTC
Pushed in 16.05. Will be in 16.05.05.
Comment 9 Julian Maurice 2016-10-24 10:34:46 UTC
Pushed in 3.22.x, will be in 3.22.12
Comment 10 Fridolin Somers 2017-06-15 19:48:34 UTC
(In reply to Nick Clemens from comment #6)
> I don't really like the viewalitems as a URL parameter, page refreshes don't
> revert to the original view, but that is more a comment saying this page
> would be a good candidate for a js render/Rest API call, but that's a
> different bug.

Indeed, REST API would be pretty cool.
Maybe with a paginated JS DataTable.