diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
index 2078d9c77b..fb3abec220 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -830,7 +830,7 @@
[% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
[% SET return_claims = patron.return_claims %]
[% IF return_claims.count > ClaimReturnedWarningThreshold %]
-
Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.
+ Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.
[% END %]
@@ -869,24 +869,60 @@
[% IF WaitingHolds.count %]
-
Holds waiting:
+ [% SET waiting_here = 0 %]
+ [% SET waiting_elsewhere = 0 %]
[% FOREACH w IN WaitingHolds %]
-
- -
- [% w.biblio.title | html %]
- ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
- [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
- [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
- Hold placed on [% w.reservedate | $KohaDates %].
+ [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %]
+ [% waiting_here = waiting_here + 1 %]
+ [% ELSE %]
+ [% waiting_elsewhere = waiting_elsewhere + 1 %]
+ [% END %]
+ [% END %]
-
- [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %][% ELSE %][% END %]
- [% SET expires_on = w.expirationdate %]
- Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
-
-
+ [% IF ( waiting_here > 0 ) %]
+ Holds waiting here ([% waiting_here | html %])
+
+ [% FOREACH w IN WaitingHolds %]
+ [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode() ) %]
+ -
+ [% w.biblio.title | html %]
+ ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
+ [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
+ [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
+ Hold placed on [% w.reservedate | $KohaDates %].
+
+
+ [% SET expires_on = w.expirationdate %]
+ Waiting here [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
+
+
+ [% END %]
+ [% END %]
[% END %]
+
+ [% IF ( waiting_elsewhere > 0 ) %]
+ Holds waiting at other libraries ([% waiting_elsewhere | html %])
+
+ [% FOREACH w IN WaitingHolds %]
+ [% IF ( w.branch.branchcode != Branches.GetLoggedInBranchcode() ) %]
+ -
+ [% w.biblio.title | html %]
+ ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
+ [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
+ [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
+ Hold placed on [% w.reservedate | $KohaDates %].
+
+
+ [% SET expires_on = w.expirationdate %]
+ Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
+
+
+ [% END %]
+ [% END %]
+
+ [% END %]
+
[% END # /IF WaitingHolds.count %]