Bugzilla – Attachment 45294 Details for
Bug 14668
Show serial enumeration in the patron's opac checkout summary
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14668 - Show serial enumeration in the checkin page and the patron's opac checkout summary
Bug-14668---Show-serial-enumeration-in-the-checkin.patch (text/plain), 14.35 KB, created by
Charles Farmer
on 2015-12-01 21:27:42 UTC
(
hide
)
Description:
Bug 14668 - Show serial enumeration in the checkin page and the patron's opac checkout summary
Filename:
MIME Type:
Creator:
Charles Farmer
Created:
2015-12-01 21:27:42 UTC
Size:
14.35 KB
patch
obsolete
>From da66f7c0ce2bed2580b7d94c21900e9f29a9c784 Mon Sep 17 00:00:00 2001 >From: charles <charles.farmer@inlibro.com> >Date: Tue, 1 Dec 2015 16:13:22 -0500 >Subject: [PATCH] Bug 14668 - Show serial enumeration in the checkin page and > the patron's opac checkout summary > >The enumchron is now displayed alongside the author name in the "Title" section of the item summary. > >TEST PLAN >========= > > 1) INTRANET > > 1) Edit an item and add something in the "h" subfield, ie: "volume #42" > 2) Check out the item to a patron > 3) In the patron page, both at the bottom of the page or in the "Check out" tab, you should see the enumchron concatenated with the title > > 2) OPAC > > 1) Search for the same patron you used earlier > 2) In the "your summary" tab, you should see the enumchron in the Title > > 3) INTRANET > > 1) Check in the item you just borrowed > 2) At check in, the enumchron should also appear in the Title. >--- > C4/Reserves.pm | 1 + > circ/circulation.pl | 33 +++++++++++++++++++--- > circ/returns.pl | 1 + > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 12 ++++++-- > .../prog/en/modules/circ/circulation.tt | 30 +++++++++++--------- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++- > opac/opac-user.pl | 1 + > svc/checkouts | 3 +- > 9 files changed, 64 insertions(+), 23 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 6ed1543..4e60a7a 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -358,6 +358,7 @@ sub GetReservesFromItemnumber { > $r->get_column('branchcode'), > $r->reserve_id(), > $r->waitingdate(), >+ $r->get_column('expirationdate'), > ); > } > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index f16475e..177d4f1 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -458,11 +458,36 @@ if ($borrowernumber) { > if ($borrowernumber) { > my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } ); > $template->param( >- holds_count => $holds->count(), >- WaitingHolds => scalar $holds->waiting(), >+ holds_count => Koha::Database->new()->schema() >+ ->resultset('Reserve') >+ ->count( { borrowernumber => $borrowernumber } ), > ); >- >- $template->param( adultborrower => 1 ) if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' ); >+ my @borrowerreserv = GetReservesFromBorrowernumber($borrowernumber); >+ >+ my @WaitingReserveLoop; >+ foreach my $num_res (@borrowerreserv) { >+ if ( $num_res->{'found'} && $num_res->{'found'} eq 'W' ) { >+ my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} ); >+ my $itemholdinfo = GetReservesFromItemNumber( $num_res->{'itemnumber'} ); >+ my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} ); >+ my %getWaitingReserveInfo; >+ $getWaitingReserveInfo{title} = $getiteminfo->{'title'}; >+ $getWaitingReserveInfo{biblionumber} = $getiteminfo->{'biblionumber'}; >+ $getWaitingReserveInfo{author} = $getiteminfo->{'author'}; >+ $getWaitingReserveInfo{itemcallnumber} = $getiteminfo->{'itemcallnumber'}; >+ $getWaitingReserveInfo{enumchron} = $getiteminfo->{'enumchron'}; >+ $getWaitingReserveInfo{reservedate} = format_date( $num_res->{'reservedate'} ); >+ $getWaitingReserveInfo{waitingat} = GetBranchName( $num_res->{'branchcode'} ); >+ $getWaitingReserveInfo{itemtype} = $itemtypeinfo->{'description'}; >+ $getWaitingReserveInfo{expirationdate} = $itemholdinfo->{'expirationdate'}; >+ $getWaitingReserveInfo{waitinghere} = 1 >+ if $num_res->{'branchcode'} eq $branch; >+ push( @WaitingReserveLoop, \%getWaitingReserveInfo ); >+ } >+ } >+ $template->param( WaitingReserveLoop => \@WaitingReserveLoop ); >+ $template->param( adultborrower => 1 ) >+ if ( $borrower->{category_type} eq 'A' || $borrower->{category_type} eq 'I' ); > } > > #title >diff --git a/circ/returns.pl b/circ/returns.pl >index 4039c75..bab6216 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -581,6 +581,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > $ri{itemtitle} = $biblio->{'title'}; > $ri{itemauthor} = $biblio->{'author'}; > $ri{itemcallnumber} = $biblio->{'itemcallnumber'}; >+ $ri{enumchron} = $item->{'enumchron'}; > $ri{itemtype} = $biblio->{'itemtype'}; > $ri{itemnote} = $biblio->{'itemnotes'}; > $ri{ccode} = $biblio->{'ccode'}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index b4b676b..20520ec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -227,7 +227,11 @@ $(document).ready(function() { > title += " " + value.subfield; > }); > >- title += "</a></span>"; >+ if ( oObj.enumchron ) { >+ title += "</a>" + " " + oObj.enumchron + "</span>"; >+ }else{ >+ title += "</a></span>"; >+ } > > if ( oObj.author ) { > title += " " + BY.replace( "_AUTHOR_", " " + oObj.author ); >@@ -489,7 +493,11 @@ $(document).ready(function() { > title += " " + value.subfield; > }); > >- title += "</a></span>"; >+ if ( oObj.enumchron ) { >+ title += "</a>" + " " + oObj.enumchron + "</span>"; >+ }else{ >+ title += "</a></span>"; >+ } > > if ( oObj.author ) { > title += " " + BY.replace( "_AUTHOR_", " " + oObj.author ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 19ba9fa..bcd9441 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -797,28 +797,30 @@ No patron matched <span class="ex">[% message %]</span> > </ul> > </div> > >- [% IF ( WaitingHolds ) %] >+ [% IF ( WaitingReserveLoop ) %] > <div id="holdswaiting" class="circmessage"> > <h4>Holds waiting:</h4> >- [% FOREACH w IN WaitingHolds %] >+ [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %] > <ul> > <li> >- <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber %]">[% w.biblio.title | html %]</a> >- ([% ItemTypes.GetDescription( w.item.effective_itemtype ) %]), >- [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %] >- [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber %]] [% END %] >- Hold placed on [% w.reservedate | $KohaDates %]. >- >- <br/> >- [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %] >- [% SET waiting_expires_on = w.waiting_expires_on %] >- Waiting at [% w.branch.branchname | html %] [% IF waiting_expires_on %] until [% waiting_expires_on | $KohaDates %] [% END %] >- </strong> >+ <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% WaitingReserveLoo.biblionumber %]">[% WaitingReserveLoo.title | html %]</a> >+ ([% WaitingReserveLoo.itemtype %]) >+ [% IF ( WaitingReserveLoo.enumchron ) %] [% WaitingReserveLoo.enumchron %][% END %], >+ [% IF ( WaitingReserveLoo.author ) %]<br/>by [% WaitingReserveLoo.author | html %][% END %] >+ [% IF ( WaitingReserveLoo.itemcallnumber ) %][[% WaitingReserveLoo.itemcallnumber %]] [% END %] >+ Hold placed on [% WaitingReserveLoo.reservedate %]. >+ >+ <br /> >+ [% IF ( WaitingReserveLoo.waitingat ) %] >+ [% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %] >+ Waiting at [% WaitingReserveLoo.waitingat %] [% IF WaitingReserveLoo.expiratedate %] until [% WaitingReserveLoo.expirationdate | $KohaDates %] [% END %] >+ </strong> >+ [% END %] > </li> > </ul> > [% END %] > </div> >- [% END %] >+ <!-- /If WaitingReserveLoop -->[% END %] > > [% IF ( notes ) %] > <div id="circnotes" class="circmessage"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index ca23a94..f61b801 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -580,7 +580,7 @@ $(document).ready(function () { > [% END %] > </td> > <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]"> >- [% riloo.itemtitle |html %]</a></td> >+ [% riloo.itemtitle |html %]</a>[% IF ( riloo.enumchron ) %]<br/>[% riloo.enumchron %][% END %]</td> > <td class="ci-author">[% riloo.itemauthor %]</td> > <td class="ci-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td> > <td class="ci-homelibrary">[% riloo.homebranch %]</td> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 4bb2632..d37cad0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -193,6 +193,7 @@ > > <td class="title"> > <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %] [% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield %][% END %]</a> >+ [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron %][% END %] > <span class="item-details">[% ISSUE.author %]</span> > </td> > [% IF ( ISSUE.overdue ) %] >@@ -353,7 +354,7 @@ > <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td> > <td> > <a class="title" href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]"> >- [% WAITIN.waiting_title %] [% FOREACH subtitl IN WAITIN.subtitle %] [% subtitl.subfield %][% END %] >+ [% WAITIN.waiting_title %] [% IF ( WAITIN.enumchron ) %][% WAITIN.enumchron %] [% END %][% FOREACH subtitl IN WAITIN.subtitle %] [% subtitl.subfield %][% END %] > </a> > <span class="item-details"> > [% WAITIN.author %] >@@ -540,6 +541,7 @@ > <td class="title"> > <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]"> > [% RESERVE.reserves_title %] >+ [% IF ( WAITIN.enumchron ) %] [% WAITIN.enumchron %][% END %] > [% FOREACH subtitl IN RESERVE.subtitle %] > [% subtitl.subfield %] > [% END %] >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 54c9295..04b2673 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -312,6 +312,7 @@ my $wcount = 0; > foreach my $res (@reserves) { > if ( $res->{'itemnumber'} ) { > my $item = GetItem( $res->{'itemnumber'}); >+ $res->{enumchron} = $item->{enumchron}; > $res->{'holdingbranch'} = > $branches->{ $item->{'holdingbranch'} }->{'branchname'}; > $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'}; >diff --git a/svc/checkouts b/svc/checkouts >index 6ecfd09..62f4290 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -93,7 +93,7 @@ my $sql = ' > itemlost, > damaged, > location, >- >+ items.enumchron, > DATEDIFF( issuedate, CURRENT_DATE() ) AS not_issued_today > FROM issues > LEFT JOIN items USING ( itemnumber ) >@@ -168,6 +168,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > date_due_overdue => $c->{date_due_overdue} ? JSON::true : JSON::false, > timestamp => $c->{timestamp}, > onsite_checkout => $c->{onsite_checkout}, >+ enumchron => $c->{enumchron}, > renewals_count => $renewals_count, > renewals_allowed => $renewals_allowed, > renewals_remaining => $renewals_remaining, >-- >1.9.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 14668
:
45294
|
49690
|
49691
|
49711
|
53448
|
55756
|
55757
|
55758
|
55759
|
55806
|
55807
|
55808