Bugzilla – Attachment 157716 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: Filter holds to pull on current library and add 'View all libraries' link
Bug-35139-Filter-holds-to-pull-on-current-library-.patch (text/plain), 4.96 KB, created by
David Nind
on 2023-10-24 01:19:04 UTC
(
hide
)
Description:
Bug 35139: Filter holds to pull on current library and add 'View all libraries' link
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-10-24 01:19:04 UTC
Size:
4.96 KB
patch
obsolete
>From d28a64b1e25a5b68d3800461e28b5af16bf72997 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: Filter holds to pull on current library and add > 'View all libraries' link > >When branches are really separated, in 'Holds to pull' it would be great to filter by default on current library, like in 'Holds awaiting pickup' page. >Also for big libraries with many branches, page can be very long to load if they want to see a big time period. > >I propose to change 'Holds to pull' : filter on current library and add 'View all libraries' link. >I bet it makes sens to have the same display between 'Holds to pull' and 'Holds awaiting pickup'. >If needed I'll add a system preference to manage the default behavior. > >Test plan : >1) >1.0) Set system preference 'IndependentBranches' = 'No' >1.1) Create some holds in different libraries >1.2) Go to 'Circulation' > 'Holds to pull' >1.3) Check you see holds of current library >1.4) Change start and end dates and submit >1.5) Click on 'View all libraries' >1.6) You see all holds + start and end dates are unchanged >1.7) Change start and end dates and submit >1.8) You still see all holds + no link 'View all libraries' >2) >2.0) Set system preference 'IndependentBranches' = 'Yes' >2.1) Go to 'Circulation' > 'Holds to pull' >2.2) Check you see holds of current library + no link 'View all libraries' > >Signed-off-by: David Nind <david@davidnind.com> >--- > circ/pendingreserves.pl | 13 ++++++++++++- > .../prog/en/modules/circ/pendingreserves.tt | 8 ++++++++ > 2 files changed, 20 insertions(+), 1 deletion(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index 21016bc354..b3ec83de70 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,7 +182,17 @@ if ( !C4::Context->preference('AllowHoldsOnDamagedItems') ){ > $where{'itembib.damaged'} = 0; > } > >-if ( C4::Context->only_my_library() ){ >+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{'me.branchcode'} = C4::Context->userenv->{'branch'}; > } > >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 8c47fe74f2..8d723d0d55 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 %] > > <h1>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h1> >+<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"> >@@ -207,6 +212,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.count %] >@@ -232,6 +238,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" class="btn btn-primary" value="Mark item as lost" /> >@@ -285,6 +292,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.30.2
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