From ef0dbcc6b584dfcd51a7da20bab2f1d7572a1ea5 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 19 Jul 2022 09:51:16 -0300 Subject: [PATCH] Bug 30905: (follow-up) Get logged in branch once Signed-off-by: Tomas Cohen Arazi (cherry picked from commit fc919fc796df42c29e73cd527d3c425377fcc27a) Signed-off-by: Lucas Gass --- .../prog/en/includes/patron_messages.inc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc index ecd297c744..6f6f6704c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -1,5 +1,6 @@ [% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %] [% SET return_claims = patron.return_claims %] +[% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %] [% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || charges || charges_guarantors_guarantees || charges_guarantees || credits ) %]

Attention

@@ -134,7 +135,7 @@ [% SET waiting_here = 0 %] [% SET waiting_elsewhere = 0 %] [% FOREACH w IN waiting_recalls %] - [% IF ( w.pickup_library_id == Branches.GetLoggedInBranchcode() ) %] + [% IF ( w.pickup_library_id == logged_in_branchcode ) %] [% waiting_here = waiting_here + 1 %] [% ELSE %] [% waiting_elsewhere = waiting_elsewhere + 1 %] @@ -145,7 +146,7 @@

Recalls waiting here ([% waiting_here | html %])

    [% FOREACH w IN waiting_recalls %] - [% IF ( w.pickup_library_id == Branches.GetLoggedInBranchcode() ) %] + [% IF ( w.pickup_library_id == logged_in_branchcode ) %]
  • [% w.biblio.title | html %] ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]), @@ -167,7 +168,7 @@

    Recalls waiting at other libraries ([% waiting_elsewhere | html %])

      [% FOREACH w IN waiting_recalls %] - [% IF ( w.pickup_library_id != Branches.GetLoggedInBranchcode() ) %] + [% IF ( w.pickup_library_id != logged_in_branchcode ) %]
    • [% w.biblio.title | html %] ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]), @@ -192,7 +193,7 @@ [% SET waiting_here = 0 %] [% SET waiting_elsewhere = 0 %] [% FOREACH w IN WaitingHolds %] - [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %] + [% IF ( w.branch.branchcode == logged_in_branchcode ) %] [% waiting_here = waiting_here + 1 %] [% ELSE %] [% waiting_elsewhere = waiting_elsewhere + 1 %] @@ -203,7 +204,7 @@

      Holds waiting here ([% waiting_here | html %])

        [% FOREACH w IN WaitingHolds %] - [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %] + [% IF ( w.branch.branchcode == logged_in_branchcode ) %]
      • [% w.biblio.title | html %] ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]), @@ -225,7 +226,7 @@

        Holds waiting at other libraries ([% waiting_elsewhere | html %])

          [% FOREACH w IN WaitingHolds %] - [% IF ( w.branch.branchcode != Branches.GetLoggedInBranchcode() ) %] + [% IF ( w.branch.branchcode != logged_in_branchcode ) %]
        • [% w.biblio.title | html %] ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]), -- 2.39.5