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

(-)a/circ/circulation.pl (-19 / +2 lines)
Lines 224-248 if ($findborrower) { Link Here
224
    if ( $patron ) {
224
    if ( $patron ) {
225
        $borrowernumber = $patron->borrowernumber;
225
        $borrowernumber = $patron->borrowernumber;
226
    } else {
226
    } else {
227
        my $dt_params = { iDisplayLength => -1 };
227
        print $query->redirect( "/cgi-bin/koha/members/member.pl?quicksearch=1&circsearch=1&searchmember=" . $findborrower );
228
        my $results = C4::Utils::DataTables::Members::search(
228
        exit;
229
            {
230
                searchmember => $findborrower,
231
                searchtype   => $searchtype,
232
                dt_params    => $dt_params,
233
            }
234
        );
235
        my $borrowers = $results->{patrons};
236
        if ( scalar @$borrowers == 1 ) {
237
            $borrowernumber = $borrowers->[0]->{borrowernumber};
238
            $query->param( 'borrowernumber', $borrowernumber );
239
            $query->param( 'barcode',           '' );
240
        } elsif ( @$borrowers ) {
241
            $template->param( borrowers => $borrowers );
242
        } else {
243
            $query->param( 'findborrower', '' );
244
            $message = "'$findborrower'";
245
        }
246
    }
229
    }
247
}
230
}
248
231
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-315 / +298 lines)
Lines 561-947 Link Here
561
                        <h4>No patron matched <span class="ex">[% message | html %]</span></h4>
561
                        <h4>No patron matched <span class="ex">[% message | html %]</span></h4>
562
                    [% END %]
562
                    [% END %]
563
563
564
                    [% IF ( borrowers ) %]
564
                    <!-- BARCODE ENTRY -->
565
565
566
                        [% INCLUDE 'patron-toolbar.inc' %]
566
                    [% IF patron %]
567
                        <fieldset id="circ_circulation_selectborrower">
568
                            <legend>Patron selection</legend>
569
                            [% INCLUDE 'circ-patron-search-results.inc' destination = "circ" %]
570
                        </fieldset>
571
572
                    [% ELSE %]
573
574
                        <!-- BARCODE ENTRY -->
575
567
576
                        [% IF patron %]
