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