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