568
                        [% IF patron.privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
569
                            <div class="dialog alert">
570
                                <strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.
571
                            </div>
572
                        [% END %]
577
573
578
                            [% IF patron.privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
574
                        <div class="row">
579
                                <div class="dialog alert">
575
                            [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
580
                                    <strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.
576
                                <div class="col-sm-6">
581
                                </div>
577
                                    <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
582
                            [% END %]
578
                                        <input type="hidden" name="restoreduedatespec" />
579
                                        [% IF ( issue ) %]
580
                                            <fieldset id="circ_circulation_issue" class="lastchecked">
581
                                        [% ELSE %]
582
                                            <fieldset id="circ_circulation_issue">
583
                                        [% END %]
583
584
584
                            <div class="row">
585
                                        [% IF ( DisplayClearScreenButton ) %]
585
                                [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
586
                                            <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
586
                                    <div class="col-sm-6">
587
                                            <span id="printclearscreen"><a href="#" title="Print slip and clear screen"><i class="fa fa-print"></i></a></span>
587
                                        <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
588
                                        [% END %]
588
                                            <input type="hidden" name="restoreduedatespec" />
589
                                            [% IF ( issue ) %]
590
                                                <fieldset id="circ_circulation_issue" class="lastchecked">
591
                                            [% ELSE %]
592
                                                <fieldset id="circ_circulation_issue">
593
                                            [% END %]
594
589
595
                                            [% IF ( DisplayClearScreenButton ) %]
590
                                        [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
596
                                                <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
597
                                                <span id="printclearscreen"><a href="#" title="Print slip and clear screen"><i class="fa fa-print"></i></a></span>
598
                                            [% END %]
599
591
600
                                            [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
592
                                        <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
601
593
602
                                            <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
594
                                        [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
595
                                            <div class="hint">Enter item barcode or keyword:</div>
596
                                        [% ELSE %]
597
                                            <div class="hint">Enter item barcode:</div>
598
                                        [% END %]
603
599
604
                                            [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
600
                                        [% IF NEEDSCONFIRMATION %]
605
                                                <div class="hint">Enter item barcode or keyword:</div>
601
                                            <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
606
                                            [% ELSE %]
602
                                        [% ELSE %]
607
                                                <div class="hint">Enter item barcode:</div>
603
                                            <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
608
                                            [% END %]
604
                                        [% END %]
609
605
610
                                            [% IF NEEDSCONFIRMATION %]
606
                                        <button type="submit" class="btn btn-default">Check out</button>
611
                                                <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
612
                                            [% ELSE %]
613
                                                <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
614
                                            [% END %]
615
607
616
                                            <button type="submit" class="btn btn-default">Check out</button>
608
                                        <div id="show-circ-settings">
609
                                            <a href="#"><i class="fa fa-caret-right circ-settings-icon"></i> Checkout settings</a>
610
                                        </div>
617
611
618
                                            <div id="show-circ-settings">
612
                                        <div class="circ-settings">
619
                                                <a href="#"><i class="fa fa-caret-right circ-settings-icon"></i> Checkout settings</a>
620
                                            </div>
621
613
622
                                            <div class="circ-settings">
614
                                                [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
615
                                                    [% IF ( SpecifyDueDate ) %]
616
                                                        <div id="specify-due-date" class="circ-setting">
617
                                                            <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
618
                                                            [% IF ( duedatespec ) %]
619
                                                                <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" />
620
                                                            [% ELSE %]
621
                                                                <input type="text" size="20" id="duedatespec" name="duedatespec" value="" />
622
                                                            [% END %]
623
                                                            <label for="stickyduedate"> Remember for session:</label>
624
                                                            [% IF ( stickyduedate ) %]
625
                                                                <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
626
                                                            [% ELSE %]
627
                                                                <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
628
                                                            [% END %]
629
                                                            <button class="btn btn-default btn-xs action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
630
                                                        </div>
631
                                                    [% END %]
632
                                                [% END %]
623
633
624
                                                    [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
634
                                                [% UNLESS ( noissues ) %]
625
                                                        [% IF ( SpecifyDueDate ) %]
635
                                                    <div id="set-automatic-renewal" class="circ-setting">
626
                                                            <div id="specify-due-date" class="circ-setting">
636
                                                        [% IF NEEDSCONFIRMATION %]
627
                                                                <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
637
                                                            [% IF auto_renew %]
628
                                                                [% IF ( duedatespec ) %]
638
                                                                [% IF patron.autorenew_checkouts %]
629
                                                                    <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" />
639
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
630
                                                                [% ELSE %]
640
                                                                    title="Patron has opted out of auto-renewal"/>
631
                                                                    <input type="text" size="20" id="duedatespec" name="duedatespec" value="" />
632
                                                                [% END %]
633
                                                                <label for="stickyduedate"> Remember for session:</label>
634
                                                                [% IF ( stickyduedate ) %]
635
                                                                    <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
636
                                                                [% ELSE %]
641
                                                                [% ELSE %]
637
                                                                    <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
642
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" checked="checked" />
638
                                                                [% END %]
643
                                                                [% END %]
639
                                                                <button class="btn btn-default btn-xs action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
644
                                                            [% ELSE %]
640
                                                            </div>
645
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
646
                                                            [% END %]
647
                                                        [% ELSE %]
648
                                                            [% IF ( auto_renew && patron.autorenew_checkouts ) %]
649
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" checked="checked" />
650
                                                            [% ELSIF patron.autorenew_checkouts %]
651
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
652
                                                            [% ELSE %]
653
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
654
                                                                title="Patron has opted out of auto-renewal"/>
655
                                                            [% END %]
641
                                                        [% END %]
656
                                                        [% END %]
642
                                                    [% END %]
643
657
644
                                                    [% UNLESS ( noissues ) %]
658
                                                        <label for="auto_renew">Automatic renewal</label>
645
                                                        <div id="set-automatic-renewal" class="circ-setting">
659
                                                    </div>
660
                                                    [% IF Koha.Preference('decreaseLoanHighHolds') %]
661
                                                        <div id="set_high_holds_overrride" class="circ-setting">
646
                                                            [% IF NEEDSCONFIRMATION %]
662
                                                            [% IF NEEDSCONFIRMATION %]
647
                                                                [% IF auto_renew %]
663
                                                                [% IF override_high_holds %]
648
                                                                    [% IF patron.autorenew_checkouts %]
664
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
649
                                                                        <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
650
                                                                        title="Patron has opted out of auto-renewal"/>
651
                                                                    [% ELSE %]
652
                                                                        <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" checked="checked" />
653
                                                                    [% END %]
654
                                                                [% ELSE %]
665
                                                                [% ELSE %]
655
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
666
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
656
                                                                [% END %]
667
                                                                [% END %]
657
                                                            [% ELSE %]
668
                                                            [% ELSE %]
658
                                                                [% IF ( auto_renew && patron.autorenew_checkouts ) %]
669
                                                                [% IF override_high_holds %]
659
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" checked="checked" />
670
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
660
                                                                [% ELSIF patron.autorenew_checkouts %]
661
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
662
                                                                [% ELSE %]
671
                                                                [% ELSE %]
663
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
672
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
664
                                                                    title="Patron has opted out of auto-renewal"/>
665
                                                                [% END %]
673
                                                                [% END %]
666
                                                            [% END %]
674
                                                            [% END %]
667
675
                                                            <label for="override_high_holds">Don't decrease checkout length based on holds</label>
668
                                                            <label for="auto_renew">Automatic renewal</label>
669
                                                        </div>
676
                                                        </div>
670
                                                        [% IF Koha.Preference('decreaseLoanHighHolds') %]
671
                                                            <div id="set_high_holds_overrride" class="circ-setting">
672
                                                                [% IF NEEDSCONFIRMATION %]
673
                                                                    [% IF override_high_holds %]
674
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
675
                                                                    [% ELSE %]
676
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
677
                                                                    [% END %]
678
                                                                [% ELSE %]
679
                                                                    [% IF override_high_holds %]
680
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
681
                                                                    [% ELSE %]
682
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
683
                                                                    [% END %]
684
                                                                [% END %]
685
                                                                <label for="override_high_holds">Don't decrease checkout length based on holds</label>
686
                                                            </div>
687
                                                        [% END %]
688
                                                    [% END %]
677
                                                    [% END %]
678
                                                [% END %]
689
679
690
                                                    [% IF Koha.Preference('OnSiteCheckouts') %]
680
                                                [% IF Koha.Preference('OnSiteCheckouts') %]
691
                                                        <div id="onsite_checkout-select" class="circ-setting">
681
                                                    <div id="onsite_checkout-select" class="circ-setting">
692
                                                            [% IF noissues %]
682
                                                        [% IF noissues %]
693
                                                                <div class="onsite-checkout-only">
683
                                                            <div class="onsite-checkout-only">
694
                                                                    <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
684
                                                                <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
695
                                                                    <input type="text" name="duedatespec" id="duedatespec" />
685
                                                                <input type="text" name="duedatespec" id="duedatespec" />
696
                                                                    <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
686
                                                                <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
697
                                                                </div>
687
                                                            </div>
688
                                                        [% ELSE %]
689
                                                            [% IF Koha.Preference('OnSiteCheckoutAutoCheck') && onsite_checkout == "on" %]
690
                                                            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" checked="checked" /> <label for="onsite_checkout">On-site checkout</label>
698
                                                            [% ELSE %]
691
                                                            [% ELSE %]
699
                                                                [% IF Koha.Preference('OnSiteCheckoutAutoCheck') && onsite_checkout == "on" %]
692
                                                            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
700
                                                                <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" checked="checked" /> <label for="onsite_checkout">On-site checkout</label>
701
                                                                [% ELSE %]
702
                                                                <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
703
                                                                [% END %]
704
                                                            [% END %]
693
                                                            [% END %]
705
                                                        </div>
694
                                                        [% END %]
706
                                                    [% END %]
695
                                                    </div>
707
708
                                                </div> <!-- /.circ-settings -->
709
710
                                                <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
711
                                                <input type="hidden" name="branch" value="[% branch | html %]" />
712
                                                <input type="hidden" name="debt_confirmed" value="[% debt_confirmed | html %]" />
713
                                                [% IF ( CHARGES ) %]
714
                                                        <input type="hidden" name="charges" value="yes" />
715
                                                [% END %]
696
                                                [% END %]
716
                                            </fieldset> <!-- /#circ_circulation_issue -->
717
718
                                            [% IF ( issue ) %]
719
                                                <div class="lastchecked">
720
                                                    <p><strong>Checked out: </strong>[% issue.item.biblio.title | html %] ([% issue.item.barcode | html %]). Due on [% issue.date_due | $KohaDates as_due_date => 1 %]</p>
721
                                                </div>
722
                                            [% END %]
723
                                        </form> <!-- /#mainform -->
724
                                    </div> <!-- /.col-sm-6 -->
725
697
726
                                [% END #/IF !noissues %]
698
                                            </div> <!-- /.circ-settings -->
727
699
728
                                [% IF ( noissues ) %]
700
                                            <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
729
                                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
701
                                            <input type="hidden" name="branch" value="[% branch | html %]" />
730
                                        <div class="col-sm-6">
702
                                            <input type="hidden" name="debt_confirmed" value="[% debt_confirmed | html %]" />
731
                                    [% ELSE %]
703
                                            [% IF ( CHARGES ) %]
732
                                        <div>
704
                                                    <input type="hidden" name="charges" value="yes" />
733
                                    [% END %]
705
                                            [% END %]
734
                                [% ELSE %]
706
                                        </fieldset> <!-- /#circ_circulation_issue -->
735
                                    <div class="col-sm-6">
736
                                [% END %]
737
707
738
                                [% IF ( noissues ) %]
708
                                        [% IF ( issue ) %]
739
                                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
709
                                            <div class="lastchecked">
740
                                        <div id="circmessages" class="circmessage attention">
710
                                                <p><strong>Checked out: </strong>[% issue.item.biblio.title | html %] ([% issue.item.barcode | html %]). Due on [% issue.date_due | $KohaDates as_due_date => 1 %]</p>
741
                                    [% ELSE %]
711
                                            </div>
742
                                        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
743
                                        <div id="circmessages" class="circmessage warning">
744
                                    [% END %]
745
                                    <h3>
746
                                        Cannot check out!
747
                                        [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
748
                                            <span class="circ-hlt">Only on-site checkouts are allowed</span>
749
                                        [% END %]
712
                                        [% END %]
750
                                    </h3>
713
                                    </form> <!-- /#mainform -->
751
                                [% ELSE %]
714
                                </div> <!-- /.col-sm-6 -->
752
                                    <div id="circmessages" class="circmessage attention">
753
                                [% END %]
754
715
755
                                [% INCLUDE 'patron_messages.inc' %]
716
                            [% END #/IF !noissues %]
756
717
757
                            </div> <!-- /#circmessages -->
718
                            [% IF ( noissues ) %]
758
                        </div> <!-- /div or div.col-sm-6 -->
719
                                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
759
                    </div> <!-- /.row -->
720
                                    <div class="col-sm-6">
760
761
                    <div id="patronlists" class="toptabs">
762
                        <ul>
763
                            <li>
764
                                [% IF ( issuecount ) %]
765
                                    <a href="#checkouts">[% issuecount | html %] Checkout(s)</a>
766
                                [% ELSE %]
721
                                [% ELSE %]
767
                                    <a href="#checkouts">0 Checkouts</a>
722
                                    <div>
768
                                [% END %]
723
                                [% END %]
769
                            </li>
724
                            [% ELSE %]
770
725
                                <div class="col-sm-6">
771
                            [% IF relatives_issues_count %]
772
                                <li><a id="relatives-issues-tab" href="#relatives-issues">[% relatives_issues_count | html %] Relatives' checkouts</a></li>
773
                            [% END %]
726
                            [% END %]
774
727
775
                            <li>
728
                            [% IF ( noissues ) %]
776
                                [% IF ( holds_count ) %]
729
                                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
777
                                    <a href="#reserves" id="holds-tab">[% holds_count | html %] Hold(s)</a>
730
                                    <div id="circmessages" class="circmessage attention">
778
                                [% ELSE %]
731
                                [% ELSE %]
779
                                    <a href="#reserves" id="holds-tab">0 Holds</a>
732
                                    <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
733
                                    <div id="circmessages" class="circmessage warning">
780
                                [% END %]
734
                                [% END %]
781
                            </li>
735
                                <h3>
782
736
                                    Cannot check out!
783
                            [% IF Koha.Preference('ArticleRequests') %]
737
                                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
784
                                <li>
738
                                        <span class="circ-hlt">Only on-site checkouts are allowed</span>
785
                                    <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count | html %] Article requests</a>
739
                                    [% END %]
786
                                </li>
740
                                </h3>
741
                            [% ELSE %]
742
                                <div id="circmessages" class="circmessage attention">
787
                            [% END %]
743
                            [% END %]
788
744
789
                            [% IF Koha.Preference('ClaimReturnedLostValue') %]
745
                            [% INCLUDE 'patron_messages.inc' %]
790
                                <li>
746
791
                                    [% IF ( patron.return_claims.count ) %]
747
                        </div> <!-- /#circmessages -->
792
                                        <a href="#return-claims" id="return-claims-tab">
748
                    </div> <!-- /div or div.col-sm-6 -->
793
                                            Claim(s)
749
                </div> <!-- /.row -->
794
                                            [% IF patron.return_claims.resolved.count == 0 %]
750
795
                                                <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
751
                <div id="patronlists" class="toptabs">
796
                                            [% ELSE %]
752
                    <ul>
797
                                                <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
753
                        <li>
798
                                            [% END %]
754
                            [% IF ( issuecount ) %]
799
                                            [% IF patron.return_claims.unresolved.count == 0 %]
755
                                <a href="#checkouts">[% issuecount | html %] Checkout(s)</a>
800
                                                <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
756
                            [% ELSE %]
801
                                            [% ELSE %]
757
                                <a href="#checkouts">0 Checkouts</a>
802
                                                <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
803
                                            [% END %]
804
                                        </a>
805
                                    [% ELSE %]
806
                                        <a href="#return-claims" id="return-claims-tab">
807
                                            Claim(s)
808
                                            <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span>
809
                                            <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>
810
                                        </a>
811
                                    [% END %]
812
                                </li>
813
                            [% END %]
758
                            [% END %]
759
                        </li>
814
760
815
                            <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count | html %] Restrictions</a></li>
761
                        [% IF relatives_issues_count %]
762
                            <li><a id="relatives-issues-tab" href="#relatives-issues">[% relatives_issues_count | html %] Relatives' checkouts</a></li>
763
                        [% END %]
816
764
817
                            [% SET enrollments = patron.get_club_enrollments(1) %]
765
                        <li>
818
                            [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
766
                            [% IF ( holds_count ) %]
819
                            [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
767
                                <a href="#reserves" id="holds-tab">[% holds_count | html %] Hold(s)</a>
820
                                <li>
768
                            [% ELSE %]
821
                                    <a id="clubs-tab-link" href="#clubs-tab">
769
                                <a href="#reserves" id="holds-tab">0 Holds</a>
822
                                        Clubs ([% enrollments.count | html %]/[% enrollable.count | html %])
823
                                    </a>
824
                                </li>
825
                            [% END %]
770
                            [% END %]
826
                        </ul>
771
                        </li>
827
772
828
                        <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
773
                        [% IF Koha.Preference('ArticleRequests') %]
774
                            <li>
775
                                <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count | html %] Article requests</a>
776
                            </li>
777
                        [% END %]
829
778
830
                        [% INCLUDE "checkouts-table.inc" %]
779
                        [% IF Koha.Preference('ClaimReturnedLostValue') %]
780
                            <li>
781
                                [% IF ( patron.return_claims.count ) %]
782
                                    <a href="#return-claims" id="return-claims-tab">
783
                                        Claim(s)
784
                                        [% IF patron.return_claims.resolved.count == 0 %]
785
                                            <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
786
                                        [% ELSE %]
787
                                            <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
788
                                        [% END %]
789
                                        [% IF patron.return_claims.unresolved.count == 0 %]
790
                                            <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
791
                                        [% ELSE %]
792
                                            <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
793
                                        [% END %]
794
                                    </a>
795
                                [% ELSE %]
796
                                    <a href="#return-claims" id="return-claims-tab">
797
                                        Claim(s)
798
                                        <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span>
799
                                        <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>
800
                                    </a>
801
                                [% END %]
802
                            </li>
803
                        [% END %]
831
804
832
                        [% INCLUDE "relatives-issues-table.inc" %]
805
                        <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count | html %] Restrictions</a></li>
833
806
807
                        [% SET enrollments = patron.get_club_enrollments(1) %]
808
                        [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
834
                        [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
809
                        [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
835
                            <div id="clubs-tab">
810
                            <li>
836
                                Loading...
811
                                <a id="clubs-tab-link" href="#clubs-tab">
837
                            </div> <!-- /#clubs-tab -->
812
                                    Clubs ([% enrollments.count | html %]/[% enrollable.count | html %])
813
                                </a>
814
                            </li>
838
                        [% END %]
815
                        [% END %]
816
                    </ul>
839
817
840
                        [% INCLUDE borrower_debarments.inc %]
818
                    <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
841
819
842
                        <div id="reserves">
820
                    [% INCLUDE "checkouts-table.inc" %]
843
                            [% IF ( holds_count ) %]
844
                                <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
845
                                    <input type="hidden" name="from" value="circ" />
846
                                    <table id="holds-table" style="width: 100% !Important;">
847
                                        <thead>
848
                                            <tr>
849
                                                <th>Hold date</th>
850
                                                <th>Title</th>
851
                                                <th>Call number</th>
852
                                                <th>Barcode</th>
853
                                                <th>Pickup at</th>
854
                                                <th>Expiration</th>
855
                                                <th>Priority</th>
856
                                                <th>Cancel?</th>
857
                                                <th>Suspend?</th>
858
                                                <th>Status</th>
859
                                            </tr>
860
                                        </thead>
861
                                    </table>
862
863
                                    <fieldset class="action">
864
                                        <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
865
866
                                        [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
867
                                        [% IF hold_cancellation %]
868
                                            <select name="cancellation-reason">
869
                                                <option value="">No reason given</option>
870
                                                [% FOREACH reason IN hold_cancellation %]
871
                                                    <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
872
                                                [% END %]
873
                                            </select>
874
                                        [% END %]
875
                                    </fieldset>
876
                                </form>
877
821
878
                                [% IF Koha.Preference('SuspendHoldsIntranet') %]
822
                    [% INCLUDE "relatives-issues-table.inc" %]
879
                                    <fieldset class="action">
880
                                        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
881
                                            <input type="hidden" name="from" value="circ" />
882
                                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
883
                                            <input type="submit" value="Suspend all holds" />
884
885
                                            [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
886
                                            <label for="suspend_until">until</label>
887
                                            <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker futuredate"/>
888
                                            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
889
                                             [% END %]
890
                                        </form>
891
                                    </fieldset>
892
893
                                    <fieldset class="action">
894
                                        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
895
                                            <input type="hidden" name="from" value="circ" />
896
                                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
897
                                            <input type="hidden" name="suspend" value="0" />
898
                                            <input type="submit" value="Resume all suspended holds" />
899
                                        </form>
900
                                    </fieldset>
901
                                [% END # /IF SuspendHoldsIntranet %]
902
903
                            [% ELSE # IF holds_count %]
904
                                <p>Patron has nothing on hold.</p>
905
                            [% END # /IF holds_count %]
906
                        </div> <!-- /#reserves -->
907
823
908
                        [% IF Koha.Preference('ClaimReturnedLostValue') %]
824
                    [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
909
                            [% INCLUDE 'patron-return-claims.inc' %]
825
                        <div id="clubs-tab">
910
                        [% END %]
826
                            Loading...
827
                        </div> <!-- /#clubs-tab -->
828
                    [% END %]
911
829
912
                        [% IF Koha.Preference('ArticleRequests') %]
830
                    [% INCLUDE borrower_debarments.inc %]
913
                            [% INCLUDE 'patron-article-requests.inc' %]
831
914
                        [% END %]
832
                    <div id="reserves">
833
                        [% IF ( holds_count ) %]
834
                            <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
835
                                <input type="hidden" name="from" value="circ" />
836
                                <table id="holds-table" style="width: 100% !Important;">
837
                                    <thead>
838
                                        <tr>
839
                                            <th>Hold date</th>
840
                                            <th>Title</th>
841
                                            <th>Call number</th>
842
                                            <th>Barcode</th>
843
                                            <th>Pickup at</th>
844
                                            <th>Expiration</th>
845
                                            <th>Priority</th>
846
                                            <th>Cancel?</th>
847
                                            <th>Suspend?</th>
848
                                            <th>Status</th>
849
                                        </tr>
850
                                    </thead>
851
                                </table>
852
853
                                <fieldset class="action">
854
                                    <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
855
856
                                    [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
857
                                    [% IF hold_cancellation %]
858
                                        <select name="cancellation-reason">
859
                                            <option value="">No reason given</option>
860
                                            [% FOREACH reason IN hold_cancellation %]
861
                                                <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
862
                                            [% END %]
863
                                        </select>
864
                                    [% END %]
865
                                </fieldset>
866
                            </form>
915
867
916
                    </div> <!-- /#patronlists -->
868
                            [% IF Koha.Preference('SuspendHoldsIntranet') %]
917
                    [% ELSIF borrowernumber # IF patron %]
869
                                <fieldset class="action">
918
                        <div class="dialog message">Patron not found. <a href="/cgi-bin/koha/members/members-home.pl">Return to search</a></div>
870
                                    <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
919
                    [% END # /IF patron %]
871
                                        <input type="hidden" name="from" value="circ" />
872
                                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
873
                                        <input type="submit" value="Suspend all holds" />
874
875
                                        [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
876
                                        <label for="suspend_until">until</label>
877
                                        <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker futuredate"/>
878
                                        <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
879
                                         [% END %]
880
                                    </form>
881
                                </fieldset>
882
883
                                <fieldset class="action">
884
                                    <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
885
                                        <input type="hidden" name="from" value="circ" />
886
                                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
887
                                        <input type="hidden" name="suspend" value="0" />
888
                                        <input type="submit" value="Resume all suspended holds" />
889
                                    </form>
890
                                </fieldset>
891
                            [% END # /IF SuspendHoldsIntranet %]
892
893
                        [% ELSE # IF holds_count %]
894
                            <p>Patron has nothing on hold.</p>
895
                        [% END # /IF holds_count %]
896
                    </div> <!-- /#reserves -->
897
898
                    [% IF Koha.Preference('ClaimReturnedLostValue') %]
899
                        [% INCLUDE 'patron-return-claims.inc' %]
900
                    [% END %]
920
901
921
                [% END #/IF borrowers %]
902
                    [% IF Koha.Preference('ArticleRequests') %]
903
                        [% INCLUDE 'patron-article-requests.inc' %]
904
                    [% END %]
905
906
                </div> <!-- /#patronlists -->
907
                [% ELSIF borrowernumber # IF patron %]
908
                    <div class="dialog message">Patron not found. <a href="/cgi-bin/koha/members/members-home.pl">Return to search</a></div>
909
                [% END # /IF patron %]
922
910
923
                </div> <!-- /.col-sm-10.col-sm-push-2 -->
911
                </div> <!-- /.col-sm-10.col-sm-push-2 -->
924
912
925
                [% IF Koha.Preference('CircSidebar') %]
913
                [% IF Koha.Preference('CircSidebar') %]
926
                    [% UNLESS ( borrowers ) %]
914
                    [% IF not( borrowernumber and patron ) %]
927
                        [% IF not( borrowernumber and patron ) %]
915
                        <div class="col-sm-2 col-sm-pull-10">
928
                            <div class="col-sm-2 col-sm-pull-10">
916
                            <aside>
929
                                <aside>
917
                                [% INCLUDE 'circ-nav.inc' %]
930
                                    [% INCLUDE 'circ-nav.inc' %]
918
                            </aside>
931
                                </aside>
919
                        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
932
                            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
933
                        [% END %]
934
                    [% END %]
920
                    [% END %]
935
                [% END %]
921
                [% END %]
936
922
937
                [% UNLESS ( borrowers ) %]
923
                [% IF borrowernumber and patron %]
938
                    [% IF borrowernumber and patron %]
924
                        <div class="col-sm-2 col-sm-pull-10">
939
                            <div class="col-sm-2 col-sm-pull-10">
925
                            <aside>
940
                                <aside>
926
                        [% INCLUDE 'circ-menu.inc' %]
941
                            [% INCLUDE 'circ-menu.inc' %]
927
                            </aside>
942
                                </aside>
928
                        </div> <!-- /.col-sm-2 col-sm-pull-10 -->
943
                            </div> <!-- /.col-sm-2 col-sm-pull-10 -->
944
                    [% END %]
945
                [% END %]
929
                [% END %]
946
930
947
            </div> <!-- /.row -->
931
            </div> <!-- /.row -->
Lines 994-1000 Link Here
994
    [% Asset.js("js/pages/circulation.js") | $raw %]
978
    [% Asset.js("js/pages/circulation.js") | $raw %]
995
    [% Asset.js("js/checkouts.js") | $raw %]
979
    [% Asset.js("js/checkouts.js") | $raw %]
996
    [% Asset.js("js/holds.js") | $raw %]
980
    [% Asset.js("js/holds.js") | $raw %]
997
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
998
    <script>
981
    <script>
999
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
982
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1000
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
983
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
Lines 1007-1013 Link Here
1007
            Cookies.remove("holdfor", { path: '/' });
990
            Cookies.remove("holdfor", { path: '/' });
1008
        [% END %]
991
        [% END %]
1009
992
1010
        [% UNLESS ( patron.borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
993
        [% UNLESS ( patron.borrowernumber ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %]
1011
994
1012
        // On-site checkout
995
        // On-site checkout
1013
        function toggle_onsite_checkout(){
996
        function toggle_onsite_checkout(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (-1 / +2 lines)
Lines 451-457 Link Here
451
                            // redirect if there is only 1 result.
451
                            // redirect if there is only 1 result.
452
                            if ( json.aaData.length == 1 ) {
452
                            if ( json.aaData.length == 1 ) {
453
                                var borrowernumber = json.aaData[0].borrowernumber;
453
                                var borrowernumber = json.aaData[0].borrowernumber;
454
                                document.location.href="/cgi-bin/koha/members/moremember.pl?borrowernumber="+borrowernumber;
454
                                var redirect_to = [% UNLESS circsearch %]"members/moremember"[% ELSE %]"circ/circulation"[% END %]; 
455
                                document.location.href="/cgi-bin/koha/"+redirect_to+".pl?borrowernumber="+borrowernumber;
455
                                return false;
456
                                return false;
456
                            }
457
                            }
457
                            fnCallback(json);
458
                            fnCallback(json);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt (-1 / +1 lines)
Lines 16-22 Link Here
16
                    "<input type='checkbox' id='check[% data.borrowernumber | html %]' class='selection' name='borrowernumber' value='[% data.borrowernumber | html %]' />",
16
                    "<input type='checkbox' id='check[% data.borrowernumber | html %]' class='selection' name='borrowernumber' value='[% data.borrowernumber | html %]' />",
17
                [% END %]
17
                [% END %]
18
                "dt_cardnumber":
18
                "dt_cardnumber":
19
                    "<label for='check[% data.borrowernumber | html %]'>[% data.cardnumber | html | $To %]</label>",
19
                "<label for='check[% data.borrowernumber | html %]'>[% data.cardnumber | html | $To %]</br><a class='btn' href='/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% data.borrowernumber | html %]'>Check out</a></label>",
20
                "dt_name":
20
                "dt_name":
21
                    "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | html %]\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber | html %]\" style='white-space:nowrap'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br /><div class='address'><ul>[%~ INCLUDE 'display-address-style' patron=data no_line_break=1 | $To ~%][% IF data.email %]<li>Email: <a href='mailto:[% data.email | html | $To %]'>[% data.email | html | $To %]</a></li>[% END %]</ul></div>",
21
                    "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | html %]\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber | html %]\" style='white-space:nowrap'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br /><div class='address'><ul>[%~ INCLUDE 'display-address-style' patron=data no_line_break=1 | $To ~%][% IF data.email %]<li>Email: <a href='mailto:[% data.email | html | $To %]'>[% data.email | html | $To %]</a></li>[% END %]</ul></div>",
22
    "dt_dateofbirth":
22
    "dt_dateofbirth":
(-)a/members/member.pl (-3 / +4 lines)
Lines 43-50 my $theme = $input->param('theme') || "default"; Link Here
43
43
44
my $searchmember = $input->param('searchmember');
44
my $searchmember = $input->param('searchmember');
45
my $quicksearch = $input->param('quicksearch') // 0;
45
my $quicksearch = $input->param('quicksearch') // 0;
46
my $circsearch = $input->param('circsearch') // 0;
46
47
47
if ( $quicksearch and $searchmember ) {
48
if ( $quicksearch and $searchmember && !$circsearch ) {
48
    my $branchcode;
49
    my $branchcode;
49
    if ( C4::Context::only_my_library ) {
50
    if ( C4::Context::only_my_library ) {
50
        my $userenv = C4::Context->userenv;
51
        my $userenv = C4::Context->userenv;
Lines 66-72 my $searchfieldstype = $input->param('searchfieldstype') || 'standard'; Link Here
66
67
67
$template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' );
68
$template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' );
68
69
69
my $view = $input->request_method() eq "GET" ? "show_form" : "show_results";
70
my $view = $input->request_method() eq "GET"  && !$circsearch ? "show_form" : "show_results";
70
71
71
$template->param(
72
$template->param(
72
    patron_lists => [ GetPatronLists() ],
73
    patron_lists => [ GetPatronLists() ],
Lines 77-82 $template->param( Link Here
77
    searchfieldstype    => $searchfieldstype,
78
    searchfieldstype    => $searchfieldstype,
78
    PatronsPerPage      => C4::Context->preference("PatronsPerPage") || 20,
79
    PatronsPerPage      => C4::Context->preference("PatronsPerPage") || 20,
79
    view                => $view,
80
    view                => $view,
81
    circsearch          => $circsearch,
80
);
82
);
81
83
82
output_html_with_http_headers $input, $cookie, $template->output;
84
output_html_with_http_headers $input, $cookie, $template->output;
83
- 

Return to bug 15812