Bug 7413: OPAC bootstrap theme changes
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-user.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3
4 [% INCLUDE 'doc-head-open.inc' %]
5 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your library home
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
8 </head>
9 <body id="opac-user" class="scrollto">
10 [% INCLUDE 'masthead.inc' %]
11
12 <div class="main">
13     <ul class="breadcrumb">
14         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
15         <li>[% FOREACH BORROWER_INF IN BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]</a>[% END %] <span class="divider">&rsaquo;</span></li>
16         <li><a href="#">Your summary</a></li>
17     </ul>
18
19     <div class="container-fluid">
20         <div class="row-fluid">
21             <div class="span2">
22                 <div id="navigation">
23                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
24                 </div>
25             </div>
26             <div class="span10">
27                 <div id="userdetails" class="maincontent">
28                     [% IF ( bor_messages ) %]
29                         <div class="alert alert-info">
30                             <h3>Messages for you</h3>
31                                 <ul>
32                                     [% FOREACH bor_messages_loo IN bor_messages_loop %]
33                                         <li>
34                                         <strong>[% bor_messages_loo.message %]</strong><br>
35                                         &nbsp;&nbsp;&nbsp;<i>Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %]</i>
36                                         </li>
37                                     [% END %]
38
39                                     [% IF ( opacnote ) %]<li>[% opacnote %]</li>[% END %]
40                                 </ul>
41                         </div>
42                     [% END # / IF bor_messages %]
43                     [% FOREACH BORROWER_INF IN BORROWER_INFO %]
44                     <h2>Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]
45                     </h2>
46
47                     <p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% BORROWER_INF.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]</a></p>
48
49                     [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
50
51                     [% IF ( BORROWER_INF.warndeparture ) %]
52                         <div class="alert" id="warndeparture">
53                             <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INF.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
54                                 [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
55                         </div>
56                     [% END %]
57
58                     [% IF ( BORROWER_INF.warnexpired ) %]
59                         <div class="alert" id="warnexpired">
60                             <strong>Please note:</strong><span> Your card has expired. Please contact the library for more information.</span>
61                         </div>
62                     [% END %]
63
64                     [% IF ( patron_flagged ) %]
65                         <div class="alert">
66                             <ul>
67                                 [% IF ( userdebarred ) %]
68                                     <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INF.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INF.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
69                                 [% END %]
70                                 [% IF ( BORROWER_INF.gonenoaddress ) %]
71                                     <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file.  Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
72                                 [% END %]
73                                 [% IF ( BORROWER_INF.lost ) %]
74                                     <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li>
75                                 [% END %]
76                                 [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
77                                     <li id="renewal_blocked_fines"><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">[% IF renewal_blocked_fines != "0.00" %] more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span> in [% END %] fines</a>, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li>
78                                 [% END %]
79                             </ul>
80                         </div>
81                     [% END # / IF patron_flagged %]
82
83                     <div id="opac-user-views" class="toptabs">
84                         <ul>
85                             <li><a href="#opac-user-checkouts">Checked out ([% issues_count %])</a></li>
86                             [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %]
87                             [% IF ( OPACFinesTab ) %]
88                                 [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
89                                 [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
90                                 [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %]
91                             [% END %]
92                             [% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="#opac-user-waiting">Waiting ([% waiting_count %])</a></li>[% END %][% END %]
93                             [% IF ( reserves_count ) %]<li><a href="#opac-user-holds">Holds ([% reserves_count %])</a></li>[% END %]
94                         </ul>
95
96                         <div id="opac-user-checkouts">
97                             [% IF ( issues_count ) %]
98                                 <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
99                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
100                                     <input type="hidden" name="from" value="opac_user" />
101                                     <table id="checkoutst" class="table table-bordered table-striped">
102                                         <caption>[% issues_count %] Item(s) checked out</caption>
103                                         <thead>
104                                             <tr>
105                                                 [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
106                                                 <th class="anti-the">Title</th>
107                                                 <th class="title-string psort">Due</th>
108                                                 [% UNLESS ( item_level_itypes ) %]
109                                                     <th>Item type</th>
110                                                 [% END %]
111                                                 [% IF ( show_barcode ) %]
112                                                     <th>Barcode</th>
113                                                 [% END %]
114                                                     <th>Call No.</th>
115                                                 [% IF ( OpacRenewalAllowed ) %]
116                                                     <th class="nosort">Renew</th>
117                                                 [% END %]
118                                                 [% IF ( OPACFinesTab ) %]
119                                                     <th>Fines</th>
120                                                 [% END %]
121                                                 [% IF ( OPACMySummaryHTML ) %]
122                                                     <th class="nosort">Links</th>
123                                                 [% END %]
124                                             </tr>
125                                         </thead>
126                                         <tbody>
127                                             [% FOREACH ISSUE IN ISSUES %]
128                                                 [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
129                                                 [% IF ( JacketImages ) %]<td class="jacketcell">
130
131                                                     [% IF ( OPACAmazonCoverImages ) %]
132                                                         [% IF ( ISSUE.normalized_isbn ) %]
133                                                             <a href="http://www.amazon.com/gp/reader/[% ISSUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/[% ISSUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a>
134                                                         [% ELSE %]
135                                                             <a href="#"><span class="no-image">No cover image available</span></a>
136                                                         [% END %]
137                                                     [% END %]
138
139                                                     [% IF ( GoogleJackets ) %]
140                                                         [% IF ( ISSUE.normalized_isbn ) %]
141                                                             <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
142                                                         [% ELSE %]
143                                                             <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
144                                                         [% END %]
145                                                     [% END %]
146
147                                                     [% IF ( BakerTaylorEnabled ) %]
148                                                         [% IF ( ISSUE.normalized_isbn ) %]
149                                                             <a href="https://[% BakerTaylorBookstoreURL |html %][% ISSUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% ISSUE.normalized_isbn %]" /></a>
150                                                         [% ELSE %]
151                                                             <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_isbn! -->
152                                                         [% END %]
153                                                     [% END %]
154
155                                                     [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
156                                                         [% IF ( using_https ) %]
157                                                             <img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
158                                                         [% ELSE %]
159                                                             <img src="http://www.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
160                                                         [% END %]
161                                                     [% END %]
162
163                                                 </td>[% END # / IF JacketImages %]
164
165                                                 <td class="title">
166                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a> <span class="item-details">[% ISSUE.author %]</span>
167                                                 </td>
168                                                 [% IF ( ISSUE.overdue ) %]
169                                                     <td class="date_due overdue">
170                                                         <span title="[% ISSUE.date_due %]">
171                                                             <span class="tdlabel">Date due:</span>
172                                                             [% ISSUE.date_due | $KohaDates %]
173                                                         </span>
174                                                     </td>
175                                                 [% ELSE %]
176                                                     <td class="date_due">
177                                                         <span title="[% ISSUE.date_due %]">
178                                                             <span class="tdlabel">Date due:</span>
179                                                             [% ISSUE.date_due | $KohaDates %]
180                                                         </span>
181                                                     </td>
182                                                 [% END %]
183                                                 [% UNLESS ( item_level_itypes ) %]
184                                                     <td class="itype">
185                                                         <span class="tdlabel">Item type:</span>
186                                                         [% IF ( ISSUE.imageurl ) %]
187                                                             <img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />
188                                                         [% END %] [% ISSUE.description %]
189                                                     </td>
190                                                 [% END %]
191                                                 [% IF ( show_barcode ) %]
192                                                     <td class="barcode">
193                                                         <span class="tdlabel">Barcode:</span>
194                                                         [% ISSUE.barcode %]
195                                                     </td>
196                                                 [% END %]
197                                                 <td class="call_no">
198                                                     <span class="tdlabel">Call number:</span>
199                                                     [% ISSUE.itemcallnumber %]
200                                                 </td>
201                                                 [% IF ( OpacRenewalAllowed ) %]
202                                                     <td class="renew">
203                                                     [% IF ( ISSUE.status ) %]
204                                                         [% IF ( canrenew ) %]
205                                                             <input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a>
206                                                         [% END %]
207                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
208                                                     [% ELSIF ( ISSUE.too_many ) %]
209                                                         Not renewable
210                                                     [% ELSIF ( ISSUE.too_soon ) %]
211                                                         No renewal before [% ISSUE.soonestrenewdate %]
212                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
213                                                     [% ELSIF ( ISSUE.on_reserve ) %]
214                                                         <span class="renewals">(On hold)</span>
215                                                     [% END %]
216                                                     </td>
217                                                 [% END %]
218                                                 [% IF ( OPACFinesTab ) %]
219                                                     <td class="fines">
220                                                         <span class="tdlabel">Fines:</span>
221                                                         [% IF ( ISSUE.charges ) %]
222                                                             Yes
223                                                         [% ELSE %]
224                                                             No
225                                                         [% END %]
226                                                     </td>
227                                                 [% END %]
228                                                 [% IF ( OPACMySummaryHTML ) %]
229                                                     <td class="links">[% ISSUE.MySummaryHTML %]</td>
230                                                 [% END %]
231                                             </tr>
232                                         [% END # /FOREACH ISSUES %]
233                                     </tbody>
234                                 </table>
235                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
236                                     <input type="submit" class="btn" value="Renew selected" />
237                                 [% END %]
238                                 </form>
239
240                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
241                                 <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
242                                     <input type="hidden" name="from" value="opac_user" />
243                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
244                                     [% FOREACH ISSUE IN ISSUES %]
245                                         <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
246                                     [% END %]
247                                     <input type="submit" class="btn" value="Renew all" />
248                                 </form>
249                                 [% END %]
250                             [% ELSE %]
251                                 <table class="table table-bordered table-striped">
252                                     <tr><td>You have nothing checked out</td></tr>
253                                 </table>
254                             [% END # IF issues_count %]
255                         </div> <!-- / .opac-user-checkouts -->
256
257                         [% IF ( OPACFinesTab ) %]
258                             <!-- FINES BOX -->
259                             [% IF ( BORROWER_INF.amountoverfive ) %]
260                                 <div id="opac-user-fines"> <h3>Fines and charges</h3>
261                                     <table class="table table-bordered table-striped">
262                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
263                                         <tbody>
264                                             <tr>
265                                                 <td>You currently owe fines and charges amounting to:</td>
266                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
267                                             </tr>
268                                         </tbody>
269                                     </table>
270                                 </div>
271                             [% END %]
272
273                             [% IF ( BORROWER_INF.amountoverzero ) %]
274                                <div id="opac-user-fines"> <h3>Fines and charges</h3>
275                                     <table class="table table-bordered table-striped">
276                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
277                                         <tbody>
278                                             <tr>
279                                                 <td>You currently owe fines and charges amounting to:</td>
280                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
281                                             </tr>
282                                         </tbody>
283                                     </table>
284                                 </div>
285                             [% END %]
286
287                             [% IF ( BORROWER_INF.amountlessthanzero ) %]
288                                 <div id="opac-user-fines">  <h3>Credits</h3>
289                                     <table class="table table-bordered table-striped">
290                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
291                                         <tbody>
292                                             <tr>
293                                                 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
294                                             </tr>
295                                         </tbody>
296                                     </table>
297                                 </div>
298                             [% END %]
299                         [% END # / OPACFinesTab %]
300
301                     [% END # / FOREACH BORROWER_INFO %]
302
303                         [% IF ( waiting_count && atdestination ) %]
304                             <div id="opac-user-waiting">
305                                 <table id="waitingt" class="table table-bordered table-striped">
306                                     <caption>Holds waiting</caption>
307                                     <thead>
308                                         <tr>
309                                             <th class="anti-the">Title</th>
310                                             <th>Hold date</th>
311                                             <th>Pick up library</th>
312                                         </tr>
313                                     </thead>
314                                     <tbody>
315                                         [% FOREACH WAITIN IN WAITING %]
316                                             <tr>
317                                                 <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
318                                                 <td>
319                                                     <a class="title" href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
320                                                         [% WAITIN.waiting_title %]
321                                                     </a>
322                                                     <span class="item-details">
323                                                         [% WAITIN.author %]
324                                                     </span></td>
325                                                 <td>
326                                                     <span class="tdlabel">Hold date:</span>
327                                                     [% WAITIN.reservedate | $KohaDates %]</td>
328                                                 <td>
329                                                     [% IF ( WAITIN.atdestination ) %]
330                                                         <strong>Waiting</strong> at [% WAITIN.branch %]
331                                                     [% ELSE %]
332                                                         In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
333                                                     [% END %]
334                                                 </td>
335                                             </tr>
336                                         [% END %]
337                                     </tbody>
338                                 </table>
339                             </div> <!-- /#opac-user-waiting -->
340                         [% END # waiting_count && atdestination %]
341
342
343                         [% IF ( overdues_count ) %]
344                             <div id="opac-user-overdues">
345                                 <table id="overduest" class="table table-bordered table-striped">
346                                     <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
347                                     <!-- OVERDUES TABLE ROWS -->
348                                     <thead>
349                                         <tr>
350                                             [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
351                                             <th class="anti-the">Title</th>
352                                             [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
353                                             [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
354                                             <th>Call no.</th>
355                                             <th class="title-string psort">Due</th>
356                                             [% IF ( OpacRenewalAllowed ) %]
357                                                 <th class="nosort">Renew</th>
358                                             [% END %]
359                                             [% IF ( OPACFinesTab ) %]
360                                                 <th>Fines</th>
361                                             [% END %]
362                                         </tr>
363                                     </thead>
364                                     <tbody>
365                                         [% FOREACH OVERDUE IN OVERDUES %]
366                                             <tr>
367                                                 [% IF ( JacketImages ) %]
368                                                     <td class="jacketcell">
369                                                     [% IF ( OPACAmazonCoverImages ) %]
370                                                         [% IF ( OVERDUE.normalized_isbn ) %]
371                                                             <a href="http://www.amazon.com/gp/reader/[% OVERDUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/[% OVERDUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a>
372                                                         [% ELSE %]
373                                                             <a href="#"><span class="no-image">No cover image available</span></a>
374                                                         [% END %]
375                                                     [% END %]
376
377                                                     [% IF ( GoogleJackets ) %]
378                                                         [% IF ( OVERDUE.normalized_isbn ) %]
379                                                             <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
380                                                         [% ELSE %]
381                                                             <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
382                                                         [% END %]
383                                                     [% END %]
384
385                                                     [% IF ( BakerTaylorEnabled ) %]
386                                                         [% IF ( OVERDUE.normalized_isbn ) %]
387                                                             <a href="https://[% BakerTaylorBookstoreURL |html %][% OVERDUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% OVERDUE.normalized_isbn %]" /></a>
388                                                         [% ELSE %]
389                                                             <!-- BakerTaylor needs normalized_isbn! --><span class="no-image">No cover image available</span>
390                                                         [% END %]
391                                                     [% END %]
392
393                                                     [% IF ( SyndeticsCoverImages ) %]
394                                                         [% IF ( using_https ) %]
395                                                             <img src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
396                                                         [% ELSE %]
397                                                             <img src="http://www.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
398                                                         [% END %]
399                                                     [% END %]
400                                                     </td>
401                                                 [% END # /IF jacketcell %]
402
403                                                 <td>
404                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %]
405                                                     </a>
406                                                     <span class="item-details">[% OVERDUE.author %]</span></td>
407
408                                                 [% UNLESS ( item_level_itypes ) %]
409                                                     <td>
410                                                         [% IF ( OVERDUE.imageurl ) %]
411                                                             <img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />
412                                                         [% END %] [% OVERDUE.description %]
413                                                     </td>
414                                                 [% END %]
415                                                 [% IF ( show_barcode ) %]
416                                                     <td>
417                                                         <span class="tdlabel">Barcode:</span>
418                                                         [% OVERDUE.barcode %]
419                                                     </td>
420                                                 [% END %]
421                                                 <td>
422                                                     <span class="tdlabel">Call number:</span>
423                                                     [% OVERDUE.itemcallnumber %]
424                                                 </td>
425                                                 <td>
426                                                     <span title="[% OVERDUE.date_due %]">
427                                                         <span class="tdlabel">Date due:</span>
428                                                         [% OVERDUE.date_due | $KohaDates %]
429                                                     </span>
430                                                 </td>
431                                                 [% IF ( OpacRenewalAllowed ) %]
432                                                     <td>
433                                                         [% IF ( OVERDUE.debarred ) %]
434                                                             Account frozen
435                                                         [% ELSIF ( OVERDUE.status ) %]
436                                                             [% IF ( canrenew ) %]
437                                                                 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a>
438                                                             [% END %]
439                                                                 <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
440                                                         [% ELSIF ( OVERDUE.onreserve ) %]
441                                                             On hold
442                                                         [% ELSE %]
443                                                             No renewals left
444                                                         [% END %]
445                                                     </td>
446                                                 [% END %]
447                                                 [% IF ( OPACFinesTab ) %]
448                                                     <td>
449                                                         <span class="tdlabel">Fines:</span>
450                                                         [% IF ( OVERDUE.charges ) %]
451                                                             Yes
452                                                         [% ELSE %]
453                                                             No
454                                                         [% END %]
455                                                     </td>
456                                                 [% END %]
457                                             </tr>
458                                         [% END %]
459                                     </tbody>
460                                 </table>
461                             </div> <!-- / #opac-user-overdues -->
462                         [% END # /overdues_count %]
463
464
465                         [% IF ( reserves_count ) %]
466                             <div id="opac-user-holds">
467                                 <table id="holdst" class="table table-bordered table-striped">
468                                     <caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
469                                     <!-- RESERVES TABLE ROWS -->
470                                     <thead>
471                                         <tr>
472                                             <th class="anti-the">Title</th>
473                                             <th class="psort">Placed on</th>
474                                             <th>Expires on</th>
475                                             <th>Pick up location</th>
476                                             [% IF ( showpriority ) %]
477                                                 <th>Priority</th>
478                                             [% END %]
479                                             <th>Status</th>
480                                             [% IF SuspendHoldsOpac %]
481                                                  <th class="nosort" >Suspend</th>
482                                             [% END %]
483                                             <th class="nosort">Modify</th>
484                                         </tr>
485                                     </thead>
486                                     <tbody>
487                                     [% FOREACH RESERVE IN RESERVES %]
488                                         [% IF ( RESERVE.wait ) %]
489                                             [% IF ( RESERVE.atdestination ) %]
490                                                 [% IF ( RESERVE.found ) %]
491                                                     <tr class="reserved">
492                                                 [% ELSE %]
493                                                     <tr>
494                                                 [% END %]
495                                             [% ELSE %]
496                                                 <tr class="transfered">
497                                             [% END %]
498                                         [% ELSE %]
499                                             <tr>
500                                         [% END %]
501                                             <td class="title">
502                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %]</a>
503                                                 [% RESERVE.author %]
504                                             </td>
505                                             <td class="reservedate">
506                                                 <span title="[% RESERVE.reservedate %]">
507                                                     <span class="tdlabel">Hold date:</span>
508                                                     [% RESERVE.reservedate | $KohaDates %]
509                                                 </span>
510                                             </td>
511                                             <td class="expirationdate">
512                                                 [% IF ( RESERVE.expirationdate ) %]
513                                                     <span>
514                                                         <span class="tdlabel">Expiration:</span>
515                                                         [% RESERVE.expirationdate | $KohaDates %]
516                                                     </span>
517                                                 [% ELSE %]
518                                                     <span class="tdlabel">Expiration:</span>
519                                                     Never expires
520                                                 [% END %]
521                                             </td>
522                                             <td class="branch">
523                                                 <span class="tdlabel">Pick up location:</span>
524                                                 [% RESERVE.branch %]
525                                             </td>
526                                             [% IF ( showpriority ) %]
527                                                  <td class="priority">
528                                                     <span class="tdlabel">Priority:</span>
529                                                     [% RESERVE.priority %]
530                                                 </td>
531                                             [% END %]
532                                             <td class="status">
533                                                 <span class="tdlabel">Status:</span>
534                                                 [% IF ( RESERVE.wait ) %]
535                                                     [% IF ( RESERVE.atdestination ) %]
536                                                         [% IF ( RESERVE.found ) %]
537                                                             Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %]
538                                                             <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
539                                                         [% ELSE %]
540                                                             Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b>
541                                                         [% END %]
542                                                     [% ELSE %]
543                                                         Item in transit to <b> [% RESERVE.wbrname %]</b> <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
544                                                     [% END %]
545                                                 [% ELSE %]
546                                                     [% IF ( RESERVE.intransit ) %]
547                                                         Item in transit from <b> [% RESERVE.frombranch %]</b> since
548                                                         [% RESERVE.datesent | $KohaDates %]
549                                                     [% ELSIF ( RESERVE.suspend ) %]
550                                                         Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
551                                                     [% ELSE %]
552                                                         Pending
553                                                     [% END %]
554                                                 [% END %]
555                                             </td>
556                                             [% IF SuspendHoldsOpac %]
557                                                 <td>
558                                                     [% IF ( RESERVE.cancelable ) %]
559                                                         [% IF RESERVE.suspend %]
560                                                             <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
561                                                                 <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
562                                                                 <button class="btn btn-link" type="submit" name="submit"><i class="icon-play"></i> Resume</button>
563                                                             </form>
564                                                         [% ELSE %]
565                                                             [% IF AutoResumeSuspendedHolds %]
566                                                                 <a class="btn btn-link js-show" href="#suspendModal[% RESERVE.reserve_id %]" role="button" data-toggle="modal"><i class="icon-pause"></i> Suspend</a>
567                                                                 [% # hold suspend modal form %]
568                                                                 <div id="suspendModal[% RESERVE.reserve_id %]" class="modal-nojs" tabindex="-1" role="dialog" aria-labelledby="suspendModal[% RESERVE.reserve_id %]Label" aria-hidden="true">
569                                                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
570                                                                         <div class="modal-header">
571                                                                             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
572                                                                             [% IF RESERVE.suspend %]
573                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Resume your hold on <i>[% RESERVE.reserves_title %]</i></h3>
574                                                                             [% ELSE %]
575                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Suspend your hold on <i>[% RESERVE.reserves_title %]</i></h3>
576                                                                             [% END %]
577                                                                         </div>
578                                                                         <div class="modal-body">
579                                                                             <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
580                                                                             <label for="suspend_until_[% RESERVE.reserve_id %]">Suspend until:</label>
581                                                                             <input name="suspend_until" id="suspend_until_[% RESERVE.reserve_id %]" class="suspend-until" size="10" />
582                                                                             [% INCLUDE 'date-format.inc' %]
583                                                                             <p class="js-show"><a href="#" onclick="document.getElementById('suspend_until_[% RESERVE.reserve_id %]').value='';return false;">Clear date to suspend indefinitely</a></p>
584                                                                             <button class="btn btn-mini js-hide" type="submit" name="submit">Suspend</button>
585                                                                         </div>
586                                                                         <div class="modal-footer">
587                                                                             <button class="btn btn-primary" type="submit" name="submit">Suspend</button>
588                                                                             <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
589                                                                         </div>
590                                                                     </form>
591                                                                 </div>  <!-- /#suspendModal[% RESERVE.reserve_id %] -->
592                                                             [% ELSE %]
593                                                                 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
594                                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
595                                                                     <button class="btn btn-link" type="submit" name="submit"><i class="icon-pause"></i> Suspend</button>
596                                                                 </form>
597                                                             [% END # / IF AutoResumeSuspendedHolds %]
598                                                         [% END # / IF RESERVE.suspend %]
599                                                     [% END # / IF ( RESERVE.cancelable )%]
600                                                 </td>
601                                             [% END # / IF SuspendHoldsOpac %]
602                                             <td class="modify">
603                                                 [% IF ( RESERVE.cancelable ) %]
604                                                     <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
605                                                     <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />
606                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
607                                                     <button type="submit" name="submit" class="btn btn-mini btn-danger" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"><i class="icon-remove icon-white"></i> Cancel</button></form>
608                                                 [% END %]
609                                             </td>
610                                         </tr>
611                                     [% END # /FOREACH RESERVES %]
612                                 </tbody>
613                             </table>
614
615                             [% IF SuspendHoldsOpac %]
616                                 <div>
617                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
618                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);"><i class="icon-pause"></i> Suspend all holds</button>
619                                         <input type="hidden" name="suspend" value="1" />
620
621                                         [% IF AutoResumeSuspendedHolds %]
622                                             <label for="suspend_until"> until </label>
623                                             <input name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" />
624                                             <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a>
625                                         [% END %]
626                                     </form>
627                                 </div>
628                                 <br/>
629                                 <div>
630                                     <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
631                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);"><i class="icon-play"></i> Resume all suspended holds</button>
632                                         <input type="hidden" name="suspend" value="0" />
633                                     </form>
634                                 </div>
635                             [% END %]
636                         </div> <!-- / #opac-user-holds -->
637                         [% END # / #reserves_count %]
638                     </div> <!-- /#opac-user-views -->
639                 </div> <!-- /#userdetails -->
640             </div> <!-- /.span10 -->
641         </div> <!-- /.row-fluid -->
642     </div> <!-- /.container-fluid -->
643 </div> <!-- /#main -->
644
645 [% INCLUDE 'opac-bottom.inc' %]
646
647
648 [% BLOCK jsinclude %]
649     [% INCLUDE 'calendar.inc' %]
650     [% INCLUDE 'datatables.inc' %]
651     <script type="text/JavaScript">
652         //<![CDATA[
653         var MSG_CONFIRM_DELETE_HOLD   = _("Are you sure you want to cancel this hold?");
654         var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?");
655         var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended holds?");
656
657         $(function() {
658             $('#opac-user-views').tabs();
659             $(".js-show").show();
660             $(".js-hide").hide();
661             $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
662             $(".suspend-until").prop("readonly",1);
663             var dTables = $("#checkoutst,#holdst,#overduest");
664             dTables.each(function(){
665                 var thIndex = $(this).find("th.psort").index();
666                 $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
667                     "aaSorting" : [[ thIndex, 'asc' ]],
668                     "aoColumnDefs": [
669                         { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
670                         { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
671                         { "sType": "title-string", "aTargets" : [ "title-string" ] }
672                     ]
673                 }));
674             });
675
676             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
677             [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
678                 $("#renewselected").submit(function(){
679                     valid = false;
680                     $("input[type=checkbox]").each(function(){
681                         if($(this).is(':checked')){
682                             valid = true;
683                         }
684                     });
685                     if(!valid){
686                         alert(_("Nothing has been selected. Check the box for each item you want to renew"));
687                     }
688                     return valid;
689                 });
690                 $("body").on("click","#renewselected_link",function(e){
691                     e.preventDefault();
692                     $("#renewselected").submit();
693                 });
694                 $("body").on("click","#renewall_link",function(e){
695                     e.preventDefault();
696                     $("#renewall").submit();
697                 });
698                 $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");
699             [% END %]
700             $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
701         });
702         //]]>
703     </script>
704 [% END %]