@@ -, +, @@
Added Item availability status to cart(Location table cell).
-opac/opac-basket.pl:
-koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt:
-Add records to your cart with different cases like 1 record with different Item status(Lost,Avaliable,Withdrawn,etc).
-Click on your cart and see the results in a new window.
-Click on "More details" link and check the results.
---
koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt | 6 ++++--
opac/opac-basket.pl | 13 ++++++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt
@@ -308,13 +308,14 @@ function enableCheckboxActions(){
[% END %]
- Location(s) |
+ Location(s)(Status) |
[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
-
[% ITEM_RESULT.homebranch %][% IF ( ITEM_RESULT.location_opac ) %], [% ITEM_RESULT.location_opac %][% END %]
[% IF ( ITEM_RESULT.itemcallnumber ) %]
([% ITEM_RESULT.itemcallnumber %])
[% END %]
+ ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
[% END %] [% ELSE %]This record has no items.[% END %] |
@@ -353,7 +354,7 @@ function enableCheckboxActions(){
Title |
Author |
Year |
- Location |
+ Location(Status) |
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
@@ -388,6 +389,7 @@ function enableCheckboxActions(){
[% IF ( ITEM_RESULT.itemcallnumber ) %]
([% ITEM_RESULT.itemcallnumber %])
[% END %]
+ ([% INCLUDE 'item-status.inc' item = ITEM_RESULT %])
[% END %][% ELSE %]This record has no items.[% END %]
--- a/opac/opac-basket.pl
+++ a/opac/opac-basket.pl
@@ -21,7 +21,9 @@ use warnings;
use CGI;
use C4::Koha;
use C4::Biblio;
+use C4::Branch;
use C4::Items;
+use C4::Circulation;
use C4::Auth;
use C4::Output;
@@ -68,7 +70,7 @@ foreach my $biblionumber ( @bibs ) {
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
- my @items = &GetItemsLocationInfo( $biblionumber );
+ my @items = &GetItemsInfo( $biblionumber );
my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
my $hasauthors = 0;
@@ -88,6 +90,15 @@ foreach my $biblionumber ( @bibs ) {
$dat->{'even'} = 1;
}
+my $branches = GetBranches();
+ for my $itm (@items) {
+ my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber});
+ if ( defined( $transfertwhen ) && $transfertwhen ne '' ) {
+ $itm->{transfertwhen} = $transfertwhen;
+ $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname};
+ $itm->{transfertto} = $branches->{$transfertto}{branchname};
+ }
+ }
$num++;
$dat->{biblionumber} = $biblionumber;
$dat->{ITEM_RESULTS} = \@items;
--