Bug 10868 - Use new DataTables include in catalog templates
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / detail.tt
1 [% USE AuthorisedValues %]
2
3 [% ShowCourseReserves = 0 %]
4 [% IF UseCourseReserves %]
5     [% FOREACH item IN itemloop %]
6        [% IF item.course_reserves %]
7            [% FOREACH r IN item.course_reserves %]
8                [% IF r.course.enabled == 'yes' %]
9                    [% ShowCourseReserves = 1 %]
10                [% END %]
11            [% END %]
12         [% END %]
13     [% END %]
14 [% END %]
15
16 [% INCLUDE 'doc-head-open.inc' %]
17 [% INCLUDE 'greybox.inc' %]
18 <title>Koha &rsaquo; Catalog &rsaquo;
19   [% IF ( unknownbiblionumber ) %]
20     Unknown record
21   [% ELSE %]
22     Details for [% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]
23   [% END %]
24 </title>
25 [% INCLUDE 'doc-head-close.inc' %]<script type="text/JavaScript">
26 //<![CDATA[
27 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
28 function verify_images() {
29     $("#bookcoverimg img").each(function(i){
30            if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) {
31             w = this.width;
32             h = this.height;
33             if ((w == 1) || (h == 1)) {
34                 $("#bookcoverimg").remove();
35                 $(".yui-gb").attr("class","yui-g");
36             } else if ((this.complete != null) && (!this.complete)) {
37                 $("#bookcoverimg").remove();
38                 $(".yui-gb").attr("class","yui-g");
39             }
40         }
41         });
42         $("#editions img").each(function(i){
43            if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) {
44             w = this.width;
45             h = this.height;
46             if ((w == 1) || (h == 1)) {
47                                 this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
48             } else if ((this.complete != null) && (!this.complete)) {
49                                 this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
50             }
51         }
52         });
53 }
54
55     function removeLocalImage(imagenumber) {
56
57         $.ajax({
58             url: "/cgi-bin/koha/svc/cover_images?action=delete&biblionumber=" + [% biblionumber %] + "&imagenumber=" + imagenumber,
59             success: function(data) {
60                 $(data).each( function(i) {
61                     if ( this.deleted == 1 ) {
62                         $('#imagenumber-' + this.imagenumber).remove();
63                     }
64                 });
65             },
66             error: function(data) {
67                 alert(_("An error occurred on deleting this image"));
68             }
69         });
70
71     }
72
73     $(document).ready(function() {
74         $('#bibliodetails').tabs();
75         $('#search-form').focus();
76         $('.thumbnails > li > a > span.remove').click(function() {
77             var result = confirm(_("Are you sure you want to delete this cover image?"));
78
79             if ( result == true ) {
80                 var imagenumber = $(this).parent().parent().attr('id').split('-')[1];
81                 removeLocalImage(imagenumber);
82             }
83
84             return false;
85         });
86     });
87
88      [% IF ( AmazonCoverImages ) %]$(window).load(function() {
89         verify_images();
90      });[% END %]
91 //]]>
92 </script>
93 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
94 [% INCLUDE 'datatables.inc' %]
95 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
96 [% INCLUDE 'browser-strings.inc' %]
97 <!--[if lt IE 9]>
98 <script type="text/javascript" src="[% interface %]/lib/shims/json2.min.js"></script>
99 <![endif]-->
100 <script type="text/javascript" src="[% interface %]/js/browser.js"></script>
101 <script type="text/javascript">
102 //<![CDATA[
103     var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
104     browser.show();
105
106     function activate_filters(id) {
107         table = $("#" + id + " table");
108         if (table.length == 1) {
109             filters_row = table.find('thead tr.filters_row');
110             if (table.find('thead tr.columnFilter').length == 0) {
111                 table.dataTable().columnFilter({
112                     'sPlaceHolder': 'head:after'
113                 });
114                 filters_row.addClass('columnFilter');
115             }
116             filters_row.show();
117         }
118
119         $('#' + id + '_activate_filters')
120             .text(_("Deactivate filters"))
121             .unbind('click')
122             .click(function() {
123                 deactivate_filters(id);
124                 return false;
125             });
126     }
127
128     function deactivate_filters(id) {
129         filters_row = $("#" + id + " table").find('thead tr.filters_row');
130
131         filters_row.find('input[type="text"]')
132             .val('')            // Empty filter text boxes
133             .trigger('keyup')   // Filter (display all rows)
134             .trigger('blur');   // Reset value to the column name
135         filters_row.hide();
136
137         $('#' + id + '_activate_filters')
138             .text(_("Activate filters"))
139             .unbind('click')
140             .click(function() {
141                 activate_filters(id);
142                 return false;
143             });
144     }
145
146     $(document).ready(function() {
147         var ids = ['holdings', 'otherholdings'];
148         for (var i in ids) {
149             var id = ids[i];
150             table = $('#' + id + ' table');
151
152             // Duplicate the table header row for columnFilter
153             thead_row = table.find('thead tr');
154             clone = thead_row.clone().addClass('filters_row');
155             thead_row.before(clone);
156
157             // Enable sorting
158             table.dataTable($.extend(true, {}, dataTablesDefaults, {
159                 'sDom': 't',
160                 'bPaginate': false,
161                 'bAutoWidth': false
162             }));
163
164             // Show a link to activate filtering
165             link = $('<a>')
166                 .attr('href', '#')
167                 .attr('id', id + '_activate_filters');
168             table.before(link);
169             deactivate_filters(id);
170         }
171     });
172 //]]>
173 </script>
174 </head>
175
176 <body id="catalog_detail" class="catalog">
177
178 [% INCLUDE 'header.inc' %]
179 [% INCLUDE 'cat-search.inc' %]
180
181 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo;
182   [% IF ( unknownbiblionumber ) %]
183     Unknown record
184   [% ELSE %]
185     Details for <i>[% title |html %]  [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</i>
186   [% END %]
187 </div>
188
189 <div id="doc3" class="yui-t2">
190
191 [% IF ( unknownbiblionumber ) %]
192   <div class="dialog message">The record you requested does not exist ([% biblionumber %]).</div>
193 [% ELSE %]
194    <div id="bd">
195     <div id="yui-main">
196     <div class="yui-b">
197
198 [% INCLUDE 'cat-toolbar.inc' %]
199     [% IF ( ocoins ) %]
200         <!-- COinS / OpenURL -->
201         <span class="Z3988" title="[% ocoins %]"></span>
202     [% END %]
203
204     [% IF ( AmazonCoverImages ) %]
205         [% IF ( XSLTDetailsDisplay ) %]
206             <div class="yui-gc">
207             <div id="catalogue_detail_biblio" class="yui-u first">
208         [% ELSE %]
209             <div class="yui-gb">
210             <div id="catalogue_detail_biblio" class="yui-u first">
211         [% END %]
212     [% ELSE %]
213         [% IF ( XSLTDetailsDisplay ) %]
214             <div class="yui-g">
215             <div id="catalogue_detail_biblio">
216         [% ELSE %]
217             <div class="yui-g">
218             <div id="catalogue_detail_biblio" class="yui-u first">
219         [% END %]
220     [% END %]
221
222     [% IF ( XSLTDetailsDisplay ) %]
223         [% XSLTBloc %]
224
225         [% IF ( GetShelves ) %]
226             <span class="results_summary"><span class="label">Lists that include this title: </span>
227             [% FOREACH GetShelve IN GetShelves %]
228                 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a>
229                 [% IF ( loop.last ) %][% ELSE %]|[% END %]
230             [% END %]
231             </span>
232         [% END %]
233         [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
234                 <span class="results_summary"><span class="label">Tags:</span>
235                     [% FOREACH TagLoo IN TagLoop %]
236                         [% IF ( CAN_user_tools_moderate_tags ) %]
237                         <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
238                         [% ELSE %]
239                         [% TagLoo.term |html %]
240                         [% END %]
241                         <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
242                     [% END %]
243                     </span>
244         [% END %]
245         <span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC Preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a></span>
246         [% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %]
247
248         [% IF ( AmazonCoverImages ) %]</div><div class="yui-u" id="bookcoverimg">
249         <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /></a>[% END %]
250     [% ELSE %]
251
252     <h3>[% title |html %]</h3>
253     [% FOREACH subtitl IN subtitle %]
254         <h4>[% subtitl.subfield %]</h4>
255     [% END %]
256             [% UNLESS ( item_level_itypes ) %]<img src="[% imageurl %]" alt="[% description %]" title="[% description %]">[% END %]
257             [% IF ( unititle ) %]<p>[% unititle |html %]</p>[% END %]
258             [% IF ( author ) %]<p>By <a href="/cgi-bin/koha/catalogue/search.pl?q=au:[% author |url %]">[% author %]</a></p>[% END %]
259         <ul>
260         [% IF ( MARCAUTHORS ) %]
261             <li><strong>Additional authors:</strong><ul>
262             [% FOREACH MARCAUTHOR IN MARCAUTHORS %]
263                 <li>[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value |url %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]</li>
264                 [% END %]
265
266         </ul>
267             </li>
268         [% END %]
269 [% IF ( MARCSERIES ) %]
270                 <li><strong>Series: </strong><ul>[% FOREACH MARCSERIE IN MARCSERIES %]
271                 <li>[% FOREACH MARCSERIES_SUBFIELDS_LOO IN MARCSERIE.MARCSERIES_SUBFIELDS_LOOP %] [% IF ( MARCSERIES_SUBFIELDS_LOO.value ) %]<a href="/cgi-bin/koha/catalogue/search.pl?q=se:[% MARCSERIES_SUBFIELDS_LOO.value |url %]">[% MARCSERIES_SUBFIELDS_LOO.value %]</a>[% END %][% IF ( MARCSERIES_SUBFIELDS_LOO.volumenum ) %]. [% MARCSERIES_SUBFIELDS_LOO.volumenum %][% END %][% END %]</li> 
272                 [% END %]
273                 </ul>
274                 </li>
275 [% END %]
276         [% IF ( publishercode ) %]
277     <li><strong>Published by:</strong>
278         <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:[% publishercode |url %]">
279             [% publishercode |html %]
280         </a> [% IF ( place ) %]([% place %])[% END %] [% IF ( publicationyear ) %], [% publicationyear %][% END %] [% IF ( editionstatement ) %][% editionstatement %][% END %] [% IF ( editionresponsability ) %][% editionresponsability %][% END %]
281     </li>
282     [% END %]
283         <li><strong>Description:</strong>
284                 [% IF ( pages ) %] [% END %][% pages %] [% IF ( illus ) %][% illus %][% END %]
285                 [% IF ( size ) %][% size %][% END %]
286         </li>
287 [% IF ( MARCURLS ) %]<li>
288     
289     <strong>Online resources:</strong>
290     <ul>    [% FOREACH MARCurl IN MARCURLS %]
291                 <li>[% IF ( MARCurl.part ) %][% MARCurl.part %]
292                         <br />[% END %] 
293                 <!-- here you might do a tmpl_if name="toc" and use greybox or equivalent for table of contents -->
294                 <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">[% MARCurl.linktext %]</a>
295                         [% IF ( MARCurl.notes ) %]<ul>[% FOREACH note IN MARCurl.notes %]<li>[% note.note %]</li>[% END %]</ul>[% END %]</li>
296             [% END %]</ul>
297 </li>
298     [% END %]
299     
300     [% IF ( OpacUrl ) %]
301         <li><strong>OPAC view:</strong>
302         <a href="http://[% OpacUrl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" target="_blank">Open in new window</a>
303                 </li>
304         [% END %]
305         <li id="catalogue_detail_marc_preview">
306             <strong>MARC Preview:</strong>
307             <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a>
308         </li>
309         </ul>
310         </div>
311        
312 [% IF ( AmazonCoverImages ) %]<div class="yui-u" id="bookcoverimg">
313 <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /></a></div>[% END %]
314         
315         <div class="yui-u" style="margin-top: 1em;">
316         <ul>
317         [% IF ( MARCISBNS ) %]
318             <li><strong>ISBN:</strong><ul>[% FOREACH MARCISBN IN MARCISBNS %]<li>[% MARCISBN.marcisbn %]</li>[% END %]</ul></li>
319         [% ELSE %]
320             [% IF ( normalized_isbn ) %]
321                 <li><strong>ISBN:</strong> [% normalized_isbn %]</li>
322             [% END %]
323         [% END %]
324         [% IF ( issn ) %]
325             <li><strong>ISSN:</strong>[% issn %]</li>
326         [% END %]
327         [% IF ( collectiontitle ) %]
328             <li><strong>Collection: </strong>
329                 [% collectiontitle %] [% IF ( collectionvolume ) %], [% collectionvolume %][% END %][% IF ( collectionissn ) %] (<strong>ISSN:</strong> [% collectionissn %])[% END %]
330             </li>
331         [% END %]
332         [% IF ( MARCSUBJCTS ) %]
333             <li><strong>Subjects:</strong> 
334             <ul>
335                 [% FOREACH MARCSUBJCT IN MARCSUBJCTS %]
336                 <li>[% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% MARCSUBJECT_SUBFIELDS_LOO.separator %] <a title="‡[% MARCSUBJECT_SUBFIELDS_LOO.code %] [% MARCSUBJECT_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCSUBJECT_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCSUBJECT_SUBFIELDS_LOO.value |html %]</a>[% END %]</li>
337                 [% END %]
338                 </ul>
339             </li>
340         [% END %]
341         [% IF ( copyrightdate ) %]
342             <li><strong>Copyright:</strong> [% copyrightdate %]</li>
343         [% END %]
344      
345         [% IF ( classification ) %]
346             <li><strong>Classification:</strong> [% subclass %][% classification %]</li>
347         [% END %]
348         [% IF ( dewey ) %]
349             <li><strong>Dewey:</strong> [% dewey %]</li>
350         [% END %]
351         [% IF ( urlS ) %]
352             <li><strong>url:</strong> 
353                 [% FOREACH url IN urlS %]
354                     <a href="[% url.url %]">[% url.url %]</a>
355                 [% END %]
356             </li>
357         [% END %]
358         <!--This grabs all of the lists a bib record appears in -->
359         [% IF ( GetShelves ) %]
360                 <li><strong>Lists that include this title: </strong>
361                 <ul>
362                 [% FOREACH GetShelve IN GetShelves %]
363                         <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a></li>
364                 [% END %]
365                 </ul>
366                 </li>
367         [% END %]
368         [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
369                 <li><strong>Tags:</strong>
370                     <ul id="tagslist">
371                     [% FOREACH TagLoo IN TagLoop %]
372                         <li>
373                         [% IF ( CAN_user_tools_moderate_tags ) %]
374                         <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term |html %]</a>
375                         [% ELSE %]
376                         [% TagLoo.term |html %]
377                         [% END %]
378                         <span class="weight">([% TagLoo.weight_total %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]</li>
379                     [% END %]
380                     </ul></li>
381         [% END %]
382             [% IF ( holdcount ) %]<li><strong>Holds:</strong> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></li>[% ELSE %][% END %]
383         </ul>
384                 [% END %]
385
386 </div>
387 </div>
388 <div id="bibliodetails" class="toptabs">
389
390 <ul>
391     [% IF (SeparateHoldings) %]
392         <li><a href="#holdings">[% LoginBranchname %] holdings</a></li>
393         <li><a href="#otherholdings">Other holdings</a></li>
394     [% ELSE %]
395         <li><a href="#holdings">Holdings</a></li>
396     [% END %]
397 [% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %]
398 [% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
399 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %]
400 [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]<li><a href="#images">Images</a></li>[% END %][% END %]
401 [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %]
402 </ul>
403
404 [% BLOCK items_table %]
405     <table>
406         <thead>
407             <tr>
408                 [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
409                 <th>Current location</th>
410                 <th>Home library</th>
411                 [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
412                 <th>Call number</th>
413                 <th>Status</th>
414                 <th>Last seen</th>
415                 <th>Barcode</th>
416                 [% IF ( volinfo ) %]<th>Publication details</th>[% END %]
417                 [% IF ( itemdata_uri ) %]<th>url</th>[% END %]
418                 [% IF ( itemdata_copynumber ) %]<th>Copy no.</th>[% END %]
419                 [% IF materials %]<th>Materials specified</th>[% END %]
420                 [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
421                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
422                 [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
423                 [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
424                 [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
425             </tr>
426         </thead>
427         <tbody>
428             [% FOREACH item IN items %]
429                 <tr>
430                     [% IF ( item_level_itypes ) %]
431                         <td class="itype">
432                             [% IF !noItemTypeImages && item.imageurl %]
433                                 <img src="[% item.imageurl %]" alt="[% item.description %]" title="[% item.description %]" />
434                             [% END %]
435                             [% item.description %]
436                         </td>
437                     [% END %]
438                     <td class="location">[% UNLESS ( singlebranchmode ) %][% item.branchname %] [% END %]</td>
439                     <td class="homebranch">[% item.homebranch %]<span class="shelvingloc">[% item.location %]</span> </td>
440                     [% IF ( itemdata_ccode ) %]<td>[% item.ccode %]</td>[% END %]
441                     <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber %][% END %]</td>
442                     <td class="status">
443
444                         [% IF ( item.datedue ) %]
445                             <span class="datedue">Checked out
446                                 [% UNLESS ( item.NOTSAMEBRANCH ) %]
447                                     to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
448                                         [% IF ( item.hidepatronname ) %]
449                                             [% item.cardnumber %]
450                                         [% ELSE %]
451                                             [% item.firstname %] [% item.surname %]
452                                         [% END %]
453                                     </a>
454                                 [% END %]
455                                 : due [% item.datedue %]
456                             </span>
457                         [% ELSIF ( item.transfertwhen ) %]
458                             <span class="intransit">In transit from [% item.transfertfrom %] to [% item.transfertto %] since [% item.transfertwhen %]</span>
459                         [% END %]
460
461                         [% IF ( item.itemlost ) %]
462                             [% IF ( item.itemlostloop ) %]
463                                 [% FOREACH itemlostloo IN item.itemlostloop %]
464                                     [% IF ( itemlostloo.selected ) %]
465                                         <span class="lost">[% itemlostloo.lib %]</span>
466                                     [% END %]
467                                 [% END %]
468                             [% ELSE %]
469                                 <span class="lost">Unavailable (lost or missing)</span>
470                             [% END %]
471                         [% END %]
472
473                         [% IF ( item.withdrawn ) %]
474                             <span class="wdn">Withdrawn</span>
475                         [% END %]
476
477                         [% IF ( item.damaged ) %]
478                             [% IF ( item.itemdamagedloop ) %]
479                                 [% FOREACH itemdamagedloo IN item.itemdamagedloop %]
480                                     [% IF ( itemdamagedloo.selected ) %]
481                                         <span class="dmg">[% itemdamagedloo.lib %]</span>
482                                     [% END %]
483                                 [% END %]
484                             [% ELSE %]
485                                 <span class="dmg">Damaged</span>
486                             [% END %]
487                         [% END %]
488
489                         [% IF ( item.itemnotforloan ) %]
490                             Not for loan
491                             [% IF ( item.notforloanvalue ) %]
492                                 ([% item.notforloanvalue %])
493                             [% END %]
494                         [% END %]
495
496                         [% IF ( item.reservedate ) %]
497                             [% IF ( item.waitingdate ) %]
498                                 Waiting
499                             [% ELSE %]
500                                 Item-level hold
501                             [% END %]
502                             [% IF ( canreservefromotherbranches ) %]
503                                 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.ReservedForBorrowernumber %]">
504                                     [% IF ( item.hidepatronname ) %]
505                                         [% item.Reservedcardnumber %]
506                                     [% ELSE %]
507                                         [% item.ReservedForFirstname %] [% item.ReservedForSurname %]
508                                     [% END %]
509                                 </a>
510                             [% END %]
511                             [% IF ( item.waitingdate ) %]
512                                 at[% ELSE %]for delivery at
513                             [% END %]
514                             [% item.ExpectedAtLibrary %]
515                             [% IF ( item.waitingdate ) %]
516                                 since [% item.waitingdate %]
517                             [% ELSE %]
518                                 [% IF ( item.reservedate ) %]
519                                     (placed [% item.reservedate %])
520                                 [% END %]
521                             [% END %]
522                         [% END %]
523                         [% UNLESS ( item.itemnotforloan or item.onloan or item.itemlost or item.withdrawn or item.damaged or item.transfertwhen or item.reservedate ) %]
524                             Available
525                         [% END %]
526
527                         [% IF ( item.restricted ) %]
528                             <span class="restricted">([% item.restricted %])</span>
529                         [% END %]
530
531                     </td>
532                     <td class="datelastseen">[% item.datelastseen %]</td>
533                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type %]&amp;itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a></td>
534                     [% IF ( volinfo ) %]
535                         <td class="enumchron">
536                             [% IF ( itemdata_enumchron ) %]
537                                 [% IF ( item.enumchron ) %]
538                                     [% item.enumchron %]
539                                     [% IF ( item.serialseq ) %] -- [% END %]
540                                 [% END %]
541                                 [% item.serialseq %]
542                                 [% IF ( item.publisheddate ) %] ([% item.publisheddate %])[% END %]
543                             [% END %]
544                         </td>
545                     [% END %]
546                     [% IF ( itemdata_uri ) %]
547                         <td class="uri"><a href="[% item.uri %]">[% item.uri %]</a></td>
548                     [% END %]
549                     [% IF ( itemdata_copynumber ) %]
550                         <td class="copynumber">[% item.copynumber %]</td>
551                     [% END %]
552                     [% IF materials %]
553                         <td class="materials"> [% item.materials %] </td>
554                     [% END %]
555                     [% IF ( itemdata_itemnotes ) %]
556                         <td><div class="itemnotes">[% item.itemnotes %]</div></td>
557                     [% END %]
558                     [% IF ( SpineLabelShowPrintOnBibDetails ) %]
559                         <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode %]" >Print label</a></td>
560                     [% END %]
561                     [% IF ( hostrecords ) %]
562                         <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber %]" >[% item.hosttitle %]</a>[% END %]</td>
563                     [% END %]
564                     [% IF ( analyze ) %]
565                         <td>
566                             [% IF ( item.countanalytics ) %]
567                                 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% item.itemnumber %]">[% item.countanalytics %] analytics</a>
568                             [% END %]
569                         </td>
570                     [% END %]
571                     [% IF ( analyze ) %]
572                         <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber %]&amp;hostitemnumber=[% item.itemnumber %]">Create analytics</a></td>
573                     [% END %]
574
575                 [% IF ShowCourseReserves %]
576                     <td>
577                         [% IF item.course_reserves %]
578                             [% FOREACH r IN item.course_reserves %]
579                                 [% IF r.course.enabled == 'yes' %]
580                                     <p>
581                                       <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id %]">
582                                          [% r.course.course_name %]
583                                          <!--[% IF r.course.course_number %] [% r.course.course_number %] [% END %]-->
584                                          [% IF r.course.section %] [% r.course.section %] [% END %]
585                                          [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) %] [% END %]
586                                       </a>
587                                    </p>
588                                [% END %]
589                            [% END %]
590                        [% END %]
591                     </td>
592                 [% END %]
593                 </tr>
594             [% END %]
595         </tbody>
596     </table>
597 [% END %][%# end of block items_table %]
598
599 <div id="holdings">
600 [% IF ( count ) %]
601     [% IF ( showncount ) %]
602         [% PROCESS items_table items=itemloop %]
603         [% END %]
604                 [% IF ( hiddencount ) %]
605                    <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items ([% hiddencount %] hidden)</a>
606                 [% END %]               
607                 [% IF ( debug_display ) %]
608                 <br /><br />
609                 <table>
610                         <tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron %]</td></tr>
611                         <tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber %]</td></tr>
612                         <tr><td>serial</td><td>[% serial %]</td></tr>
613                 </table>
614                 [% END %]
615 [% ELSE %]
616     [% IF ( ALTERNATEHOLDINGS ) %]
617     [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
618         <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding %]</div>
619     [% END %]
620     [% ELSE %]
621     <div id="noitems">No physical items for this record</div>
622     [% END %]
623 [% END %]
624     </div>
625
626 [% IF (SeparateHoldings) %]
627     <div id="otherholdings">
628         [% IF (otheritemloop.size) %]
629             [% PROCESS items_table items=otheritemloop %]
630         [% ELSE %]
631             No other items.
632         [% END %]
633     </div>
634 [% END %]
635
636 [% IF ( MARCNOTES || notes ) %]
637
638 <div id="description">
639 <div class="content_set">
640
641 [% IF ( MARCNOTES ) %]
642     [% FOREACH MARCNOTE IN MARCNOTES %]
643     <p>[% MARCNOTE.marcnote FILTER html_line_break %]</p>
644     [% END %]
645     [% ELSE %]
646     [% IF ( notes ) %]
647     <p>[% notes %]</p>
648     [% END %]
649 [% END %]
650 </div>
651 </div>
652
653 [% END %]
654
655 [% IF ( subscriptionsnumber ) %]
656 <div id="subscriptions">
657 <div class="yui-g">
658 <div id="catalogue_detail_subscriptions">
659     <h2>This is a serial subscription</h2>
660     <p> (There are [% subscriptionsnumber %] subscriptions associated with this title).</p> 
661     [% FOREACH subscription IN subscriptions %]
662             [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %]
663             [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %]
664             [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
665             [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %] </p>[% END %]
666             [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %]
667             [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist %] </p>[% END %]
668             [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote %])</p>[% END %]
669             [% IF ( subscription.latestserials ) %]
670             <p> The [% subscription.staffdisplaycount %] latest issues related to this subscription:</p>
671             <table>
672                 <tr>
673                     <th>Issue #</th>
674                     <th>Date arrived</th>
675                     <th>Date published</th>
676                     <th>Status</th>
677                     <th>Note</th>
678                 </tr>
679             [% FOREACH latestserial IN subscription.latestserials %]
680                 <tr>
681                     <td>[% latestserial.serialseq %]</td>
682                     <td>[% latestserial.planneddate %]</td>
683                     <td>[% latestserial.publisheddate%]</td>
684                     <td>
685                       [% IF ( latestserial.status1 ) %]Expected[% END %]
686                       [% IF ( latestserial.status2 ) %]Arrived[% END %]
687                       [% IF ( latestserial.status3 ) %]Late[% END %]
688                       [% IF ( latestserial.status4 ) %]Missing[% END %]
689                       [% IF ( latestserial.status5 ) %]Not issued[% END %]
690                       [% IF ( latestserial.status6 ) %]Delete[% END %]
691                       [% IF ( latestserial.status7 ) %]Claimed[% END %]
692                       [% IF ( latestserial.status8 ) %]Stopped[% END %]
693                     </td>
694                     <td>[% latestserial.notes %]</td>
695                 </tr>
696             [% END %]
697             </table>
698             [% END %]
699             <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]">Subscription details</a>
700     [% END %]
701 </div>
702 </div>
703 </div>
704 [% END %]
705
706 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
707 <div id="editions"><h4>Editions</h4>
708 <table>
709 [% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="http://images.amazon.com/images/P/[% XISBN.normalized_isbn %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %]
710 [% UNLESS ( item_level_itypes ) %]<td>[% IF ( noItemTypeImages ) %][% XISBN.description %][% ELSE %]<img src="[% XISBN.imageurl %]" alt="[% XISBN.description %]" title="[% XISBN.description %]">[% END %]</td>[% END %]
711 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber %]">[% XISBN.title |html %]</a> by [% XISBN.author %] &copy;[% XISBN.copyrightdate %]
712   [% IF ( XISBN.publishercode ) %]
713 [% XISBN.publishercode %] [% IF ( XISBN.place ) %]([% XISBN.place %])[% END %] [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear %][% END %] [% IF ( XISBN.editionstatement ) %][% XISBN.editionstatement %][% END %] [% IF ( XISBN.editionresponsability ) %][% XISBN.editionresponsability %][% END %]
714     [% END %]
715                 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages %] [% IF ( XISBN.illus ) %][% XISBN.illus %][% END %]
716                 [% IF ( XISBN.size ) %], [% END %][% XISBN.size %]
717 </td>
718
719 [% END %]
720 </table></div>[% END %]
721 [% END %]
722
723 [% IF ( LocalCoverImages ) %]
724 <div id="images">
725 [% IF ( localimages.0 ) %]
726     <p>Click on an image to view it in the image viewer</p>
727     <ul class="thumbnails">
728 [% FOREACH image IN localimages %]
729     [% IF image %]
730         <li id="imagenumber-[% image %]">
731             <a class="thumbnail" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% image %]">
732                 <img alt="remove this image" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image %]" />
733                 [% IF CAN_user_tools_upload_local_cover_images %]
734                   <span class="remove" title="remove this image">Delete image</span>
735                 [% END %]
736             </a>
737         </li>
738     [% END %]
739 [% END %]
740     </ul>
741 [% ELSE %]
742 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
743     <p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&amp;filetype=image'>upload</a> one.</p>
744 [% END %]
745 [% END %]
746 </div>
747 [% END %]
748
749 [% IF ( HTML5MediaEnabled ) %]
750 <div id="html5media">
751         <p>
752         <[% HTML5MediaParent %] controls preload=none>
753           [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
754             <[% HTML5MediaSet.child  %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] />
755           [% END %]
756             [[% HTML5MediaParent %] tag not supported by your browser.]
757         </[% HTML5MediaParent %]>
758         </p>
759 </div>
760 [% END %]
761
762
763 </div><!-- /bibliodetails -->
764
765 <div class="yui-g" id="export" style="margin-top: 1em;">
766 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
767 <table>  <tr>
768       <th>Save Record</th>   </tr>
769     <tr><td> Select download format:    <select name="format">
770         <option value="mods">MODS (XML)</option>
771         <option value="dc">Dublin Core (XML)</option>
772         <option value="marcxml">MARCXML</option>
773         <option value="marc8">MARC (non-Unicode/MARC-8)</option>
774         <option value="utf8">MARC (Unicode/UTF-8)</option>    </select>
775         <input type="submit" name="save" value="Download Record" /></td>
776   </tr>
777   <tr><td>
778     <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber %]" />
779   </td></tr>
780 </table>
781 </form>
782 </div>
783
784
785
786 </div>
787 </div>
788 <div class="yui-b">
789 [% INCLUDE 'biblio-view-menu.inc' %]
790 </div>
791 [% END %]
792 </div>
793 [% INCLUDE 'intranet-bottom.inc' %]