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 (-314 / +297 lines)
Lines 561-946 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
                                                        </div>
630
                                                    [% END %]
631
                                                [% END %]
623
632
624
                                                    [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
633
                                                [% UNLESS ( noissues ) %]
625
                                                        [% IF ( SpecifyDueDate ) %]
634
                                                    <div id="set-automatic-renewal" class="circ-setting">
626
                                                            <div id="specify-due-date" class="circ-setting">
635
                                                        [% IF NEEDSCONFIRMATION %]
627
                                                                <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
636
                                                            [% IF auto_renew %]
628
                                                                [% IF ( duedatespec ) %]
637
                                                                [% IF patron.autorenew_checkouts %]
629
                                                                    <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" />
638
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
630
                                                                [% ELSE %]
639
                                                                    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 %]
640
                                                                [% ELSE %]
637
                                                                    <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
641
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" checked="checked" />
638
                                                                [% END %]
642
                                                                [% END %]
639
                                                            </div>
643
                                                            [% ELSE %]
644
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
645
                                                            [% END %]
646
                                                        [% ELSE %]
647
                                                            [% IF ( auto_renew && patron.autorenew_checkouts ) %]
648
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" checked="checked" />
649
                                                            [% ELSIF patron.autorenew_checkouts %]
650
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
651
                                                            [% ELSE %]
652
                                                                <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
653
                                                                title="Patron has opted out of auto-renewal"/>
654
                                                            [% END %]
640
                                                        [% END %]
655
                                                        [% END %]
641
                                                    [% END %]
642
656
643
                                                    [% UNLESS ( noissues ) %]
657
                                                        <label for="auto_renew">Automatic renewal</label>
644
                                                        <div id="set-automatic-renewal" class="circ-setting">
658
                                                    </div>
659
                                                    [% IF Koha.Preference('decreaseLoanHighHolds') %]
660
                                                        <div id="set_high_holds_overrride" class="circ-setting">
645
                                                            [% IF NEEDSCONFIRMATION %]
661
                                                            [% IF NEEDSCONFIRMATION %]
646
                                                                [% IF auto_renew %]
662
                                                                [% IF override_high_holds %]
647
                                                                    [% IF patron.autorenew_checkouts %]
663
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
648
                                                                        <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
649
                                                                        title="Patron has opted out of auto-renewal"/>
650
                                                                    [% ELSE %]
651
                                                                        <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" checked="checked" />
652
                                                                    [% END %]
653
                                                                [% ELSE %]
664
                                                                [% ELSE %]
654
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
665
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
655
                                                                [% END %]
666
                                                                [% END %]
656
                                                            [% ELSE %]
667
                                                            [% ELSE %]
657
                                                                [% IF ( auto_renew && patron.autorenew_checkouts ) %]
668
                                                                [% IF override_high_holds %]
658
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" checked="checked" />
669
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
659
                                                                [% ELSIF patron.autorenew_checkouts %]
660
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
661
                                                                [% ELSE %]
670
                                                                [% ELSE %]
662
                                                                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
671
                                                                    <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
663
                                                                    title="Patron has opted out of auto-renewal"/>
664
                                                                [% END %]
672
                                                                [% END %]
665
                                                            [% END %]
673
                                                            [% END %]
666
674
                                                            <label for="override_high_holds">Don't decrease checkout length based on holds</label>
667
                                                            <label for="auto_renew">Automatic renewal</label>
668
                                                        </div>
675
                                                        </div>
669
                                                        [% IF Koha.Preference('decreaseLoanHighHolds') %]
670
                                                            <div id="set_high_holds_overrride" class="circ-setting">
671
                                                                [% IF NEEDSCONFIRMATION %]
672
                                                                    [% IF override_high_holds %]
673
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
674
                                                                    [% ELSE %]
675
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
676
                                                                    [% END %]
677
                                                                [% ELSE %]
678
                                                                    [% IF override_high_holds %]
679
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
680
                                                                    [% ELSE %]
681
                                                                        <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
682
                                                                    [% END %]
683
                                                                [% END %]
