Bugzilla – Attachment 96104 Details for
Bug 24192
Show host record items in cart and list in staff interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24192: Show host record items in basket/shelves
Bug-24192-Show-host-record-items-in-basketshelves.patch (text/plain), 5.52 KB, created by
Julian Maurice
on 2019-12-09 16:14:02 UTC
(
hide
)
Description:
Bug 24192: Show host record items in basket/shelves
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2019-12-09 16:14:02 UTC
Size:
5.52 KB
patch
obsolete
>From 46aa4e2163f0d7d2d91def67cc7a0388a79d05d6 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >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 @@ > </strong> > [% ITEM_RESULT.branchname | html %] > <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span> >+ [% IF ITEM_RESULT.enumchron %] >+ .- [% ITEM_RESULT.enumchron | html %] >+ [% END %] > </span> > </div> > [% 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 @@ > <td>[% itemsloo.dateadded | $KohaDates%]</td> > <td> > <ul> >- [% FOREACH result IN itemsloo.ITEM_RESULTS %] >+ [% FOREACH item IN itemsloo.ITEM_RESULTS %] > <li> >- [% result.holdingbranch | html %] >- [% IF ( result.location_intranet ) %]<span class="shelvingloc">[% result.location_intranet | html %]</span>[% END %] >- [% IF ( result.itemcallnumber ) %] >- [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% result.itemcallnumber |uri %]%22">[% result.itemcallnumber | html %]</a>] >+ [% item.branchname | html %] >+ [% IF ( item.location ) %]<span class="shelvingloc">[% AuthorisedValues.GetByCode('LOC', item.location) | html %]</span>[% END %] >+ [% IF ( item.itemcallnumber ) %] >+ [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% item.itemcallnumber |uri %]%22">[% item.itemcallnumber | html %]</a>] >+ [% END %] >+ [% IF item.enumchron %] >+ .- [% item.enumchron | html %] > [% END %] > </li> > [% END %] >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index 6665c91c2a..325daea63c 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -296,8 +296,11 @@ if ( $op eq 'view' ) { > } > > # Getting items infos for location display >- my @items_infos = &GetItemsLocationInfo( $biblionumber ); >- $this_item->{'ITEM_RESULTS'} = \@items_infos; >+ my @item_results = C4::Items::GetItemsInfo($biblionumber); >+ unless (@item_results) { >+ @item_results = C4::Items::GetHostItemsInfo($record); >+ } >+ $this_item->{'ITEM_RESULTS'} = \@item_results; > $this_item->{biblionumber} = $biblionumber; > push @items, $this_item; > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24192
:
96104
|
143624
|
147976