+ [% IF ( multi_hold ) %]
+
+
+ [% biblioloo.title | html %]
+ [% biblioloo.reserveloop.size | html %] [% tn('Hold', 'Holds', biblioloo.reserveloop.size) | $raw %]
+
[% END %]
- [% branchcodes = branchcodes.unique %]
- [% FOREACH b IN branchcodes.sort %]
- [% SET holds_by_branch = [] %]
+ [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
+
+ [% SET branchcodes = [] %]
+
[% FOREACH h IN biblioloo.reserveloop %]
- [% IF h.branchcode == b %]
- [% holds_by_branch.push( h ) %]
- [% END %]
+ [% branchcodes.push( h.branchcode ) %]
[% END %]
-
- [% END # /FOREACh b %]
- [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
- [% SET itemtypes = [] %]
+ [% branchcodes = branchcodes.unique %]
+ [% IF ( branchcodes.empty ) %]
+
+ There are no holds on this title.
+
+ [% ELSE %]
- [% FOREACH h IN biblioloo.reserveloop %]
- [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
- [% itemtypes.push( hold_itemtype ) %]
- [% END %]
- [% itemtypes = itemtypes.unique %]
+ [% FOREACH b IN branchcodes.sort %]
+ [% SET holds_by_branch = [] %]
+ [% FOREACH h IN biblioloo.reserveloop %]
+ [% IF h.branchcode == b %]
+ [% holds_by_branch.push( h ) %]
+ [% END %]
+ [% END %]
+
+
[% Branches.GetName( b ) | html %]
+
+ [% INCLUDE holds_table.inc holds=holds_by_branch %]
+
+ [% END # /FOREACh b %]
+ [% END # /IF ( branchcodes.empty ) %]
+
+ [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
+
+ [% SET itemtypes = [] %]
- [% FOREACH i IN itemtypes.sort %]
- [% SET holds_by_itemtype = [] %]
[% FOREACH h IN biblioloo.reserveloop %]
[% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
- [% IF hold_itemtype == i %]
- [% holds_by_itemtype.push( h ) %]
- [% END %]
+ [% itemtypes.push( hold_itemtype ) %]
[% END %]
-
-
- [% END # /FOREACH i %]
- [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
- [% SET branchcodes = [] %]
-
- [% FOREACH h IN biblioloo.reserveloop %]
- [% branchcodes.push( h.branchcode ) %]
- [% END %]
- [% branchcodes = branchcodes.unique %]
-
- [% FOREACH b IN branchcodes.sort %]
-
- [% END # /FOREACH b %]
- [% ELSE %]
- [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
- [% END # /IF HoldsSplitQueue %]
+
+ [% IF i %]
+
[% ItemTypes.GetDescription( i ) | html %]
+ [% ELSE %]
+ Any item type
+ [% END %]
+ [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
+
+ [% END # /FOREACH i %]
+ [% END # /IF ( itemtypes.empty ) %]
+
+ [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
+ [% SET branchcodes = [] %]
+
+ [% FOREACH h IN biblioloo.reserveloop %]
+ [% branchcodes.push( h.branchcode ) %]
+ [% END %]
+ [% branchcodes = branchcodes.unique %]
+ [% IF ( branchcodes.empty ) %]
+
+ There are no holds on this title.
+
+ [% ELSE %]
+
+ [% FOREACH b IN branchcodes.sort %]
+
+
[% Branches.GetName( b ) | html %]
+ [% SET holds_by_branch = [] %]
+ [% FOREACH h IN biblioloo.reserveloop %]
+ [% IF h.branchcode == b %]
+ [% holds_by_branch.push( h ) %]
+ [% END %]
+ [% END %]
+
+ [% SET itemtypes = [] %]
+ [% FOREACH h IN holds_by_branch %]
+ [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
+ [% itemtypes.push( hold_itemtype ) %]
+ [% END %]
+ [% itemtypes = itemtypes.unique %]
+
+ [% FOREACH i IN itemtypes.sort %]
+
+
+ [% IF i %]
+ [% ItemTypes.GetDescription( i ) | html %]
+ [% ELSE %]
+ Any item type
+ [% END %]
+
+
+ [% SET holds_by_itemtype = [] %]
+ [% FOREACH h IN holds_by_branch %]
+ [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
+ [% IF hold_itemtype == i %]
+ [% holds_by_itemtype.push( h ) %]
+ [% END %]
+ [% END %]
+ [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
+
+ [% END %]
+
+ [% END # /FOREACH b %]
+ [% END # /IF ( branchcodes.empty ) %]
+
+ [% ELSE %]
+
+ [% IF ( biblioloo.reserveloop.size ) %]
+ [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
+ [% ELSE %]
+
+ There are no holds on this title.
+
+ [% END %]
+
+ [% END # /IF HoldsSplitQueue %]
+
[% END # /IF biblioloo.reserveloop %]
[% END # FOREACH biblioloo %]
-