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

(-)a/circ/circulation.pl (-4 / +4 lines)
Lines 468-474 if ($patron) { Link Here
468
if ( $patron ) {
468
if ( $patron ) {
469
    my $noissues;
469
    my $noissues;
470
    if ( $patron->gonenoaddress ) {
470
    if ( $patron->gonenoaddress ) {
471
        $template->param( gna => 1 );
471
        $template->param( gonenoaddress => 1 );
472
        $noissues = 1;
472
        $noissues = 1;
473
    }
473
    }
474
    if ( $patron->lost ) {
474
    if ( $patron->lost ) {
Lines 476-482 if ( $patron ) { Link Here
476
        $noissues = 1;
476
        $noissues = 1;
477
    }
477
    }
478
    if ( $patron->is_debarred ) {
478
    if ( $patron->is_debarred ) {
479
        $template->param( dbarred=> 1 );
479
        $template->param( is_debarred=> 1 );
480
        $noissues = 1;
480
        $noissues = 1;
481
    }
481
    }
482
    my $account = $patron->account;
482
    my $account = $patron->account;
Lines 545-551 if ( $patron ) { Link Here
545
    }
545
    }
546
}
546
}
547
547
548
my $messages = Koha::Patron::Messages->search(
548
my $patron_messages = Koha::Patron::Messages->search(
549
    {
549
    {
550
        'me.borrowernumber' => $borrowernumber,
550
        'me.borrowernumber' => $borrowernumber,
551
    },
551
    },
Lines 601-607 if ($restoreduedatespec || $stickyduedate) { Link Here
601
}
601
}
602
602
603
$template->param(
603
$template->param(
604
    messages           => $messages,
604
    patron_messages           => $patron_messages,
605
    borrowernumber    => $borrowernumber,
605
    borrowernumber    => $borrowernumber,
606
    branch            => $branch,
606
    branch            => $branch,
607
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
607
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (-6 / +3 lines)
Lines 1702-1719 i { Link Here
1702
}
1702
}
1703
1703
1704
1704
1705
.blocker {
1705
.blocker,
1706
    color: #990000;
1707
}
1708
1709
.inaccurate-item-statuses {
1706
.inaccurate-item-statuses {
1710
    color: #990000;
1707
    color: #990000;
1711
}
1708
}
1712
1709
1713
.circmessage {
1710
.circmessage {
1714
    li {
1711
    li {
1715
        list-style: url("../img/arrow-bullet.gif");
1712
        list-style: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiIHZpZXdCb3g9IjAgMCAyNSAyNSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTkuNjYuOTVoNC41Nmw5LjIxIDExLjg1LTkuMjEgMTAuNTNIOS42Nmw1LjA4LTEwLjUzeiIvPjwvc3ZnPg==");
1716
        margin-bottom: .2em;
1713
        margin-bottom: .4em;
1717
    }
1714
    }
1718
}
1715
}
1719
1716
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc (+190 lines)
Line 0 Link Here
1
[% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
2
[% SET return_claims = patron.return_claims %]
3
4
[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || userdebarreddate || debarredcomment || odues || charges || charges_guarantors_guarantees || charges_guarantees || credits ) %]
5
    <h3>Attention</h3>
6
    <ul>
7
        [% IF ( has_modifications ) %]
8
            <li class="has_modifications">
9
                <span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
10
                [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
11
                        <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
12
                [% END %]
13
            </li>
14
        [% END %]
15
16
        [% IF ( warndeparture ) %]
17
            <li class="warndeparture">
18
                <span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
19
                Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
20
21
            </li>
22
        [% END %]
23
24
        [% IF ( returnbeforeexpiry ) %]
25
            <li class="returnbeforeexpiry">
26
                <span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the expiry date is before the date due, the date due will be set to the expiry date
27
            </li>
28
        [% END %]
29
30
        [% IF ( expired ) %]
31
            <li class="expired">
32
                <span class="circ-hlt">Expiration:</span> Patron's card has expired.
33
                [% IF ( expiry ) %]
34
                    Patron's card expired on [% expiry | $KohaDates %]
35
                [% END %]
36
                <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
37
            </li>
38
        [% END %]
39
40
        [% IF ( patron.gonenoaddress ) %]
41
            <li class="gonenoaddress blocker">
42
                <span class="circ-hlt">Address:</span> Patron's address in doubt
43
            </li>
44
        [% END %]
45
46
        [% IF ( patron.lost ) %]
47
            <li class="lost blocker">
48
                <span class="circ-hlt">Lost: </span> Patron's card is lost
49
            </li>
50
        [% END %]
51
52
        [% IF ( userdebarred ) %]
53
            <li class="userdebarred blocker">
54
                <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
55
56
                [% IF ( userdebarreddate ) %]
57
                    until [% userdebarreddate | $KohaDates %]
58
                [% END %]
59
60
                [% IF ( debarredcomment ) %]
61
                    with the explanation: <br/>
62
                    <em>
63
                        [% IF debarredcomment.search('OVERDUES_PROCESS') %]
64
                            Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | $raw | html_line_break %]
65
                        [% ELSE %]
66
                            [% debarredcomment | $raw | html_line_break %]
67
                        [% END %]
68
                    </em><br/>
69
                [% END %]
70
                <a class="btn btn-xs btn-default" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
71
72
                [% IF (noissues && CAN_user_circulate_force_checkout) %]
73
                    <span class="override_debarment">
74
                        <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-xs btn-default">Override restriction temporarily</a>
75
                    </span>
76
                [% END %]
77
            </li> <!-- /.blocker -->
78
        [% END # /IF userdebarred %]
79
80
        [% IF ( odues ) %]
81
            <li class="odues blocker">
82
                <span class="circ-hlt">Overdues:</span>  Patron has ITEMS OVERDUE <a href="#checkouts">See highlighted items below</a>
83
            </li>
84
        [% END %]
85
86
        [% IF return_claims.count > ClaimReturnedWarningThreshold %]
87
            <li class="return_claims blocker">
88
                <span class="circ-hlt return-claims">Return claims:</span> Patron has [% return_claims.count | html %] RETURN CLAIMS
89
            </li>
90
        [% END %]
91
92
        [% IF age_limitations %]
93
            [% INCLUDE 'category-out-of-age-limit.inc' %]
94
        [% END %]
95
96
        [% IF ( charges ) %]
97
            [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
98
        [% END %]
99
100
        [% IF ( charges_guarantors_guarantees ) %]
101
            <li class="charges_guarantors_guarantees">
102
                <span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %].
103
                [% IF noissues %]
104
                    <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
105
                [% END %]
106
            </li>
107
        [% END %]
108
109
        [% IF ( charges_guarantees ) %]
110
            <li class="charges_guarantees">
111
                <span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
112
                    [% IF noissues %]
113
                        <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
114
                    [% END %]
115
            </li>
116
        [% END %]
117
118
        [% IF ( credits ) %]
119
            <li class="credits">
120
                <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of <span class="credit"><strong>[% creditsamount | $Price %]</strong></span>[% END %]
121
            </li>
122
        [% END %]
123
124
    </ul>
125
126
[% END # /F ( has_modifications || warndeparture... %]
127
128
[% IF WaitingHolds.count %]
129
    <div id="holdswaiting" class="circmessage">
130
        <h4>Holds waiting</h4>
131
        [% FOREACH w IN WaitingHolds %]
132
            <ul>
133
                <li>
134
                    <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
135
                    ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
136
                    [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
137
                    [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
138
                    Hold placed on [% w.reservedate | $KohaDates %].
139
140
                    <br/>
141
                    [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
142
                        [% SET expires_on = w.expirationdate %]
143
                        Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
144
                    </strong>
145
                </li>
146
            </ul>
147
        [% END %]
148
    </div> <!-- /#holdswaiting -->
149
[% END # /IF WaitingHolds.count %]
150
151
[% IF ( patron.borrowernotes ) %]
152
    <div id="circnotes" class="circmessage">
153
        <h4>Notes</h4>
154
        <ul>
155
            <li>
156
                <span class="circ-hlt">
157
                    [% patron.borrowernotes | $raw | html_line_break %]
158
                </span>
159
            </li>
160
        </ul>
161
    </div> <!-- /#circnotes -->
162
[% END # /IF patron.borrowernotes %]
163
164
[% IF ( patron_messages ) %]
165
    <div id="messages" class="circmessage">
166
        <h4>Messages</h4>
167
        <ul>
168
            [% FOREACH patron_message IN patron_messages %]
169
                <li>
170
                    [% IF(patron_message.message_type == "L") %]
171
                        <span class="circ-hlt">
172
                    [% ELSE %]
173
                        <span>
174
                    [% END %]
175
                        [% patron_message.message_date | $KohaDates %]
176
                        [% Branches.GetName( patron_message.branchcode ) | html %]
177
                        [% IF patron_message.manager_id %]
178
                            ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron_message.manager_id | uri %]">[% patron_message.get_column('manager_firstname') | html %] [% patron_message.get_column('manager_surname') | html %]</a> )
179
                        [% END %]
180
                        <em>"[% patron_message.message | html %]"</em>
181
                    </span>
182
                    [% IF patron_message.branchcode == patron.branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
183
                        <a class="btn btn-link" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&amp;borrowernumber=[% patron_message.borrowernumber | html %]&amp;from=moremember" onclick='return confirm(_("Are you sure you want to delete this message? This cannot be undone."));'><i class="fa fa-trash"></i> Delete</a>
184
                    [% END %]
185
                </li>
186
            [% END %]
187
        </ul>
188
        <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
189
    </div> <!-- /#messages -->
190
[% END # /IF patron_messages %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-169 / +1 lines)
Lines 721-898 Link Here
721
                                    </h3>
721
                                    </h3>
722
                                [% ELSE %]
722
                                [% ELSE %]
723
                                    <div id="circmessages" class="circmessage attention">
723
                                    <div id="circmessages" class="circmessage attention">
724
                                        <h3>Attention:</h3>
725
                                [% END %]
724
                                [% END %]
726
725
727
                                <ul>
726
                                [% INCLUDE 'patron_messages.inc' %]
728
                                    [% IF ( has_modifications ) %]
729
                                       <li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
730
                                            [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
731
                                                    <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
732
                                            [% END %]
733
                                       </li>
734
                                    [% END %]
735
736
                                    [% IF ( warndeparture ) %]
737
                                        <li>
738
                                            <span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
739
                                            Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
740
741
                                        </li>
742
                                    [% END %]
743
744
                                    [% IF ( returnbeforeexpiry ) %]
745
                                        <li>
746
                                            <span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the expiry date is before the date due, the date due will be set to the expiry date
747
                                        </li>
748
                                    [% END %]
749
750
                                    [% IF ( expired ) %]
751
                                        <li>
752
                                            <span class="circ-hlt">Expiration:</span> Patron's card has expired.
753
                                            [% IF ( expiry ) %]
754
                                                Patron's card expired on [% expiry | $KohaDates %]
755
                                            [% END %]
756
                                            <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
757
                                        </li>
758
                                    [% END %]
759
760
                                    [% IF ( gna ) %]
761
                                        <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
762
                                    [% END %]
763
764
                                    [% IF ( lost ) %]
765
                                        <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
766
                                    [% END %]
767
768
                                    [% IF ( userdebarred ) %]
769
                                        <li class="blocker">
770
                                            <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
771
772
                                            [% IF ( userdebarreddate ) %]
773
                                                until [% userdebarreddate | $KohaDates %]
774
                                            [% END %]
775
776
                                            [% IF ( debarredcomment ) %]
777
                                                with the explanation: <br/>
778
                                                <em>
779
                                                    [% IF debarredcomment.search('OVERDUES_PROCESS') %]
780
                                                        Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | $raw | html_line_break %]
781
                                                    [% ELSE %]
782
                                                        [% debarredcomment | $raw | html_line_break %]
783
                                                    [% END %]
784
                                                </em>
785
                                            [% END %]
786
                                            <br/>
787
                                            <a class="btn btn-default" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
788
789
                                            [% IF (noissues && patron && CAN_user_circulate_force_checkout) %]
790
                                                <span class="override_debarment">
791
                                                    <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default">Override restriction temporarily</a>
792
                                                </span>
793
                                            [% END %]
794
                                       </li> <!-- /.blocker -->
795
                                    [% END # /IF userdebarred %]
796
797
                                    [% IF ( odues ) %]
798
                                        <li><span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a></li>
799
                                    [% END %]
800
727
801
                                    [% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
802
                                    [% SET return_claims = patron.return_claims %]
803
                                    [% IF return_claims.count > ClaimReturnedWarningThreshold %]
804
                                        <li><span class="circ-hlt return-claims">Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.</span>
805
                                    [% END %]
806
807
808
                                    [% IF age_limitations %]
809
                                        [% INCLUDE 'category-out-of-age-limit.inc' %]
810
                                    [% END %]
811
812
                                    [% IF ( charges ) %]
813
                                        [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
814
                                    [% END %]
815
                                    [% IF ( charges_guarantors_guarantees ) %]
816
                                        <li>
817
                                            <span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %].
818
                                            [% IF noissues %]
819
                                                <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
820
                                            [% END %]
821
                                        </li>
822
                                    [% END %]
823
                                    [% IF ( charges_guarantees ) %]
824
                                        <li>
825
                                            <span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
826
                                                [% IF noissues %]
827
                                                    <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
828
                                                [% END %]
829
                                        </li>
830
                                    [% END %]
831
832
833
                                    [% IF ( credits ) %]
834
                                        <li>
835
                                            <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount | $Price %][% END %]
836
                                        </li>
837
                                    [% END %]
838
839
                                </ul>
840
841
                                [% IF WaitingHolds.count %]
842
                                    <div id="holdswaiting" class="circmessage">
843
                                        <h4>Holds waiting:</h4>
844
                                        [% FOREACH w IN WaitingHolds %]
845
                                            <ul>
846
                                                <li>
847
                                                    <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
848
                                                    ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
849
                                                    [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
850
                                                    [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
851
                                                    Hold placed on [% w.reservedate | $KohaDates %].
852
853
                                                    <br/>
854
                                                    [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
855
                                                        [% SET expires_on = w.expirationdate %]
856
                                                        Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
857
                                                    </strong>
858
                                                </li>
859
                                            </ul>
860
                                        [% END %]
861
                                    </div>
862
                                [% END # /IF WaitingHolds.count %]
863
864
                                [% IF ( notes ) %]
865
                                    <div id="circnotes" class="circmessage">
866
                                       <h4>Notes:</h4>
867
                                        <p><span class="circ-hlt">[% notesmsg | $raw %]</span></p>
868
                                    </div>
869
                                [% END %]
870
871
                                <div id="messages" class="circmessage">
872
                                    <h4>Messages:</h4>
873
                                    <ul>
874
                                        [% FOREACH message IN messages %]
875
                                            <li>
876
                                                [% IF(message.message_type == "L") %]
877
                                                    <span class="circ-hlt">
878
                                                [% ELSE %]
879
                                                    <span>
880
                                                [% END %]
881
                                                    [% message.message_date | $KohaDates %]
882
                                                    [% Branches.GetName( message.branchcode ) | html %]
883
                                                    [% IF message.manager_id %]
884
                                                        ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id | uri %]">[% message.get_column('manager_firstname') | html %] [% message.get_column('manager_surname') | html %]</a> )
885
                                                    [% END %]
886
                                                    <em>"[% message.message | html %]"</em>
887
                                                </span>
888
                                                [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
889
                                                    <a class="btn btn-link" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id | html %]&amp;borrowernumber=[% message.borrowernumber | html %]" onclick='return confirm(_("Are you sure you want to delete this message? This cannot be undone."));'><i class="fa fa-trash"></i> Delete</a>
890
                                                [% END %]
891
                                            </li>
892
                                        [% END %]
893
                                    </ul>
894
                                    <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
895
                                </div> <!-- /.messages -->
896
                            </div> <!-- /#circmessages -->
728
                            </div> <!-- /#circmessages -->
897
                        </div> <!-- /div or div.col-sm-6 -->
729
                        </div> <!-- /div or div.col-sm-6 -->
898
                    </div> <!-- /.row -->
730
                    </div> <!-- /.row -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-106 / +11 lines)
Lines 2-7 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE ItemTypes %]
5
[% USE KohaDates %]
6
[% USE KohaDates %]
6
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
7
[% USE TablesSettings %]
8
[% USE TablesSettings %]
Lines 83-201 Link Here
83
84
84
                    <div class="row">
85
                    <div class="row">
85
86
87
                        <h3>
88
                            [% UNLESS ( I ) %]
89
                                [% patron.title | html %] [% patron.firstname | html %]
90
                            [% END %]
91
                            [% patron.surname | html %] ([% patron.cardnumber | html %])
92
                        </h3>
93
86
                        [% IF ( was_renewed ) %]
94
                        [% IF ( was_renewed ) %]
87
                            <div class="dialog message">
95
                            <div class="dialog message">
88
                                Patron's account has been renewed until [% patron.dateexpiry | $KohaDates %]
96
                                Patron's account has been renewed until [% patron.dateexpiry | $KohaDates %]
89
                            </div>
97
                            </div>
90
                        [% END %]
98
                        [% END %]
91
99
92
                        [% IF fines || age_limitations %]
100
                        <div id="patron_messages" class="circmessage attention">
93
                            <div id="circmessages" class="circmessage attention">
101
                            [% INCLUDE 'patron_messages.inc' %]
94
                                <ul>
102
                        </div>
95
                                    [% IF fines %]
96
                                        [% INCLUDE 'blocked-fines.inc' %]
97
                                    [% END %]
98
                                    [% IF age_limitations %]
99
                                        [% INCLUDE 'category-out-of-age-limit.inc' %]
100
                                    [% END %]
101
                                </ul>
102
                            </div>
103
                        [% END %]
104
105
                        [% IF ( patron_messages ) %]
106
                            <div id="messages" class="circmessage">
107
                                <h4>Messages:</h4>
108
                                <ul>
109
                                    [% FOREACH patron_message IN patron_messages %]
110
                                        <li>
111
                                            [% IF(patron_message.message_type == "L") %]
112
                                                <span class="circ-hlt">
113
                                            [% ELSE %]
114
                                                <span>
115
                                            [% END %]
116
                                                [% patron_message.message_date | $KohaDates %]
117
                                                [% Branches.GetName( patron_message.branchcode ) | html %]
118
                                                [% IF patron_message.manager_id %]
119
                                                    ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron_message.manager_id | uri %]">[% patron_message.get_column('manager_firstname') | html %] [% patron_message.get_column('manager_surname') | html %]</a> )
120
                                                [% END %]
121
                                                <em>"[% patron_message.message | html %]"</em>
122
                                            </span>
123
                                            [% IF patron_message.branchcode == patron.branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
124
                                                <a class="btn btn-link" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&amp;borrowernumber=[% patron_message.borrowernumber | html %]&amp;from=moremember" onclick='return confirm(_("Are you sure you want to delete this message? This cannot be undone."));'><i class="fa fa-trash"></i> Delete</a>
125
                                            [% END %]
126
                                        </li>
127
                                    [% END %]
128
                                </ul>
129
                                <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
130
                            </div>
131
                        [% END %]
132
133
                        [% IF ( patron.borrowernotes ) %]
134
                             <div id="circnotes" class="circmessage">
135
                                 <h4>Notes: </h4>
136
                                     <ul><li>
137
                                       <span class="circ-hlt">
138
                                             [% patron.borrowernotes | $raw | html_line_break %]
139
                                       </span>
140
                                    </li></ul>
141
                              </div>
142
                        [% END %]
143
144
                        [% IF ( flagged ) %]
145
                            <div id="circmessages" class="circmessage attention">
146
                                <ul>
147
                                    [% IF ( patron.is_debarred ) %]
148
                                        <li class="blocker">Patron's account is restricted
149
                                            [% IF ( userdebarreddate ) %]
150
                                                until [% userdebarreddate | $KohaDates %]
151
                                            [% END %]
152
153
                                            [% IF ( patron.debarredcomment ) %]
154
                                                with the explanation: <em>
155
                                                [% IF patron.debarredcomment.search('OVERDUES_PROCESS') %]
156
                                                    Restriction added by overdues process [% patron.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
157
                                                [% ELSE %]
158
                                                    [% patron.debarredcomment | html_line_break %]
159
                                                [% END %]
160
                                                </em>
161
                                            [% END %]
162
                                            <a href="#reldebarments" id="view_restrictions">View restrictions</a>
163
                                        </li>
164
                                    [% END %]
165
                                    [% IF ( patron.gonenoaddress ) %]
166
                                        <li class="blocker">Patron's address is in doubt.</li>
167
                                    [% END %]
168
                                    [% IF ( patron.lost ) %]
169
                                        <li class="blocker">Patron's card has been reported lost.</li>
170
                                    [% END %]
171
                                    [% IF ( patron.is_expired ) %]
172
                                        <li class="blocker">
173
                                            <span class="circ-hlt">Expiration:</span>
174
                                            [% IF ( patron.dateexpiry ) %]
175
                                                Patron's card expired on [% patron.dateexpiry | $KohaDates %].
176
                                            [% ELSE %]
177
                                                Patron's card has expired.
178
                                            [% END %]
179
                                            <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
180
                                        </li>
181
                                    [% ELSIF ( patron.is_going_to_expire ) %]
182
                                        <li>
183
                                            <span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
184
                                            Patron's card expires on [% patron.dateexpiry | $KohaDates %]
185
                                            <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
186
                                        </li>
187
                                    [% END %]
188
189
                                </ul>
190
                            </div>
191
                        [% END %]
192
103
193
                        <h3>
194
                            [% UNLESS ( I ) %]
195
                                [% patron.title | html %] [% patron.firstname | html %]
196
                            [% END %]
197
                            [% patron.surname | html %] ([% patron.cardnumber | html %])
198
                        </h3>
199
                        <div class="col-sm-6">
104
                        <div class="col-sm-6">
200
105
201
                            <div id="patron-information" class="patroninfo-section">
106
                            <div id="patron-information" class="patroninfo-section">
(-)a/members/moremember.pl (-2 / +73 lines)
Lines 34-44 use C4::Auth; Link Here
34
use C4::Output;
34
use C4::Output;
35
use C4::Form::MessagingPreferences;
35
use C4::Form::MessagingPreferences;
36
use List::MoreUtils qw/uniq/;
36
use List::MoreUtils qw/uniq/;
37
use Scalar::Util qw( looks_like_number );
37
use Koha::Patron::Attribute::Types;
38
use Koha::Patron::Attribute::Types;
38
use Koha::Patron::Debarments qw(GetDebarments);
39
use Koha::Patron::Debarments qw(GetDebarments);
39
use Koha::Patron::Messages;
40
use Koha::Patron::Messages;
40
use Koha::DateUtils;
41
use Koha::DateUtils;
41
use Koha::CsvProfiles;
42
use Koha::CsvProfiles;
43
use Koha::Holds;
42
use Koha::Patrons;
44
use Koha::Patrons;
43
use Koha::Patron::Files;
45
use Koha::Patron::Files;
44
use Koha::Token;
46
use Koha::Token;
Lines 89-100 for (qw(gonenoaddress lost borrowernotes is_debarred)) { Link Here
89
91
90
if ( $patron->is_debarred ) {
92
if ( $patron->is_debarred ) {
91
    $template->param(
93
    $template->param(
92
        debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }),
94
        'userdebarred'    => $patron->debarred,
95
        'debarredcomment' => $patron->debarredcomment,
93
    );
96
    );
97
94
    if ( $patron->debarred ne "9999-12-31" ) {
98
    if ( $patron->debarred ne "9999-12-31" ) {
95
        $template->param( 'userdebarreddate' => $patron->debarred );
99
        $template->param( 'userdebarreddate' => $patron->debarred );
96
    }
100
    }
97
}
101
}
102
98
$template->param( flagged => 1 ) if $patron->account_locked;
103
$template->param( flagged => 1 ) if $patron->account_locked;
99
104
100
my @relatives;
105
my @relatives;
Lines 196-201 if ( $patron->is_expired || $patron->is_going_to_expire ) { Link Here
196
    );
201
    );
197
}
202
}
198
203
204
my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } ); # FIXME must be Koha::Patron->holds
205
my $waiting_holds = $holds->waiting;
206
$template->param(
207
    holds_count  => $holds->count(),
208
    WaitingHolds => $waiting_holds,
209
);
210
211
my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees");
212
$no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees );
213
if ( defined $no_issues_charge_guarantees ) {
214
    my $guarantees_non_issues_charges = 0;
215
    my $guarantees = $patron->guarantee_relationships->guarantees;
216
    while ( my $g = $guarantees->next ) {
217
        $guarantees_non_issues_charges += $g->account->non_issues_charges;
218
    }
219
    if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees ) {
220
        $template->param(
221
            charges_guarantees    => 1,
222
            chargesamount_guarantees => $guarantees_non_issues_charges,
223
        );
224
    }
225
}
226
227
if ( $patron->has_overdues ) {
228
    $template->param( odues => 1 );
229
}
230
my $issues = $patron->checkouts;
231
232
my $balance = 0;
233
$balance = $patron->account->balance;
234
235
my $account = $patron->account;
236
if( ( my $owing = $account->non_issues_charges ) > 0 ) {
237
    my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why??
238
    $template->param(
239
        charges => 1,
240
        chargesamount => $owing,
241
    )
242
} elsif ( $balance < 0 ) {
243
    $template->param(
244
        credits => 1,
245
        creditsamount => -$balance,
246
    );
247
}
248
249
# if the expiry date is before today ie they have expired
250
if ( $patron->is_expired ) {
251
    #borrowercard expired, no issues
252
    $template->param(
253
        expired => "1",
254
    );
255
}
256
# check for NotifyBorrowerDeparture
257
elsif ( $patron->is_going_to_expire ) {
258
    # borrower card soon to expire warn librarian
259
    $template->param( "warndeparture" => $patron->dateexpiry ,
260
                    );
261
    if (C4::Context->preference('ReturnBeforeExpiry')){
262
        $template->param("returnbeforeexpiry" => 1);
263
    }
264
}
265
266
267
my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => $borrowernumber } )->count;
268
199
$template->param(
269
$template->param(
200
    patron          => $patron,
270
    patron          => $patron,
201
    issuecount      => $patron->checkouts->count,
271
    issuecount      => $patron->checkouts->count,
Lines 210-215 $template->param( Link Here
210
    relatives_borrowernumbers => \@relatives,
280
    relatives_borrowernumbers => \@relatives,
211
    logged_in_user => $logged_in_user,
281
    logged_in_user => $logged_in_user,
212
    files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(),
282
    files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(),
283
    #debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
284
    has_modifications         => $has_modifications,
213
);
285
);
214
286
215
output_html_with_http_headers $input, $cookie, $template->output;
287
output_html_with_http_headers $input, $cookie, $template->output;
216
- 

Return to bug 27873