3 [% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
4 [% SET return_claims = patron.return_claims %]
5 [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %]
7 [% 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 ) %]
10 [% IF ( has_modifications ) %]
11 <li class="has_modifications">
12 <span class="circ-hlt">Pending modifications:</span>
13 [% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
14 <a href="/cgi-bin/koha/members/members-update.pl?active=[% patron.borrowernumber | uri %]">Review pending modifications</a>
16 <span>Patron has pending modifications</span>
21 [% IF ( warndeparture ) %]
22 <li class="warndeparture">
23 <span class="circ-hlt">Expiration:</span>
24 <span>Patron's card expires on [% patron.dateexpiry | $KohaDates %].</span>
25 <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
29 [% IF ( returnbeforeexpiry ) %]
30 <li class="returnbeforeexpiry">
31 <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
37 <span class="circ-hlt">Expiration:</span>
38 <span>Patron's card has expired.</span>
40 <span>Patron's card expired on [% expiry | $KohaDates %]</span>
42 <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
46 [% IF ( patron.gonenoaddress ) %]
47 <li class="gonenoaddress blocker">
48 <span title="gonenoaddress flag is set in patron record"><span class="circ-hlt">Address:</span> Patron's address flagged as in doubt</span>
52 [% IF ( patron.lost ) %]
53 <li class="lost blocker">
54 <span title="lost flag is set in patron record"><span class="circ-hlt">Lost: </span> Patron's card is flagged as lost</span>
58 [% IF ( userdebarred ) %]
59 <li class="userdebarred blocker">
60 <span class="circ-hlt"> Restricted since [% debarredsince | $KohaDates %]:</span> Patron's account is restricted
62 [% IF ( userdebarreddate ) %]
63 until [% userdebarreddate | $KohaDates %]
66 [% IF ( debarredcomment ) %]
67 with the explanation: <br/>
69 [% IF debarredcomment.search('OVERDUES_PROCESS') %]
70 Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | $raw | html_line_break %]
72 [% debarredcomment | $raw | html_line_break %]
76 <a class="btn btn-xs btn-default" href="#reldebarments-tab" onclick="$('#reldebarments-tab').click()"><i class="fa fa-ban"></i> View restrictions</a>
78 [% IF (noissues && CAN_user_circulate_force_checkout) %]
79 <span class="override_debarment">
80 <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-xs btn-default">Override restriction temporarily</a>
83 </li> <!-- /.blocker -->
84 [% END # /IF userdebarred %]
87 <li class="odues blocker">
88 <span class="circ-hlt">Overdues:</span> Patron has ITEMS OVERDUE <a href="#checkouts">See highlighted items below</a>
92 [% IF return_claims.count > ClaimReturnedWarningThreshold %]
93 <li class="return_claims blocker">
94 <span class="circ-hlt return-claims">Return claims:</span> Patron has [% return_claims.count | html %] RETURN CLAIMS
98 [% IF age_limitations %]
99 [% INCLUDE 'category-out-of-age-limit.inc' %]
103 [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
106 [% IF ( charges_guarantors_guarantees ) %]
107 <li class="charges_guarantors_guarantees">
108 <span class="circ-hlt">Charges:</span> Patron's guarantors and their other guarantees collectively owe [% charges_guarantors_guarantees | $Price %].
110 <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
115 [% IF ( charges_guarantees ) %]
116 <li class="charges_guarantees">
117 <span class="circ-hlt">Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
119 <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
126 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of <span class="credit"><strong>[% creditsamount | $Price %]</strong></span>[% END %]
132 [% END # /F ( has_modifications || warndeparture... %]
134 [% IF waiting_recalls.count %]
135 <div id="recallswaiting" class="circmessage">
136 [% SET waiting_here = 0 %]
137 [% SET waiting_elsewhere = 0 %]
138 [% FOREACH w IN waiting_recalls %]
139 [% IF ( w.pickup_library_id == logged_in_branchcode ) %]
140 [% waiting_here = waiting_here + 1 %]
142 [% waiting_elsewhere = waiting_elsewhere + 1 %]
146 [% IF ( waiting_here > 0 ) %]
147 <h4>Recalls waiting here ([% waiting_here | html %])</h4>
149 [% FOREACH w IN waiting_recalls %]
150 [% IF ( w.pickup_library_id == logged_in_branchcode ) %]
152 <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% w.biblio_id | uri %]">[% w.biblio.title | html %]</a>
153 ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
154 [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
155 [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
156 <span>Recall placed on [% w.created_date | $KohaDates %].</span>
158 <strong class="waitinghere">
159 [% SET expires_on = w.expiration_date %]
160 Waiting here [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
168 [% IF ( waiting_elsewhere > 0 ) %]
169 <h4>Recalls waiting at other libraries ([% waiting_elsewhere | html %])</h4>
171 [% FOREACH w IN waiting_recalls %]
172 [% IF ( w.pickup_library_id != logged_in_branchcode ) %]
174 <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% w.biblio_id | uri %]">[% w.biblio.title | html %]</a>
175 ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
176 [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
177 [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
178 <span>Recall placed on [% w.created_date | $KohaDates %].</span>
181 [% SET expires_on = w.expiration_date %]
182 Waiting at [% Branches.GetName( w.pickup_library_id ) | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
190 [% END # /IF waiting_recalls.count %]
192 [% IF WaitingHolds.count %]
193 <div id="holdswaiting" class="circmessage">
194 [% SET waiting_here = 0 %]
195 [% SET waiting_elsewhere = 0 %]
196 [% FOREACH w IN WaitingHolds %]
197 [% IF ( w.branch.branchcode == logged_in_branchcode ) %]
198 [% waiting_here = waiting_here + 1 %]
200 [% waiting_elsewhere = waiting_elsewhere + 1 %]
204 [% IF ( waiting_here > 0 ) %]
205 <h4>Holds waiting here ([% waiting_here | html %])</h4>
207 [% FOREACH w IN WaitingHolds %]
208 [% IF ( w.branch.branchcode == logged_in_branchcode ) %]
210 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
211 ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
212 [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
213 [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
214 <span>Hold placed on [% w.reservedate | $KohaDates %].</span>
216 <strong class="waitinghere">
217 [% SET expires_on = w.expirationdate %]
218 Waiting here [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
226 [% IF ( waiting_elsewhere > 0 ) %]
227 <h4>Holds waiting at other libraries ([% waiting_elsewhere | html %])</h4>
229 [% FOREACH w IN WaitingHolds %]
230 [% IF ( w.branch.branchcode != logged_in_branchcode ) %]
232 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber | uri %]">[% w.biblio.title | html %]</a>
233 ([% ItemTypes.GetDescription( w.item.effective_itemtype ) | html %]),
234 [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
235 [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber | html %]] [% END %]
236 <span>Hold placed on [% w.reservedate | $KohaDates %].</span>
239 [% SET expires_on = w.expirationdate %]
240 Waiting at [% w.branch.branchname | html %] [% IF expires_on %] until [% expires_on | $KohaDates %] [% END %]
248 [% END # /IF WaitingHolds.count %]
250 [% IF Koha.Preference("CurbsidePickup") %]
251 [% SET curbside_pickups = patron.curbside_pickups.search( branchcode => Branches.GetLoggedInBranchcode ) %]
252 [% IF curbside_pickups.count %]
253 <div id="curbside_pickups" class="circmessage">
254 <h4>Curbside pickups scheduled here</h4>
256 [% FOR cp IN curbside_pickups %]
257 <li>On [% cp.scheduled_pickup_datetime | $KohaDates %]:
258 [% SWITCH cp.status %]
259 [% CASE 'to-be-staged' %]
260 <a href="/cgi-bin/koha/circ/curbside_pickups.pl?tab=to-be-staged">
262 [% CASE 'staged-and-ready' %]
263 <a href="/cgi-bin/koha/circ/curbside_pickups.pl?tab=staged-and-ready">
265 [% CASE 'patron-is-outside' %]
266 <a href="/cgi-bin/koha/circ/curbside_pickups.pl?tab=patron-is-outside">
267 Patron is outside!</a>
268 [% CASE 'delivered' %]
269 <a href="/cgi-bin/koha/circ/curbside_pickups.pl?tab=delivered-today">
271 [% CASE %]<span>Unknown status "[% cp.status | html %]"</span>
280 [% IF ( patron.borrowernotes ) %]
281 <div id="circnotes" class="circmessage">
285 <span class="circ-hlt">
286 [% patron.borrowernotes | $raw | html_line_break %]
290 </div> <!-- /#circnotes -->
291 [% END # /IF patron.borrowernotes %]
293 [% IF ( patron_messages ) %]
294 <div id="messages" class="circmessage">
297 [% FOREACH patron_message IN patron_messages %]
299 [% IF(patron_message.message_type == "L") %]
300 <span class="circ-hlt">
304 [% patron_message.message_date | $KohaDates %]
305 [% Branches.GetName( patron_message.branchcode ) | html %]
306 [% IF patron_message.manager_id %]
307 ( <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> )
309 <em>"[% patron_message.message | html %]"</em>
310 [% IF patron_message.patron_read_date %]
311 Read: <em>[% patron_message.patron_read_date | $KohaDates %]</em>
314 [% IF patron_message.branchcode == Branches.GetLoggedInBranchcode OR Koha.Preference('AllowAllMessageDeletion') %]
316 <a id="#edit_message_form_[% patron_message.message_id | html %]" class="btn btn-link edit_message" href="#edit_message_form_[% patron_message.message_id | uri %]" data-target="#edit_message_form_[% patron_message.message_id | html %]" data-toggle="modal" class="btn btn-default"><i class="fa fa-edit"></i> Edit</a>
317 <a class="btn btn-link delete_message" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&borrowernumber=[% patron_message.borrowernumber | html %]&from=moremember"><i class="fa fa-trash"></i> Delete</a>
319 <a id="#edit_message_form_[% patron_message.message_id | html %]" class="btn btn-link edit_message" href="#edit_message_form_[% patron_message.message_id | uri %]" data-target="#edit_message_form_[% patron_message.message_id | html %]" data-toggle="modal" class="btn btn-default"><i class="fa fa-edit"></i> Edit</a>
320 <a class="btn btn-link delete_message" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&borrowernumber=[% patron_message.borrowernumber | html %]"><i class="fa fa-trash"></i> Delete</a>
326 <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>
327 </div> <!-- /#messages -->
329 [% FOREACH pm IN patron_messages %]
330 <div id="edit_message_form_[% pm.message_id | html %]" class="modal" tabindex="-1" role="dialog" aria-labelledby="#edit_message_form_[% patron_message.message_id | html %]" aria-hidden="true">
331 <div class="modal-dialog">
332 <div class="modal-content">
333 <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
334 <input type="hidden" name="message_id" value="[% pm.message_id | html %]"/>
335 <div class="modal-header">
336 <h3>Edit message</h3>
338 <div class="modal-body">
339 <div class="form-group">
340 <label for="message_type">Message is for:</label>
341 <select name="message_type" id="message_type" disabled>
342 [% IF pm.message_type == "L" %]
343 <option value="L" selected="selected">Staff - Internal note</option>
345 <option value="L">Staff - Internal note</option>
348 [% IF pm.message_type == "B" %]
349 <option value="B" selected="selected">OPAC - [% patron.firstname | html %] [% patron.surname | html %]</option>
351 <option value="B">OPAC - [% patron.firstname | html %] [% patron.surname | html %]</option>
355 <div class="form-group">
356 <textarea rows="3" class="modal-textarea" name="borrower_message" id="borrower_message" >[% pm.message | html %]</textarea>
359 <div class="modal-footer">
360 <button class="btn btn-default approve" type="submit"><i class="fa fa-check"></i> Save</button>
361 <button class="btn btn-default deny cancel" href="#" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> Cancel</button>
369 [% END # /IF patron_messages %]