Bug 30650: Display holds waiting at the logged-in library
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 4 Jul 2022 15:12:24 +0000 (17:12 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 29 Jul 2022 18:01:19 +0000 (15:01 -0300)
Not those waiting at the library of the logged-in user

Signed-off-by: Koha Team University Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc
koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt

index ffec80f..b9ad413 100644 (file)
@@ -1,4 +1,5 @@
 [% USE raw %]
+[% USE Branches %]
 [% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
 [% SET return_claims = patron.return_claims %]
 [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %]
 [% END # /IF WaitingHolds.count %]
 
 [% IF Koha.Preference("CurbsidePickup") %]
-    [% SET curbside_pickups = patron.curbside_pickups.search( branchcode => logged_in_user.branchcode ) %]
+    [% SET curbside_pickups = patron.curbside_pickups.search( branchcode => Branches.GetLoggedInBranchcode ) %]
     [% IF curbside_pickups.count %]
         <div id="curbside_pickups" class="circmessage">
             <h4>Curbside pickups scheduled here</h4>
index 07f4e9d..575534c 100644 (file)
                                                         [% END %]
                                                     </td>
                                                     <td>
-                                                        [% SET waiting_holds = cp.patron.holds.search( found => 'W', branchcode => logged_in_user.branchcode ) %]
+                                                        [% SET waiting_holds = cp.patron.holds.search( found => 'W', branchcode => Branches.GetLoggedInBranchcode ) %]
                                                         [% FOREACH h IN waiting_holds %]
                                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% h.biblionumber | uri %]">[% h.biblio.title | html %]</a> ([% h.biblio.author | html %], <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% h.itemnumber | html %]&biblionumber=[% h.biblionumber | html %]#item[% h.itemnumber | html %]">[% h.item.barcode | html %]</a>)<br/>
                                                         [% END %]
                                                         [% END %]
                                                     </td>
                                                     <td>
-                                                        [% SET waiting_holds = cp.patron.holds.search( found => 'W', branchcode => logged_in_user.branchcode ) %]
+                                                        [% SET waiting_holds = cp.patron.holds.search( found => 'W', branchcode => Branches.GetLoggedInBranchcode ) %]
                                                         [% FOREACH h IN waiting_holds %]
                                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% h.biblionumber | uri %]">[% h.biblio.title | html %]</a> ([% h.biblio.author | html %], <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% h.itemnumber | html %]&biblionumber=[% h.biblionumber | html %]#item[% h.itemnumber | html %]">[% h.item.barcode | html %]</a>)<br/>
                                                         [% END %]
                                                         [% END %]
                                                     </td>
                                                     <td>
-                                                        [% SET waiting_holds = cp.patron.holds.search( found => 'W', branchcode => logged_in_user.branchcode ) %]
+                                                        [% SET waiting_holds = cp.patron.holds.search( found => 'W', branchcode => Branches.GetLoggedInBranchcode ) %]
                                                         [% FOREACH h IN waiting_holds %]
                                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% h.biblionumber | uri %]">[% h.biblio.title | html %]</a> ([% h.biblio.author | html %], <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% h.itemnumber | html %]&biblionumber=[% h.biblionumber | html %]#item[% h.itemnumber | html %]">[% h.item.barcode | html %]</a>)<br/>
                                                         [% END %]
                                 <button type="submit" class="btn btn-default">Submit</button>
                             </form>
                         [% ELSE %]
-                            [% SET waiting_holds = patron.holds.search( found => 'W', branchcode => logged_in_user.branchcode ) %]
+                            [% SET waiting_holds = patron.holds.search( found => 'W', branchcode => Branches.GetLoggedInBranchcode ) %]
                             [% IF !policy.enable_waiting_holds_only || waiting_holds.count > 0 %]
                                 <form id="create-pickup" method="post">
                                     <fieldset class="rows" style="float: none;">