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

(-)a/circ/circulation.pl (-4 / +4 lines)
Lines 465-471 if ($patron) { Link Here
465
if ( $patron ) {
465
if ( $patron ) {
466
    my $noissues;
466
    my $noissues;
467
    if ( $patron->gonenoaddress ) {
467
    if ( $patron->gonenoaddress ) {
468
        $template->param( gna => 1 );
468
        $template->param( gonenoaddress => 1 );
469
        $noissues = 1;
469
        $noissues = 1;
470
    }
470
    }
471
    if ( $patron->lost ) {
471
    if ( $patron->lost ) {
Lines 473-479 if ( $patron ) { Link Here
473
        $noissues = 1;
473
        $noissues = 1;
474
    }
474
    }
475
    if ( $patron->is_debarred ) {
475
    if ( $patron->is_debarred ) {
476
        $template->param( dbarred=> 1 );
476
        $template->param( is_debarred=> 1 );
477
        $noissues = 1;
477
        $noissues = 1;
478
    }
478
    }
479
    my $account = $patron->account;
479
    my $account = $patron->account;
Lines 542-548 if ( $patron ) { Link Here
542
    }
542
    }
543
}
543
}
544
544
545
my $messages = Koha::Patron::Messages->search(
545
my $patron_messages = Koha::Patron::Messages->search(
546
    {
546
    {
547
        'me.borrowernumber' => $borrowernumber,
547
        'me.borrowernumber' => $borrowernumber,
548
    },
548
    },
Lines 598-604 if ($restoreduedatespec || $stickyduedate) { Link Here
598
}
598
}
599
599
600
$template->param(
600
$template->param(
601
    messages           => $messages,
601
    patron_messages           => $patron_messages,
602
    borrowernumber    => $borrowernumber,
602
    borrowernumber    => $borrowernumber,
603
    branch            => $branch,
603
    branch            => $branch,
604
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
604
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (-6 / +3 lines)
Lines 1720-1737 i { Link Here
1720
    }
1720
    }
1721
}
1721
}
1722
1722
1723
.blocker {
1723
.blocker,
1724
    color: #990000;
1725
}
1726
1727
.inaccurate-item-statuses {
1724
.inaccurate-item-statuses {
1728
    color: #990000;
1725
    color: #990000;
1729
}
1726
}
1730
1727
1731
.circmessage {
1728
.circmessage {
1732
    li {
1729
    li {
1733
        list-style: url("../img/arrow-bullet.gif");
1730
        list-style: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='5' viewBox='0 0 25 25'%3E%3Cpath fill='%23999' d='M9.66.95h4.56l9.21 11.85-9.21 10.53H9.66l5.08-10.53z'/%3E%3C/svg%3E");
1734
        margin-bottom: .2em;
1731
        margin-bottom: .4em;
1735
    }
1732
    }
1736
}
1733
}
1737
1734
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc (-1 / +1 lines)
Lines 23-29 Link Here
23
                                [% CASE 'MANUAL' %]
23
                                [% CASE 'MANUAL' %]
24
                                    Manual
24
                                    Manual
25
                                [% CASE 'OVERDUES' %]
25
                                [% CASE 'OVERDUES' %]
26
                                    Overdues
26
                                Overdues
27
                                [% CASE 'SUSPENSION' %]
27
                                [% CASE 'SUSPENSION' %]
28
                                    Suspension
28
                                    Suspension
29
                                [% CASE 'DISCHARGE' %]
29
                                [% CASE 'DISCHARGE' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc (+226 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 || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || 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
129
[% IF WaitingHolds.count %]
130
    <div id="holdswaiting" class="circmessage">
131
        [% SET waiting_here = 0 %]
132
        [% SET waiting_elsewhere = 0 %]
133
        [% FOREACH w IN WaitingHolds %]
134
            [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]
135
                [% waiting_here = waiting_here + 1 %]
136
            [% ELSE %]
137
                [% waiting_elsewhere = waiting_elsewhere + 1 %]
138
            [% END %]
139
        [% END %]
140
141
        [% IF ( waiting_here > 0 ) %]
142
            <h4>Holds waiting here ([% waiting_here | html %])</h4>
143
            <ul>
144
                [% FOREACH w IN WaitingHolds %]
145
                    [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]
146
                        <li>
147
                            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
148
                            ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
149
                            [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
150
                            [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
151
                            Hold placed on [% w.reservedate | $KohaDates %].
152
                            <br />
153
                            <strong class="waitinghere">
154
                                [% SET expires_on = w.expirationdate %]
155
                                Waiting here [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
156
                            </strong>
157
                        </li>
158
                    [% END %]
159
                [% END %]
160
            </ul>
161
        [% END %]
162
163
        [% IF ( waiting_elsewhere > 0 ) %]
164
            <h4>Holds waiting at other libraries ([% waiting_elsewhere | html %])</h4>
165
            <ul>
166
                [% FOREACH w IN WaitingHolds %]
167
                    [% IF ( w.branch.branchcode != Branches.GetLoggedInBranchcode()  ) %]
168
                        <li>
169
                            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
170
                            ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
171
                            [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
172
                            [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
173
                            Hold placed on [% w.reservedate | $KohaDates %].
174
                            <br />
175
                            <strong>
176
                                [% SET expires_on = w.expirationdate %]
177
                                Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
178
                            </strong>
179
                        </li>
180
                    [% END %]
181
                [% END %]
182
            </ul>
183
        [% END %]
184
    </div>
185
[% END # /IF WaitingHolds.count %]
186
187
[% IF ( patron.borrowernotes ) %]
188
    <div id="circnotes" class="circmessage">
189
        <h4>Notes</h4>
190
        <ul>
191
            <li>
192
                <span class="circ-hlt">
193
                    [% patron.borrowernotes | $raw | html_line_break %]
194
                </span>
195
            </li>
196
        </ul>
197
    </div> <!-- /#circnotes -->
198
[% END # /IF patron.borrowernotes %]
199
200
[% IF ( patron_messages ) %]
201
    <div id="messages" class="circmessage">
202
        <h4>Messages</h4>
203
        <ul>
204
            [% FOREACH patron_message IN patron_messages %]
205
                <li>
206
                    [% IF(patron_message.message_type == "L") %]
207
                        <span class="circ-hlt">
208
                    [% ELSE %]
209
                        <span>
210
                    [% END %]
211
                        [% patron_message.message_date | $KohaDates %]
212
                        [% Branches.GetName( patron_message.branchcode ) | html %]
213
                        [% IF patron_message.manager_id %]
214
                            ( <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> )
215
                        [% END %]
216
                        <em>"[% patron_message.message | html %]"</em>
217
                    </span>
218
                    [% IF patron_message.branchcode == patron.branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
219
                        <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>
220
                    [% END %]
221
                </li>
222
            [% END %]
223
        </ul>
224
        <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>
225
    </div> <!-- /#messages -->
226
[% END # /IF patron_messages %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-205 / +1 lines)
Lines 750-963 Link Here
750
                                    </h3>
750
                                    </h3>
751
                                [% ELSE %]
751
                                [% ELSE %]
752
                                    <div id="circmessages" class="circmessage attention">
752
                                    <div id="circmessages" class="circmessage attention">
753
                                        <h3>Attention:</h3>
754
                                [% END %]
753
                                [% END %]
755
754
756
                                <ul>
755
                                [% INCLUDE 'patron_messages.inc' %]
757
                                    [% IF ( has_modifications ) %]
758
                                       <li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
759
                                            [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
760
                                                    <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
761
                                            [% END %]
762
                                       </li>
763
                                    [% END %]
764
765
                                    [% IF ( warndeparture ) %]
766
                                        <li>
767
                                            <span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
768
                                            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>
769
770
                                        </li>
771
                                    [% END %]
772
773
                                    [% IF ( returnbeforeexpiry ) %]
774
                                        <li>
775
                                            <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
776
                                        </li>
777
                                    [% END %]
778
779
                                    [% IF ( expired ) %]
780
                                        <li>
781
                                            <span class="circ-hlt">Expiration:</span> Patron's card has expired.
782
                                            [% IF ( expiry ) %]
783
                                                Patron's card expired on [% expiry | $KohaDates %]
784
                                            [% END %]
785
                                            <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>
786
                                        </li>
787
                                    [% END %]
788
789
                                    [% IF ( gna ) %]
790
                                        <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
791
                                    [% END %]
792
793
                                    [% IF ( lost ) %]
794
                                        <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
795
                                    [% END %]
796
797
                                    [% IF ( userdebarred ) %]
798
                                        <li class="blocker">
799
                                            <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
800
801
                                            [% IF ( userdebarreddate ) %]
802
                                                until [% userdebarreddate | $KohaDates %]
803
                                            [% END %]
804
805
                                            [% IF ( debarredcomment ) %]
806
                                                with the explanation: <br/>
807
                                                <em>
808
                                                    [% IF debarredcomment.search('OVERDUES_PROCESS') %]
809
                                                        Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | $raw | html_line_break %]
810
                                                    [% ELSE %]
811
                                                        [% debarredcomment | $raw | html_line_break %]
812
                                                    [% END %]
813
                                                </em>
814
                                            [% END %]
815
                                            <br/>
816
                                            <a class="btn btn-default" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
817
818
                                            [% IF (noissues && patron && CAN_user_circulate_force_checkout) %]
819
                                                <span class="override_debarment">
820
                                                    <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default">Override restriction temporarily</a>
821
                                                </span>
822
                                            [% END %]
823
                                       </li> <!-- /.blocker -->
824
                                    [% END # /IF userdebarred %]
825
826
                                    [% IF ( odues ) %]
827
                                        <li><span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a></li>
828
                                    [% END %]
829
830
                                    [% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
831
                                    [% SET return_claims = patron.return_claims %]
832
                                    [% IF return_claims.count > ClaimReturnedWarningThreshold %]
833
                                        <li><span class="circ-hlt return-claims">Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.</span></li>
834
                                    [% END %]
835
836
837
                                    [% IF age_limitations %]
838
                                        [% INCLUDE 'category-out-of-age-limit.inc' %]
839
                                    [% END %]
840
841
                                    [% IF ( charges ) %]
842
                                        [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
843
                                    [% END %]
844
                                    [% IF ( charges_guarantors_guarantees ) %]
845
                                        <li>
846
                                            <span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %].
847
                                            [% IF noissues %]
848
                                                <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
849
                                            [% END %]
850
                                        </li>
851
                                    [% END %]
852
                                    [% IF ( charges_guarantees ) %]
853
                                        <li>
854
                                            <span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
855
                                                [% IF noissues %]
856
                                                    <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
857
                                                [% END %]
858
                                        </li>
859
                                    [% END %]
860
861
862
                                    [% IF ( credits ) %]
863
                                        <li>
864
                                            <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount | $Price %][% END %]
865
                                        </li>
866
                                    [% END %]
867
868
                                </ul>
869
870
                                [% IF WaitingHolds.count %]
871
                                    <div id="holdswaiting" class="circmessage">
872
                                        [% SET waiting_here = 0 %]
873
                                        [% SET waiting_elsewhere = 0 %]
874
                                        [% FOREACH w IN WaitingHolds %]
875
                                            [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]
876
                                                [% waiting_here = waiting_here + 1 %]
877
                                            [% ELSE %]
878
                                                [% waiting_elsewhere = waiting_elsewhere + 1 %]
879
                                            [% END %]
880
                                        [% END %]
881
882
                                        [% IF ( waiting_here > 0 ) %]
883
                                            <h4>Holds waiting here ([% waiting_here | html %])</h4>
884
                                            <ul>
885
                                                [% FOREACH w IN WaitingHolds %]
886
                                                    [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]
887
                                                        <li>
888
                                                            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
889
                                                            ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
890
                                                            [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
891
                                                            [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
892
                                                            Hold placed on [% w.reservedate | $KohaDates %].
893
                                                            <br />
894
                                                            <strong class="waitinghere">
895
                                                                [% SET expires_on = w.expirationdate %]
896
                                                                Waiting here [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
897
                                                            </strong>
898
                                                        </li>
899
                                                    [% END %]
900
                                                [% END %]
901
                                            </ul>
902
                                        [% END %]
903
904
                                        [% IF ( waiting_elsewhere > 0 ) %]
905
                                            <h4>Holds waiting at other libraries ([% waiting_elsewhere | html %])</h4>
906
                                            <ul>
907
                                                [% FOREACH w IN WaitingHolds %]
908
                                                    [% IF ( w.branch.branchcode != Branches.GetLoggedInBranchcode()  ) %]
909
                                                        <li>
910
                                                            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
911
                                                            ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
912
                                                            [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
913
                                                            [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
914
                                                            Hold placed on [% w.reservedate | $KohaDates %].
915
                                                            <br />
916
                                                            <strong>
917
                                                                [% SET expires_on = w.expirationdate %]
918
                                                                Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
919
                                                            </strong>
920
                                                        </li>
921
                                                    [% END %]
922
                                                [% END %]
923
                                            </ul>
924
                                        [% END %]
925
926
                                    </div>
927
                                [% END # /IF WaitingHolds.count %]
928
756
929
                                [% IF ( notes ) %]
930
                                    <div id="circnotes" class="circmessage">
931
                                       <h4>Notes:</h4>
932
                                        <p><span class="circ-hlt">[% notesmsg | $raw %]</span></p>
933
                                    </div>
934
                                [% END %]
935
936
                                <div id="messages" class="circmessage">
937
                                    <h4>Messages:</h4>
938
                                    <ul>
939
                                        [% FOREACH message IN messages %]
940
                                            <li>
941
                                                [% IF(message.message_type == "L") %]
942
                                                    <span class="circ-hlt">
943
                                                [% ELSE %]
944
                                                    <span>
945
                                                [% END %]
946
                                                    [% message.message_date | $KohaDates %]
947
                                                    [% Branches.GetName( message.branchcode ) | html %]
948
                                                    [% IF message.manager_id %]
949
                                                        ( <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> )
950
                                                    [% END %]
951
                                                    <em>"[% message.message | html %]"</em>
952
                                                </span>
953
                                                [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
954
                                                    <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>
955
                                                [% END %]
956
                                            </li>
957
                                        [% END %]
958
                                    </ul>
959
                                    <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>
960
                                </div> <!-- /.messages -->
961
                            </div> <!-- /#circmessages -->
757
                            </div> <!-- /#circmessages -->
962
                        </div> <!-- /div or div.col-sm-6 -->
758
                        </div> <!-- /div or div.col-sm-6 -->
963
                    </div> <!-- /.row -->
759
                    </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 / +74 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
        'debarments'      => scalar GetDebarments({ borrowernumber => $borrowernumber }),
95
        'userdebarred'    => $patron->debarred,
96
        'debarredcomment' => $patron->debarredcomment,
93
    );
97
    );
98
94
    if ( $patron->debarred ne "9999-12-31" ) {
99
    if ( $patron->debarred ne "9999-12-31" ) {
95
        $template->param( 'userdebarreddate' => $patron->debarred );
100
        $template->param( 'userdebarreddate' => $patron->debarred );
96
    }
101
    }
97
}
102
}
103
98
$template->param( flagged => 1 ) if $patron->account_locked;
104
$template->param( flagged => 1 ) if $patron->account_locked;
99
105
100
my @relatives;
106
my @relatives;
Lines 196-201 if ( $patron->is_expired || $patron->is_going_to_expire ) { Link Here
196
    );
202
    );
197
}
203
}
198
204
205
my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } ); # FIXME must be Koha::Patron->holds
206
my $waiting_holds = $holds->waiting;
207
$template->param(
208
    holds_count  => $holds->count(),
209
    WaitingHolds => $waiting_holds,
210
);
211
212
my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees");
213
$no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees );
214
if ( defined $no_issues_charge_guarantees ) {
215
    my $guarantees_non_issues_charges = 0;
216
    my $guarantees = $patron->guarantee_relationships->guarantees;
217
    while ( my $g = $guarantees->next ) {
218
        $guarantees_non_issues_charges += $g->account->non_issues_charges;
219
    }
220
    if ( $guarantees_non_issues_charges > $no_issues_charge_guarantees ) {
221
        $template->param(
222
            charges_guarantees    => 1,
223
            chargesamount_guarantees => $guarantees_non_issues_charges,
224
        );
225
    }
226
}
227
228
if ( $patron->has_overdues ) {
229
    $template->param( odues => 1 );
230
}
231
my $issues = $patron->checkouts;
232
233
my $balance = 0;
234
$balance = $patron->account->balance;
235
236
my $account = $patron->account;
237
if( ( my $owing = $account->non_issues_charges ) > 0 ) {
238
    my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why??
239
    $template->param(
240
        charges => 1,
241
        chargesamount => $owing,
242
    )
243
} elsif ( $balance < 0 ) {
244
    $template->param(
245
        credits => 1,
246
        creditsamount => -$balance,
247
    );
248
}
249
250
# if the expiry date is before today ie they have expired
251
if ( $patron->is_expired ) {
252
    #borrowercard expired, no issues
253
    $template->param(
254
        expired => "1",
255
    );
256
}
257
# check for NotifyBorrowerDeparture
258
elsif ( $patron->is_going_to_expire ) {
259
    # borrower card soon to expire warn librarian
260
    $template->param( "warndeparture" => $patron->dateexpiry ,
261
                    );
262
    if (C4::Context->preference('ReturnBeforeExpiry')){
263
        $template->param("returnbeforeexpiry" => 1);
264
    }
265
}
266
267
268
my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => $borrowernumber } )->count;
269
199
$template->param(
270
$template->param(
200
    patron          => $patron,
271
    patron          => $patron,
201
    issuecount      => $patron->checkouts->count,
272
    issuecount      => $patron->checkouts->count,
Lines 210-215 $template->param( Link Here
210
    relatives_borrowernumbers => \@relatives,
281
    relatives_borrowernumbers => \@relatives,
211
    logged_in_user => $logged_in_user,
282
    logged_in_user => $logged_in_user,
212
    files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(),
283
    files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(),
284
    #debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
285
    has_modifications         => $has_modifications,
213
);
286
);
214
287
215
output_html_with_http_headers $input, $cookie, $template->output;
288
output_html_with_http_headers $input, $cookie, $template->output;
216
- 

Return to bug 27873