Description
Martin Renvoize (ashimema)
2023-01-24 15:26:01 UTC
Created attachment 145618 [details] [review] Bug 32711: Add biblio details to modal This patch adds biblio details to the self-checkout modal. As part of this we add 'biblio' to the x-koha-embed option on the public items endpoint, clone the js-biblio-format include from the staff client adapting it slightly for OPAC use along the way and also import escape_str and escapeHtml from staff to opac too. Created attachment 145619 [details] [review] Bug 32711: Add 'public_read_list' appropriately We're exposing biblio (and thus biblioitem) to the public API now and as such we need to explisitely list which fields to include in the response when called on teh public api. Created attachment 145787 [details] [review] Bug 32711: Add biblio details to modal This patch adds biblio details to the self-checkout modal. As part of this we add 'biblio' to the x-koha-embed option on the public items endpoint, clone the js-biblio-format include from the staff client adapting it slightly for OPAC use along the way and also import escape_str and escapeHtml from staff to opac too. Signed-off-by: David Nind <david@davidnind.com> Created attachment 145788 [details] [review] Bug 32711: Add 'public_read_list' appropriately We're exposing biblio (and thus biblioitem) to the public API now and as such we need to explisitely list which fields to include in the response when called on teh public api. Signed-off-by: David Nind <david@davidnind.com> This is a nice enhancement to this feature! The only thing I noticed is that if an item doesn't have a call number (maybe not an issue for production libraries?), then it displays "null" in the call number column. Maybe this could be better displayed as either just an empty cell or as "-"? Testing notes (using KTD): 1. Apply bug 30979, updatedatabase, flush_memcached, restart_all. 2. Enable OpacTrustedCheckout system preference. 3. Go to the OPAC home page. 4. Login as a patron (in this case I used koha). 5. Click the "Self checkout" option after Cart and Lists. 6. A window pops up asking you to enter a barcode. 7. Enter a barcode for an item that is available, for example: 39999000006094 ==> Message should say: "Item '39999000006094' was checked out". ==> Next is an input box to enter another barcode. ==> The table listing items checked has columns for Barcode and Due date. ==> And then there are Submit and Close buttons at the bottom. 8. Apply the patches for this bug, flush_memcached and restart_all. 9. Repeat steps 5-7 and checkout another item, for example: 39999000011418 ==> The table listing items checked out now has two additional columns - Title and Call number. Moving this to BLOCKED for now as we are waiting for SO on the dependent bug 30979 Created attachment 150984 [details] [review] Bug 32711: Add biblio details to modal This patch adds biblio details to the self-checkout modal. As part of this we add 'biblio' to the x-koha-embed option on the public items endpoint, clone the js-biblio-format include from the staff client adapting it slightly for OPAC use along the way and also import escape_str and escapeHtml from staff to opac too. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 150985 [details] [review] Bug 32711: Add 'public_read_list' appropriately We're exposing biblio (and thus biblioitem) to the public API now and as such we need to explisitely list which fields to include in the response when called on the public api. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 150986 [details] [review] Bug 32711: Fix biblio embeds We need to drop the embed part of the args we pass to biblioitem else we end up with some very strange behaviours on the acquisitions endpoint. Signed-off-by: Silvia Meakins <smeakins@eso.org> Created attachment 151262 [details] [review] Bug 32711: Add biblio details to modal This patch adds biblio details to the self-checkout modal. As part of this we add 'biblio' to the x-koha-embed option on the public items endpoint, clone the js-biblio-format include from the staff client adapting it slightly for OPAC use along the way and also import escape_str and escapeHtml from staff to opac too. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 151263 [details] [review] Bug 32711: Add 'public_read_list' appropriately We're exposing biblio (and thus biblioitem) to the public API now and as such we need to explisitely list which fields to include in the response when called on the public api. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 151264 [details] [review] Bug 32711: Fix biblio embeds We need to drop the embed part of the args we pass to biblioitem else we end up with some very strange behaviours on the acquisitions endpoint. Signed-off-by: Silvia Meakins <smeakins@eso.org> Created attachment 152800 [details] [review] Bug 32711: Add biblio details to modal This patch adds biblio details to the self-checkout modal. As part of this we add 'biblio' to the x-koha-embed option on the public items endpoint, clone the js-biblio-format include from the staff client adapting it slightly for OPAC use along the way and also import escape_str and escapeHtml from staff to opac too. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 152801 [details] [review] Bug 32711: Add 'public_read_list' appropriately We're exposing biblio (and thus biblioitem) to the public API now and as such we need to explisitely list which fields to include in the response when called on the public api. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 152802 [details] [review] Bug 32711: Fix biblio embeds We need to drop the embed part of the args we pass to biblioitem else we end up with some very strange behaviours on the acquisitions endpoint. Signed-off-by: Silvia Meakins <smeakins@eso.org> Created attachment 153468 [details] [review] Bug 32711: Add biblio details to modal This patch adds biblio details to the self-checkout modal. As part of this we add 'biblio' to the x-koha-embed option on the public items endpoint, clone the js-biblio-format include from the staff client adapting it slightly for OPAC use along the way and also import escape_str and escapeHtml from staff to opac too. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 153469 [details] [review] Bug 32711: Add 'public_read_list' appropriately We're exposing biblio (and thus biblioitem) to the public API now and as such we need to explisitely list which fields to include in the response when called on the public api. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 153470 [details] [review] Bug 32711: Fix biblio embeds We need to drop the embed part of the args we pass to biblioitem else we end up with some very strange behaviours on the acquisitions endpoint. Signed-off-by: Silvia Meakins <smeakins@eso.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed to master for 23.11. Nice work everyone, thanks! Depends on Bug 30979 not in 23.05.x |