[Koha-patches] [PATCH] catalyst-wr68479: Limit holds to the user branch, provide a link to

Chris Cormack chrisc at catalyst.net.nz
Sun Apr 25 21:44:31 CEST 2010


From: Srdjan Jankovic <srdjan at catalyst.net.nz>

Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
---
 circ/waitingreserves.pl                            |    5 ++++-
 .../prog/en/modules/circ/waitingreserves.tmpl      |    7 ++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl
index 7849d5a..62d3ca8 100755
--- a/circ/waitingreserves.pl
+++ b/circ/waitingreserves.pl
@@ -44,6 +44,7 @@ my $item           = $input->param('itemnumber');
 my $borrowernumber = $input->param('borrowernumber');
 my $fbr            = $input->param('fbr') || '';
 my $tbr            = $input->param('tbr') || '';
+my $all_branches   = $input->param('allbranches') || '';
 
 my $cancel;
 
@@ -90,10 +91,12 @@ if ($item) {
         ModItemTransfer( $item, $fbr, $tbr );
     }
 }
+$template->param( all_branches_link => $input->url . '?allbranches=1&' . $input->query_string )
+  unless $all_branches;
 
 my (@reservloop, @overloop);
 my ($reservcount, $overcount);
-my @getreserves = $default ? GetReservesForBranch($default) : GetReservesForBranch();
+my @getreserves = $all_branches ? GetReservesForBranch() : GetReservesForBranch($default);
 # get reserves for the branch we are logged into, or for all branches
 
 my $today = Date_to_Days(&Today);
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tmpl
index 15a5e79..16b821b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tmpl
@@ -38,7 +38,12 @@ $.tablesorter.addParser({
     <div id="yui-main">
     <div class="yui-g">
 
-        <h2>Holds awaiting pickup for your library on: <!-- TMPL_VAR NAME="show_date" --></h2>
+        <h2>Holds awaiting pickup for your library on: <!-- TMPL_VAR NAME="show_date" -->
+            <!-- TMPL_IF NAME="all_branches_link" -->
+            <span style="margin-left:20px"><a href="<!-- TMPL_VAR NAME="all_branches_link" -->">
+            View all branches</a></span>
+            <!-- /TMPL_IF -->
+        </h2>
         <!-- TMPL_IF NAME="messagetransfert" -->
             <div>
                 <h2>Hold find for (<!-- TMPL_VAR NAME="nextreservtitle" -->) must transfered</h2>
-- 
1.6.3.3



More information about the Koha-patches mailing list