Bugzilla – Attachment 10112 Details for
Bug 7570
Add item availability status to cart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7570 - Add Item availability status to cart.
SIGNED-OFF-Bug-7570---Add-Item-availability-status.patch (text/plain), 4.34 KB, created by
Michael Davis
on 2012-06-10 14:05:04 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7570 - Add Item availability status to cart.
Filename:
MIME Type:
Creator:
Michael Davis
Created:
2012-06-10 14:05:04 UTC
Size:
4.34 KB
patch
obsolete
>From cfaed229100480041e8971c3c24bfa02d30a0144 Mon Sep 17 00:00:00 2001 >From: Meenakshi.R <meenakshi.r@osslabs.biz> >Date: Fri, 8 Jun 2012 11:09:58 +0530 >Subject: [PATCH] [SIGNED-OFF] Bug 7570 - Add Item availability status to cart. > > Added Item availability status to cart(Location table cell). > >Changes: >-opac/opac-basket.pl: >Added code to show In transmit status and modified @items to call "GetItemsInfo" instead of "GetItemsLocationInfo" to get accurate avalibility status. >-koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt: >Added code for showing availibility staus in opac-basket page and in "More details" link. > >Test Cases: >-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. > >Signed-off-by: Michael Davis <m.r.davis@cranfield.ac.uk> >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt | 6 ++++-- > opac/opac-basket.pl | 13 ++++++++++++- > 2 files changed, 16 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt >index c4d40ed..71874cb 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt >@@ -308,13 +308,14 @@ function enableCheckboxActions(){ > </tr>[% END %] > > <tr> >- <th scope="row">Location(s)</th> >+ <th scope="row">Location(s)(Status)</th> > <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] > <li> > <strong>[% ITEM_RESULT.homebranch %]</strong>[% 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 %]) > </li> > [% END %]</ul>[% ELSE %]This record has no items.[% END %]</td> > </tr> >@@ -353,7 +354,7 @@ function enableCheckboxActions(){ > <th>Title</th> > <th>Author</th> > <th>Year</th> >- <th>Location</th> >+ <th>Location(Status)</th> > </tr></thead> > > [% 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 %]) > </li> > [% END %]</ul>[% ELSE %]This record has no items.[% END %]</td> > </tr> >diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl >index e71c8f1..cf75eb7 100755 >--- a/opac/opac-basket.pl >+++ b/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; >-- >1.7.2.5
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 7570
:
9874
|
9878
|
9907
|
9914
|
9918
|
9952
|
9978
| 10112 |
10113
|
10115