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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-5 / +11 lines)
Lines 551-564 Link Here
551
                            [% SET itemtypes = [] %]
551
                            [% SET itemtypes = [] %]
552
552
553
                            [% FOREACH h IN biblioloo.reserveloop %]
553
                            [% FOREACH h IN biblioloo.reserveloop %]
554
                                [% itemtypes.push( h.itemtype ) %]
554
                                [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
555
                                [% itemtypes_all.push( hold_itemtype ) %]
555
                            [% END %]
556
                            [% END %]
556
                            [% itemtypes = itemtypes.unique %]
557
                            [% itemtypes = itemtypes.unique %]
557
558
558
                            [% FOREACH i IN itemtypes.sort %]
559
                            [% FOREACH i IN itemtypes.sort %]
559
                                [% SET holds_by_itemtype = [] %]
560
                                [% SET holds_by_itemtype = [] %]
560
                                [% FOREACH h IN biblioloo.reserveloop %]
561
                                [% FOREACH h IN biblioloo.reserveloop %]
561
                                    [% IF h.itemtype == i %]
562
                                    [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
563
                                    [% IF hold_itemtype == i %]
562
                                        [% holds_by_itemtype.push( h ) %]
564
                                        [% holds_by_itemtype.push( h ) %]
563
                                    [% END %]
565
                                    [% END %]
564
                                [% END %]
566
                                [% END %]
Lines 592-598 Link Here
592
594
593
                                    [% SET itemtypes = [] %]
595
                                    [% SET itemtypes = [] %]
594
                                    [% FOREACH h IN holds_by_branch %]
596
                                    [% FOREACH h IN holds_by_branch %]
595
                                        [% itemtypes.push( h.itemtype ) %]
597
                                        [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
598
                                        [% itemtypes.push( hold_itemtype ) %]
596
                                    [% END %]
599
                                    [% END %]
597
                                    [% itemtypes = itemtypes.unique %]
600
                                    [% itemtypes = itemtypes.unique %]
598
601
Lines 606-612 Link Here
606
609
607
                                            [% SET holds_by_itemtype = [] %]
610
                                            [% SET holds_by_itemtype = [] %]
608
                                            [% FOREACH h IN holds_by_branch %]
611
                                            [% FOREACH h IN holds_by_branch %]
609
                                                [% IF h.itemtype == i %]
612
                                                [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
613
                                                [% IF hold_itemtype == i %]
610
                                                    [% holds_by_itemtype.push( h ) %]
614
                                                    [% holds_by_itemtype.push( h ) %]
611
                                                [% END %]
615
                                                [% END %]
612
                                            [% END %]
616
                                            [% END %]
Lines 797-802 Link Here
797
            }).change(function() {
801
            }).change(function() {
798
                var row = $(this).parents("tr:first");
802
                var row = $(this).parents("tr:first");
799
                var value = parseInt($(this).val());
803
                var value = parseInt($(this).val());
804
                var rowsCount = row.parent().children('tr').length - 1;
805
                value = value > rowsCount ? rowsCount : value;
800
                var after = row.parent().find("tr:nth-child("+(value+1)+")");
806
                var after = row.parent().find("tr:nth-child("+(value+1)+")");
801
807
802
                if (prev_rank_request > value) {
808
                if (prev_rank_request > value) {
Lines 806-812 Link Here
806
                }
812
                }
807
813
808
                var next_priority = 1;
814
                var next_priority = 1;
809
                $("select[name=rank-request]").each(function () {
815
                row.parent().find("select[name=rank-request]").each(function () {
810
                    $(this).val(next_priority);
816
                    $(this).val(next_priority);
811
                    next_priority++;
817
                    next_priority++;
812
                });
818
                });
(-)a/reserve/request.pl (-1 / +1 lines)
Lines 590-595 foreach my $biblionumber (@biblionumbers) { Link Here
590
        $reserve{'reserve_id'}     = $res->reserve_id();
590
        $reserve{'reserve_id'}     = $res->reserve_id();
591
        $reserve{itemtype}         = $res->itemtype();
591
        $reserve{itemtype}         = $res->itemtype();
592
        $reserve{branchcode}       = $res->branchcode();
592
        $reserve{branchcode}       = $res->branchcode();
593
        $reserve{object}           = $res;
593
594
594
        push( @reserveloop, \%reserve );
595
        push( @reserveloop, \%reserve );
595
    }
596
    }
596
- 

Return to bug 19469