diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index c266fe120f..3ced96e06a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -798,122 +798,118 @@ [% END %] -
- Existing holds +

Existing holds

- [% FOREACH biblioloo IN biblioloop %] - [% IF ( biblioloo.reserveloop ) %] - [% IF ( multi_hold ) %] -

- - [% biblioloo.title | html %] - -

+ [% FOREACH biblioloo IN biblioloop %] + [% IF ( biblioloo.reserveloop ) %] + [% IF ( multi_hold ) %] +

+ + [% biblioloo.title | html %] + +

+ [% END %] + + [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %] + [% SET branchcodes = [] %] + + [% FOREACH h IN biblioloo.reserveloop %] + [% branchcodes.push( h.branchcode ) %] [% END %] + [% branchcodes = branchcodes.unique %] - [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %] - [% SET branchcodes = [] %] - + [% FOREACH b IN branchcodes.sort %] + [% SET holds_by_branch = [] %] [% FOREACH h IN biblioloo.reserveloop %] - [% branchcodes.push( h.branchcode ) %] + [% IF h.branchcode == b %] + [% holds_by_branch.push( h ) %] + [% END %] [% END %] - [% branchcodes = branchcodes.unique %] +
+ [% Branches.GetName( b ) | html %] + [% INCLUDE holds_table.inc holds=holds_by_branch %] +
+ [% END # /FOREACh b %] + [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %] + [% SET itemtypes = [] %] - [% FOREACH b IN branchcodes.sort %] + [% FOREACH h IN biblioloo.reserveloop %] + [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %] + [% itemtypes.push( hold_itemtype ) %] + [% END %] + [% itemtypes = itemtypes.unique %] + + [% 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 %] + [% END %] + +
+ [% IF i %] + [% ItemTypes.GetDescription( i ) | html %] + [% ELSE %] + Any item type + [% END %] + [% INCLUDE holds_table.inc holds=holds_by_itemtype %] +
+ [% 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 %] +
+ [% Branches.GetName( b ) | html %] [% 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 %] - [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %] - [% SET itemtypes = [] %] - [% FOREACH h IN biblioloo.reserveloop %] - [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %] - [% itemtypes.push( hold_itemtype ) %] - [% END %] - [% itemtypes = itemtypes.unique %] - - [% FOREACH i IN itemtypes.sort %] - [% SET holds_by_itemtype = [] %] - [% FOREACH h IN biblioloo.reserveloop %] + [% SET itemtypes = [] %] + [% 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 %] + [% itemtypes.push( hold_itemtype ) %] [% END %] + [% itemtypes = itemtypes.unique %] -
+ [% FOREACH i IN itemtypes.sort %] [% IF i %] - [% ItemTypes.GetDescription( i ) | html %] +

[% ItemTypes.GetDescription( i ) | html %]

[% ELSE %] - Any item type - [% END %] - [% INCLUDE holds_table.inc holds=holds_by_itemtype %] -
- [% 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 %] -
- [% Branches.GetName( b ) | html %] - [% SET holds_by_branch = [] %] - [% FOREACH h IN biblioloo.reserveloop %] - [% IF h.branchcode == b %] - [% holds_by_branch.push( h ) %] - [% END %] +

Any item type

[% END %] - [% SET itemtypes = [] %] + [% SET holds_by_itemtype = [] %] [% FOREACH h IN holds_by_branch %] [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %] - [% itemtypes.push( hold_itemtype ) %] + [% IF hold_itemtype == i %] + [% holds_by_itemtype.push( h ) %] + [% END %] [% END %] - [% itemtypes = itemtypes.unique %] + [% INCLUDE holds_table.inc holds=holds_by_itemtype %] + [% END %] +
+ [% END # /FOREACH b %] + [% ELSE %] + [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %] + [% END # /IF HoldsSplitQueue %] - [% FOREACH i IN itemtypes.sort %] -
- [% IF i %] - [% ItemTypes.GetDescription( i ) | html %] - [% ELSE %] - Any item type - [% END %] + [% END # /IF biblioloo.reserveloop %] + [% END # FOREACH biblioloo %] - [% 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 %] - [% ELSE %] - [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %] - [% END # /IF HoldsSplitQueue %] - - [% END # /IF biblioloo.reserveloop %] - [% END # FOREACH biblioloo %] - -
- -
-
+
+ +
[% END # IF reserveloop %] [% END # UNLESS patron %]