View | Details | Raw Unified | Return to bug 25892
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-91 / +86 lines)
Lines 794-915 Link Here
794
                            <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
794
                            <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
795
                        [% END %]
795
                        [% END %]
796
796
797
                        <fieldset class="rows">
797
                        <h2>Existing holds</h2>
798
                            <legend>Existing holds</legend>
798
799
                        [% FOREACH biblioloo IN biblioloop %]
800
                            [% IF ( biblioloo.reserveloop ) %]
801
                                [% IF ( multi_hold ) %]
802
                                    <h3>
803
                                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
804
                                            [% biblioloo.title | html %]
805
                                        </a>
806
                                    </h3>
807
                                [% END %]
799
808
800
                            [% FOREACH biblioloo IN biblioloop %]
809
                                [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
801
                                [% IF ( biblioloo.reserveloop ) %]
810
                                    [% SET branchcodes = [] %]
802
                                    [% IF ( multi_hold ) %]
811
803
                                        <h3>
812
                                    [% FOREACH h IN biblioloo.reserveloop %]
804
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
813
                                        [% branchcodes.push( h.branchcode ) %]
805
                                                [% biblioloo.title | html %]
806
                                            </a>
807
                                        </h3>
808
                                    [% END %]
814
                                    [% END %]
815
                                    [% branchcodes = branchcodes.unique %]
809
816
810
                                    [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
817
                                    [% FOREACH b IN branchcodes.sort %]
811
                                        [% SET branchcodes = [] %]
818
                                        [% SET holds_by_branch = [] %]
819
                                        [% FOREACH h IN biblioloo.reserveloop %]
820
                                            [% IF h.branchcode == b %]
821
                                                [% holds_by_branch.push( h ) %]
822
                                            [% END %]
823
                                        [% END %]
824
                                        <fieldset>
825
                                            <legend>[% Branches.GetName( b ) | html %]</legend>
826
                                            [% INCLUDE holds_table.inc holds=holds_by_branch %]
827
                                        </fieldset>
828
                                    [% END # /FOREACh b %]
829
                                [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
830
                                    [% SET itemtypes = [] %]
831
832
                                    [% FOREACH h IN biblioloo.reserveloop %]
833
                                        [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
834
                                        [% itemtypes.push( hold_itemtype ) %]
835
                                    [% END %]
836
                                    [% itemtypes = itemtypes.unique %]
812
837
838
                                    [% FOREACH i IN itemtypes.sort %]
839
                                        [% SET holds_by_itemtype = [] %]
813
                                        [% FOREACH h IN biblioloo.reserveloop %]
840
                                        [% FOREACH h IN biblioloo.reserveloop %]
814
                                            [% branchcodes.push( h.branchcode ) %]
841
                                            [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
842
                                            [% IF hold_itemtype == i %]
843
                                                [% holds_by_itemtype.push( h ) %]
844
                                            [% END %]
815
                                        [% END %]
845
                                        [% END %]
816
                                        [% branchcodes = branchcodes.unique %]
817
846
818
                                        [% FOREACH b IN branchcodes.sort %]
847
                                        <fieldset>
848
                                            [% IF i %]
849
                                                <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
850
                                            [% ELSE %]
851
                                                <legend>Any item type</legend>
852
                                            [% END %]
853
                                            [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
854
                                        </fieldset>
855
                                    [% END # /FOREACH i %]
856
                                [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
857
                                    [% SET branchcodes = [] %]
858
859
                                    [% FOREACH h IN biblioloo.reserveloop %]
860
                                        [% branchcodes.push( h.branchcode ) %]
861
                                    [% END %]
862
                                    [% branchcodes = branchcodes.unique %]
863
864
                                    [% FOREACH b IN branchcodes.sort %]
865
                                        <fieldset>
866
                                            <legend>[% Branches.GetName( b ) | html %]</legend>
819
                                            [% SET holds_by_branch = [] %]
867
                                            [% SET holds_by_branch = [] %]
820
                                            [% FOREACH h IN biblioloo.reserveloop %]
868
                                            [% FOREACH h IN biblioloo.reserveloop %]
821
                                                [% IF h.branchcode == b %]
869
                                                [% IF h.branchcode == b %]
822
                                                    [% holds_by_branch.push( h ) %]
870
                                                    [% holds_by_branch.push( h ) %]
823
                                                [% END %]
871
                                                [% END %]
824
                                            [% END %]
872
                                            [% END %]
825
                                            <fieldset>
826
                                                <legend>[% Branches.GetName( b ) | html %]</legend>
827
                                                [% INCLUDE holds_table.inc holds=holds_by_branch %]
828
                                            </fieldset>
829
                                        [% END # /FOREACh b %]
830
                                    [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
831
                                        [% SET itemtypes = [] %]
832
833
                                        [% FOREACH h IN biblioloo.reserveloop %]
834
                                            [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
835
                                            [% itemtypes.push( hold_itemtype ) %]
836
                                        [% END %]
837
                                        [% itemtypes = itemtypes.unique %]
838
873
839
                                        [% FOREACH i IN itemtypes.sort %]
874
                                            [% SET itemtypes = [] %]
840
                                            [% SET holds_by_itemtype = [] %]
875
                                            [% FOREACH h IN holds_by_branch %]
841
                                            [% FOREACH h IN biblioloo.reserveloop %]
842
                                                [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
876
                                                [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
843
                                                [% IF hold_itemtype == i %]
877
                                                [% itemtypes.push( hold_itemtype ) %]
844
                                                    [% holds_by_itemtype.push( h ) %]
845
                                                [% END %]
846
                                            [% END %]
878
                                            [% END %]
879
                                            [% itemtypes = itemtypes.unique %]
847
880
848
                                            <fieldset>
881
                                            [% FOREACH i IN itemtypes.sort %]
849
                                                [% IF i %]
882
                                                [% IF i %]
850
                                                    <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
883
                                                    <h3>[% ItemTypes.GetDescription( i ) | html %]</h3>
851
                                                [% ELSE %]
884
                                                [% ELSE %]
852
                                                    <legend>Any item type</legend>
885
                                                    <h3>Any item type</h3>
853
                                                [% END %]
886
                                                [% END %]
854
                                                [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
855
                                            </fieldset>
856
                                        [% END # /FOREACH i %]
857
                                    [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
858
                                        [% SET branchcodes = [] %]
859
887
860
                                        [% FOREACH h IN biblioloo.reserveloop %]
888
                                                [% SET holds_by_itemtype = [] %]
861
                                            [% branchcodes.push( h.branchcode ) %]
862
                                        [% END %]
863
                                        [% branchcodes = branchcodes.unique %]
864
865
                                        [% FOREACH b IN branchcodes.sort %]
866
                                            <fieldset class="contrast">
867
                                                <legend>[% Branches.GetName( b ) | html %]</legend>
868
                                                [% SET holds_by_branch = [] %]
869
                                                [% FOREACH h IN biblioloo.reserveloop %]
870
                                                    [% IF h.branchcode == b %]
871
                                                        [% holds_by_branch.push( h ) %]
872
                                                    [% END %]
873
                                                [% END %]
874
875
                                                [% SET itemtypes = [] %]
876
                                                [% FOREACH h IN holds_by_branch %]
889
                                                [% FOREACH h IN holds_by_branch %]
877
                                                    [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
890
                                                    [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
878
                                                    [% itemtypes.push( hold_itemtype ) %]
891
                                                    [% IF hold_itemtype == i %]
879
                                                [% END %]
892
                                                        [% holds_by_itemtype.push( h ) %]
880
                                                [% itemtypes = itemtypes.unique %]
893
                                                    [% END %]
881
882
                                                [% FOREACH i IN itemtypes.sort %]
883
                                                    <fieldset class="standard">
884
                                                        [% IF i %]
885
                                                            <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
886
                                                        [% ELSE %]
887
                                                            <legend>Any item type</legend>
888
                                                        [% END %]
889
890
                                                        [% SET holds_by_itemtype = [] %]
891
                                                        [% FOREACH h IN holds_by_branch %]
892
                                                            [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
893
                                                            [% IF hold_itemtype == i %]
894
                                                                [% holds_by_itemtype.push( h ) %]
895
                                                            [% END %]
896
                                                        [% END %]
897
                                                        [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
898
                                                    </fieldset>
899
                                                [% END %]
894
                                                [% END %]
900
                                            </fieldset>
895
                                                [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
901
                                        [% END # /FOREACH b %]
896
                                            [% END %]
902
                                    [% ELSE %]
897
                                        </fieldset>
903
                                        [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
898
                                    [% END # /FOREACH b %]
904
                                    [% END # /IF HoldsSplitQueue %]
899
                                [% ELSE %]
900
                                    [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
901
                                [% END # /IF HoldsSplitQueue %]
905
902
906
                                [% END # /IF biblioloo.reserveloop %]
903
                            [% END # /IF biblioloo.reserveloop %]
907
                            [% END # FOREACH biblioloo %]
904
                        [% END # FOREACH biblioloo %]
908
905
909
                            <fieldset class="action">
906
                        <fieldset class="action">
910
                                <input type="submit" name="submit" value="Update hold(s)" />
907
                            <input type="submit" name="submit" value="Update hold(s)" />
911
                            </fieldset>
908
                        </fieldset>
912
                        </fieldset> <!-- /.rows -->
913
                    </form> <!-- /name=TTime -->
909
                    </form> <!-- /name=TTime -->
914
                [% END # IF reserveloop %]
910
                [% END # IF reserveloop %]
915
            [% END # UNLESS patron %]
911
            [% END # UNLESS patron %]
916
- 

Return to bug 25892