684
                                                                <label for="override_high_holds">Don't decrease checkout length based on holds</label>
685
                                                            </div>
686
                                                        [% END %]
687
                                                    [% END %]
676
                                                    [% END %]
677
                                                [% END %]
688
678
689
                                                    [% IF Koha.Preference('OnSiteCheckouts') %]
679
                                                [% IF Koha.Preference('OnSiteCheckouts') %]
690
                                                        <div id="onsite_checkout-select" class="circ-setting">
680
                                                    <div id="onsite_checkout-select" class="circ-setting">
691
                                                            [% IF noissues %]
681
                                                        [% IF noissues %]
692
                                                                <div class="onsite-checkout-only">
682
                                                            <div class="onsite-checkout-only">
693
                                                                    <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>
683
                                                                <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>
694
                                                                    <input type="text" name="duedatespec" id="duedatespec" />
684
                                                                <input type="text" name="duedatespec" id="duedatespec" />
695
                                                                    <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
685
                                                                <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
696
                                                                </div>
686
                                                            </div>
687
                                                        [% ELSE %]
688
                                                            [% IF Koha.Preference('OnSiteCheckoutAutoCheck') && onsite_checkout == "on" %]
689
                                                            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" checked="checked" /> <label for="onsite_checkout">On-site checkout</label>
697
                                                            [% ELSE %]
690
                                                            [% ELSE %]
698
                                                                [% IF Koha.Preference('OnSiteCheckoutAutoCheck') && onsite_checkout == "on" %]
691
                                                            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
699
                                                                <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" checked="checked" /> <label for="onsite_checkout">On-site checkout</label>
700
                                                                [% ELSE %]
701
                                                                <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
702
                                                                [% END %]
703
                                                            [% END %]
692
                                                            [% END %]
704
                                                        </div>
693
                                                        [% END %]
705
                                                    [% END %]
694
                                                    </div>
706
707
                                                </div> <!-- /.circ-settings -->
708
709
                                                <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
710
                                                <input type="hidden" name="branch" value="[% branch | html %]" />
711
                                                <input type="hidden" name="debt_confirmed" value="[% debt_confirmed | html %]" />
712
                                                [% IF ( CHARGES ) %]
713
                                                        <input type="hidden" name="charges" value="yes" />
714
                                                [% END %]
695
                                                [% END %]
715
                                            </fieldset> <!-- /#circ_circulation_issue -->
716
717
                                            [% IF ( issue ) %]
718
                                                <div class="lastchecked">
719
                                                    <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>
720
                                                </div>
721
                                            [% END %]
722
                                        </form> <!-- /#mainform -->
723
                                    </div> <!-- /.col-sm-6 -->
