From 46aa4e2163f0d7d2d91def67cc7a0388a79d05d6 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 26 Nov 2019 16:26:38 +0100 Subject: [PATCH] Bug 24192: Show host record items in basket/shelves If EasyAnalyticalRecords is enabled, and if record has no items, display host record items in baskets and lists (staff interface only) Also, show items.enumchron in both pages Test plan: 0. Login to staff interface 1. Set EasyAnalyticalRecords to "Display" 2. Create a biblio record without items 3. On the biblio record detail page, click in the menu Edit > Link to host item, and enter a valid barcode 4. Add the biblio record to your cart 5. Open your cart and verify that the linked item is displayed 6. Add the biblio record to a list 7. Open the list and verify that the linked item is displayed 8. Edit the linked item and enter something that will be saved in items.enumchron (check the biblio framework mappings, add a new item field if needed) 9. Re-open your cart and list and verify that the enumchron is shown --- basket/basket.pl | 3 +++ .../intranet-tmpl/prog/en/modules/basket/basket.tt | 3 +++ .../prog/en/modules/virtualshelves/shelves.tt | 14 +++++++++----- virtualshelves/shelves.pl | 7 +++++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/basket/basket.pl b/basket/basket.pl index 2ae309f9fe..933fce55a6 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -68,6 +68,9 @@ foreach my $biblionumber ( @bibs ) { my $marcseriesarray = GetMarcSeries ($record,$marcflavour); my $marcurlsarray = GetMarcUrls ($record,$marcflavour); my @items = GetItemsInfo( $biblionumber ); + unless (@items) { + @items = C4::Items::GetHostItemsInfo($record); + } my $hasauthors = 0; if($dat->{'author'} || @$marcauthorsarray) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index d110dcbe52..a43947b974 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -297,6 +297,9 @@ [% ITEM_RESULT.branchname | html %] [% ITEM_RESULT.location_description | html %] + [% IF ITEM_RESULT.enumchron %] + .- [% ITEM_RESULT.enumchron | html %] + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 72420dd08c..51f81075f2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -1,5 +1,6 @@ [% USE raw %] [% USE Asset %] +[% USE AuthorisedValues %] [% USE Koha %] [% USE KohaDates %] [% SET PRIVATE = 1 %] @@ -236,12 +237,15 @@ [% itemsloo.dateadded | $KohaDates%]