Bugzilla – Attachment 158002 Details for
Bug 35139
Filter holds to pull on current library and add 'View all libraries' link
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35139: [ALTERNATE] Filter holds to pull on holding library and add 'View all libraries' link
Bug-35139-ALTERNATE-Filter-holds-to-pull-on-holdin.patch (text/plain), 4.30 KB, created by
Fridolin Somers
on 2023-10-27 20:36:34 UTC
(
hide
)
Description:
Bug 35139: [ALTERNATE] Filter holds to pull on holding library and add 'View all libraries' link
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2023-10-27 20:36:34 UTC
Size:
4.30 KB
patch
obsolete
>From 2adbba2626c66dce67d740d572707fbc4f7d7510 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 23 Oct 2023 10:00:01 -1000 >Subject: [PATCH] Bug 35139: [ALTERNATE] Filter holds to pull on holding > library and add 'View all libraries' link > >Like previous patch but with impact on items.holdingbranch >--- > circ/pendingreserves.pl | 18 ++++++++++++++++-- > .../prog/en/modules/circ/pendingreserves.tt | 8 ++++++++ > 2 files changed, 24 insertions(+), 2 deletions(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index c474c98615..de2f1ee162 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -42,6 +42,7 @@ my $theme = $input->param('theme'); # only used if allowthemeoverride is set > my $op = $input->param('op') || ''; > my $borrowernumber = $input->param('borrowernumber'); > my $reserve_id = $input->param('reserve_id'); >+my $all_branches = $input->param('allbranches') || ''; > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >@@ -181,8 +182,18 @@ if ( !C4::Context->preference('AllowHoldsOnDamagedItems') ){ > $where{'itembib.damaged'} = 0; > } > >-if ( C4::Context->only_my_library() ){ >- $where{'me.branchcode'} = C4::Context->userenv->{'branch'}; >+if ( C4::Context->preference('IndependentBranches') ) { >+ undef $all_branches; >+} else { >+ my $all_branches_link = '/cgi-bin/koha/circ/pendingreserves.pl?allbranches=1'; >+ $all_branches_link .= '&from=' . $startdate if $startdate; >+ $all_branches_link .= '&to=' . $enddate if $enddate; >+ $template->param( all_branches_link => $all_branches_link ) unless $all_branches; >+} >+if ($all_branches) { >+ $template->param( allbranches => 1 ); >+} else { >+ $where{'itembib.holdingbranch'} = C4::Context->userenv->{'branch'}; > } > > # get all distinct unfulfilled reserves >@@ -196,6 +207,9 @@ my @biblionumbers = $holds->get_column('biblionumber'); > my $all_items; > if ( $holds->count ) { > foreach my $item ( $holds->get_items_that_can_fill ) { >+ unless ($all_branches) { >+ next unless $item->holdingbranch eq C4::Context->userenv->{'branch'}; >+ } > push @{ $all_items->{ $item->biblionumber } }, $item; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index af7c47b588..f03fbbf828 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -58,6 +58,11 @@ > [% END %] > > <h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2> >+<h2> >+ [% IF all_branches_link %] >+ <span><a href="[% all_branches_link | url %]">View all libraries</a></span> >+ [% END %] >+</h2> > <h3>Reported on [% todaysdate | $KohaDates %]</h3> > <p>The following holds have not been filled. Please retrieve them and check them in.</p> > <div id="searchresults"> >@@ -187,6 +192,7 @@ > <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post"> > <input type="hidden" name="op" value="cancel_reserve" /> > <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" /> >+ <input type="hidden" name="allbranches" value="[% allbranches | html %]" /> > > [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] > [% IF hold_cancellation %] >@@ -212,6 +218,7 @@ > [% IF hold.itemnumber %] > <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post"> > <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" /> >+ <input type="hidden" name="allbranches" value="[% allbranches | html %]" /> > [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %] > <input type="hidden" name="op" value="mark_as_lost" /> > <input type="submit" value="Mark item as lost" /> >@@ -264,6 +271,7 @@ > <div id="filters"> > > <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" > >+<input type="hidden" name="allbranches" value="[% allbranches | html %]" /> > <fieldset class="brief"> > <h4>Refine results</h4> > <ol> >-- >2.42.0
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 35139
:
157692
|
157716
| 158002