724
696
725
                                [% END #/IF !noissues %]
697
                                            </div> <!-- /.circ-settings -->
726
698
727
                                [% IF ( noissues ) %]
699
                                            <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
728
                                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
700
                                            <input type="hidden" name="branch" value="[% branch | html %]" />
729
                                        <div class="col-sm-6">
701
                                            <input type="hidden" name="debt_confirmed" value="[% debt_confirmed | html %]" />
730
                                    [% ELSE %]
702
                                            [% IF ( CHARGES ) %]
731
                                        <div>
703
                                                    <input type="hidden" name="charges" value="yes" />
732
                                    [% END %]
704
                                            [% END %]
733
                                [% ELSE %]
705
                                        </fieldset> <!-- /#circ_circulation_issue -->
734
                                    <div class="col-sm-6">
735
                                [% END %]
736
706
737
                                [% IF ( noissues ) %]
707
                                        [% IF ( issue ) %]
738
                                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
708
                                            <div class="lastchecked">
739
                                        <div id="circmessages" class="circmessage attention">
709
                                                <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>
740
                                    [% ELSE %]
710
                                            </div>
741
                                        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
742
                                        <div id="circmessages" class="circmessage warning">
743
                                    [% END %]
744
                                    <h3>
745
                                        Cannot check out!
746
                                        [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
747
                                            <span class="circ-hlt">Only on-site checkouts are allowed</span>
748
                                        [% END %]
711
                                        [% END %]
749
                                    </h3>
712
                                    </form> <!-- /#mainform -->
750
                                [% ELSE %]
713
                                </div> <!-- /.col-sm-6 -->
751
                                    <div id="circmessages" class="circmessage attention">
752
                                [% END %]
753
754
                                [% INCLUDE 'patron_messages.inc' %]
755
714
756
                            </div> <!-- /#circmessages -->
715
                            [% END #/IF !noissues %]
757
                        </div> <!-- /div or div.col-sm-6 -->
758
                    </div> <!-- /.row -->
759
716
760
                    <div id="patronlists" class="toptabs">
717
                            [% IF ( noissues ) %]
761
                        <ul>
718
                                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
762
                            <li>
719
                                    <div class="col-sm-6">
763
                                [% IF ( issuecount ) %]
764
                                    <a href="#checkouts">[% issuecount | html %] Checkout(s)</a>
765
                                [% ELSE %]
720
                                [% ELSE %]
766
                                    <a href="#checkouts">0 Checkouts</a>
721
                                    <div>
767
                                [% END %]
722
                                [% END %]
768
                            </li>
723
                            [% ELSE %]
769
724
                                <div class="col-sm-6">
770
                            [% IF relatives_issues_count %]
771
                                <li><a id="relatives-issues-tab" href="#relatives-issues">[% relatives_issues_count | html %] Relatives' checkouts</a></li>
772
                            [% END %]
725
                            [% END %]
773
726
774
                            <li>
727
                            [% IF ( noissues ) %]
775
                                [% IF ( holds_count ) %]
728
                                [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
776
                                    <a href="#reserves" id="holds-tab">[% holds_count | html %] Hold(s)</a>
729
                                    <div id="circmessages" class="circmessage attention">
777
                                [% ELSE %]
730
                                [% ELSE %]
778
                                    <a href="#reserves" id="holds-tab">0 Holds</a>
731
                                    <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
732
                                    <div id="circmessages" class="circmessage warning">
779
                                [% END %]
733
                                [% END %]
780
                            </li>
734
                                <h3>
781
735
                                    Cannot check out!
782
                            [% IF Koha.Preference('ArticleRequests') %]
736
                                    [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
783
                                <li>
737
                                        <span class="circ-hlt">Only on-site checkouts are allowed</span>
784
                                    <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count | html %] Article requests</a>
738
                                    [% END %]
785
                                </li>
739
                                </h3>
740
                            [% ELSE %]
741
                                <div id="circmessages" class="circmessage attention">
786
                            [% END %]
742
                            [% END %]
787
743
788
                            [% IF Koha.Preference('ClaimReturnedLostValue') %]
744
                            [% INCLUDE 'patron_messages.inc' %]
789
                                <li>
745
790
                                    [% IF ( patron.return_claims.count ) %]
746
                        </div> <!-- /#circmessages -->
791
                                        <a href="#return-claims" id="return-claims-tab">
747
                    </div> <!-- /div or div.col-sm-6 -->
792
                                            Claim(s)
748
                </div> <!-- /.row -->
793
                                            [% IF patron.return_claims.resolved.count == 0 %]
749
794
                                                <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
750
                <div id="patronlists" class="toptabs">
795
                                            [% ELSE %]
751
                    <ul>
796
                                                <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
752
                        <li>
797
                                            [% END %]
753
                            [% IF ( issuecount ) %]
798
                                            [% IF patron.return_claims.unresolved.count == 0 %]
754
                                <a href="#checkouts">[% issuecount | html %] Checkout(s)</a>
799
                                                <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
755
                            [% ELSE %]
800
                                            [% ELSE %]
756
                                <a href="#checkouts">0 Checkouts</a>
801
                                                <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
802
                                            [% END %]
803
                                        </a>
804
                                    [% ELSE %]
805
                                        <a href="#return-claims" id="return-claims-tab">
806
                                            Claim(s)
807
                                            <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span>
808
                                            <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>
809
                                        </a>
810
                                    [% END %]
811
                                </li>
812
                            [% END %]
757
                            [% END %]
758
                        </li>
813
759
814
                            <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count | html %] Restrictions</a></li>
760
                        [% IF relatives_issues_count %]
761
                            <li><a id="relatives-issues-tab" href="#relatives-issues">[% relatives_issues_count | html %] Relatives' checkouts</a></li>
762
                        [% END %]
815
763
816
                            [% SET enrollments = patron.get_club_enrollments(1) %]
764
                        <li>
817
                            [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
765
                            [% IF ( holds_count ) %]
818
                            [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
766
                                <a href="#reserves" id="holds-tab">[% holds_count | html %] Hold(s)</a>
819
                                <li>
767
                            [% ELSE %]
820
                                    <a id="clubs-tab-link" href="#clubs-tab">
768
                                <a href="#reserves" id="holds-tab">0 Holds</a>
821
                                        Clubs ([% enrollments.count | html %]/[% enrollable.count | html %])
822
                                    </a>
823
                                </li>
824
                            [% END %]
769
                            [% END %]
825
                        </ul>
770
                        </li>
826
771
827
                        <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
772
                        [% IF Koha.Preference('ArticleRequests') %]
773
                            <li>
774
                                <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count | html %] Article requests</a>
775
                            </li>
776
                        [% END %]
828
777
829
                        [% INCLUDE "checkouts-table.inc" %]
778
                        [% IF Koha.Preference('ClaimReturnedLostValue') %]
779
                            <li>
780
                                [% IF ( patron.return_claims.count ) %]
781
                                    <a href="#return-claims" id="return-claims-tab">
782
                                        Claim(s)
783
                                        [% IF patron.return_claims.resolved.count == 0 %]
784
                                            <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
785
                                        [% ELSE %]
786
                                            <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
787
                                        [% END %]
788
                                        [% IF patron.return_claims.unresolved.count == 0 %]
789
                                            <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
790
                                        [% ELSE %]
791
                                            <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
792
                                        [% END %]
793
                                    </a>
794
                                [% ELSE %]
795
                                    <a href="#return-claims" id="return-claims-tab">
796
                                        Claim(s)
797
                                        <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span>
798
                                        <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>
799
                                    </a>
800
                                [% END %]
801
                            </li>
802
                        [% END %]
830
803
831
                        [% INCLUDE "relatives-issues-table.inc" %]
804
                        <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.count | html %] Restrictions</a></li>
832
805
806
                        [% SET enrollments = patron.get_club_enrollments(1) %]
807
                        [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
833
                        [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
808
                        [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
834
                            <div id="clubs-tab">
809
                            <li>
835
                                Loading...
810
                                <a id="clubs-tab-link" href="#clubs-tab">
836
                            </div> <!-- /#clubs-tab -->
811
                                    Clubs ([% enrollments.count | html %]/[% enrollable.count | html %])
812
                                </a>
813
                            </li>
837
                        [% END %]
814
                        [% END %]
815
                    </ul>
838
816
839
                        [% INCLUDE borrower_debarments.inc %]
817
                    <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
840
818
841
                        <div id="reserves">
819
                    [% INCLUDE "checkouts-table.inc" %]
842
                            [% IF ( holds_count ) %]
843
                                <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
844
                                    <input type="hidden" name="from" value="circ" />
845
                                    <table id="holds-table" style="width: 100% !Important;">
846
                                        <thead>
847
                                            <tr>
848
                                                <th>Hold date</th>
849
                                                <th>Title</th>
850
                                                <th>Call number</th>
851
                                                <th>Barcode</th>
852
                                                <th>Pickup at</th>
853
                                                <th>Expiration</th>
854
                                                <th>Priority</th>
855
                                                <th>Cancel?</th>
856
                                                <th>Suspend?</th>
857
                                                <th>Status</th>
858
                                            </tr>
859
                                        </thead>
860
                                    </table>
861
862
                                    <fieldset class="action">
863
                                        <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
864
865
                                        [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
866
                                        [% IF hold_cancellation %]
867
                                            <select name="cancellation-reason">
868
                                                <option value="">No reason given</option>
869
                                                [% FOREACH reason IN hold_cancellation %]
870
                                                    <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
871
                                                [% END %]
872
                                            </select>
873
                                        [% END %]
874
                                    </fieldset>
875
                                </form>
876
820
877
                                [% IF Koha.Preference('SuspendHoldsIntranet') %]
821
                    [% INCLUDE "relatives-issues-table.inc" %]
878
                                    <fieldset class="action">
879
                                        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
880
                                            <input type="hidden" name="from" value="circ" />
881
                                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
882
                                            <input type="submit" value="Suspend all holds" />
883
884
                                            [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
885
                                            <label for="suspend_until">until</label>
886
                                            <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr futuredate"/>
887
                                            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
888
                                             [% END %]
889
                                        </form>
890
                                    </fieldset>
891
892
                                    <fieldset class="action">
893
                                        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
894
                                            <input type="hidden" name="from" value="circ" />
895
                                            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
896
                                            <input type="hidden" name="suspend" value="0" />
897
                                            <input type="submit" value="Resume all suspended holds" />
898
                                        </form>
899
                                    </fieldset>
900
                                [% END # /IF SuspendHoldsIntranet %]
901
902
                            [% ELSE # IF holds_count %]
903
                                <p>Patron has nothing on hold.</p>
904
                            [% END # /IF holds_count %]
905
                        </div> <!-- /#reserves -->
906
822
907
                        [% IF Koha.Preference('ClaimReturnedLostValue') %]
823
                    [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
908
                            [% INCLUDE 'patron-return-claims.inc' %]
824
                        <div id="clubs-tab">
909
                        [% END %]
825
                            Loading...
826
                        </div> <!-- /#clubs-tab -->
827
                    [% END %]
910
828
911
                        [% IF Koha.Preference('ArticleRequests') %]
829
                    [% INCLUDE borrower_debarments.inc %]
912
                            [% INCLUDE 'patron-article-requests.inc' %]
830
913
                        [% END %]
831
                    <div id="reserves">
832
                        [% IF ( holds_count ) %]
833
                            <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
834
                                <input type="hidden" name="from" value="circ" />
835
                                <table id="holds-table" style="width: 100% !Important;">
836
                                    <thead>
837
                                        <tr>
838
                                            <th>Hold date</th>
839
                                            <th>Title</th>
840
                                            <th>Call number</th>
841
                                            <th>Barcode</th>
842
                                            <th>Pickup at</th>
843
                                            <th>Expiration</th>
844
                                            <th>Priority</th>
845
                                            <th>Cancel?</th>
846
                                            <th>Suspend?</th>
847
                                            <th>Status</th>
848
                                        </tr>
849
                                    </thead>
850
                                </table>
851
852
                                <fieldset class="action">
853
                                    <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
854
855
                                    [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
856
                                    [% IF hold_cancellation %]
857
                                        <select name="cancellation-reason">
858
                                            <option value="">No reason given</option>
859
                                            [% FOREACH reason IN hold_cancellation %]
860
                                                <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
861
                                            [% END %]
862
                                        </select>
863
                                    [% END %]
864
                                </fieldset>
865
                            </form>
866
867
                            [% IF Koha.Preference('SuspendHoldsIntranet') %]
868
                                <fieldset class="action">
869
                                    <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
870
                                        <input type="hidden" name="from" value="circ" />
871
                                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
872
                                        <input type="submit" value="Suspend all holds" />
873
874
                                        [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
875
                                        <label for="suspend_until">until</label>
876
                                        <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr futuredate"/>
877
                                        <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
878
                                         [% END %]
879
                                    </form>
880
                                </fieldset>
881
882
                                <fieldset class="action">
883
                                    <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
884
                                        <input type="hidden" name="from" value="circ" />
885
                                        <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
886
                                        <input type="hidden" name="suspend" value="0" />
887
                                        <input type="submit" value="Resume all suspended holds" />
888
                                    </form>
889
                                </fieldset>
890
                            [% END # /IF SuspendHoldsIntranet %]
891
892
                        [% ELSE # IF holds_count %]
893
                            <p>Patron has nothing on hold.</p>
894
                        [% END # /IF holds_count %]
895
                    </div> <!-- /#reserves -->
896
897
                    [% IF Koha.Preference('ClaimReturnedLostValue') %]
898
                        [% INCLUDE 'patron-return-claims.inc' %]
899
                    [% END %]
914
900
915
                    </div> <!-- /#patronlists -->
901
                    [% IF Koha.Preference('ArticleRequests') %]
916
                    [% ELSIF borrowernumber # IF patron %]
902
                        [% INCLUDE 'patron-article-requests.inc' %]
917
                        <div class="dialog message">Patron not found. <a href="/cgi-bin/koha/members/members-home.pl">Return to search</a></div>
903
                    [% END %]
918
                    [% END # /IF patron %]
919
904
920
                [% END #/IF borrowers %]
905
                </div> <!-- /#patronlists -->
906
                [% ELSIF borrowernumber # IF patron %]
907
                    <div class="dialog message">Patron not found. <a href="/cgi-bin/koha/members/members-home.pl">Return to search</a></div>
908
                [% END # /IF patron %]
921
909
922
                </div> <!-- /.col-sm-10.col-sm-push-2 -->
910
                </div> <!-- /.col-sm-10.col-sm-push-2 -->
923
911
924
                [% IF Koha.Preference('CircSidebar') %]
912
                [% IF Koha.Preference('CircSidebar') %]
925
                    [% UNLESS ( borrowers ) %]
913
                    [% IF not( borrowernumber and patron ) %]
926
                        [% IF not( borrowernumber and patron ) %]
914
                        <div class="col-sm-2 col-sm-pull-10">
927
                            <div class="col-sm-2 col-sm-pull-10">
915
                            <aside>
928
                                <aside>
916
                                [% INCLUDE 'circ-nav.inc' %]
929
                                    [% INCLUDE 'circ-nav.inc' %]
917
                            </aside>
930
                                </aside>
918
                        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
931
                            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
932
                        [% END %]
933
                    [% END %]
919
                    [% END %]
934
                [% END %]
920
                [% END %]
935
921
936
                [% UNLESS ( borrowers ) %]
922
                [% IF borrowernumber and patron %]
937
                    [% IF borrowernumber and patron %]
923
                        <div class="col-sm-2 col-sm-pull-10">
938
                            <div class="col-sm-2 col-sm-pull-10">
924
                            <aside>
939
                                <aside>
925
                        [% INCLUDE 'circ-menu.inc' %]
940
                            [% INCLUDE 'circ-menu.inc' %]
926
                            </aside>
941
                                </aside>
927
                        </div> <!-- /.col-sm-2 col-sm-pull-10 -->
942
                            </div> <!-- /.col-sm-2 col-sm-pull-10 -->
943
                    [% END %]
944
                [% END %]
928
                [% END %]
945
929
946
            </div> <!-- /.row -->
930
            </div> <!-- /.row -->
Lines 993-999 Link Here
993
    [% Asset.js("js/pages/circulation.js") | $raw %]
977
    [% Asset.js("js/pages/circulation.js") | $raw %]
994
    [% Asset.js("js/checkouts.js") | $raw %]
978
    [% Asset.js("js/checkouts.js") | $raw %]
995
    [% Asset.js("js/holds.js") | $raw %]
979
    [% Asset.js("js/holds.js") | $raw %]
996
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
997
    <script>
980
    <script>
998
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
981
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
999
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
982
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
Lines 1006-1012 Link Here
1006
            Cookies.remove("holdfor", { path: '/' });
989
            Cookies.remove("holdfor", { path: '/' });
1007
        [% END %]
990
        [% END %]
1008
991
1009
        [% UNLESS ( patron.borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
992
        [% UNLESS ( patron.borrowernumber ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %]
1010
993
1011
        // On-site checkout
994
        // On-site checkout
1012
        function toggle_onsite_checkout(){
995
        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