Bug 27120: (follow-up) also send biblionumber
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / detail.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE KohaPlugins %]
6 [% USE AuthorisedValues %]
7 [% USE Branches %]
8 [% USE Biblio %]
9 [% USE Price %]
10 [% USE TablesSettings %]
11 [% PROCESS 'i18n.inc' %]
12 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
13 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
14
15 [% IF Koha.Preference('AmazonAssocTag') %]
16     [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
17 [% ELSE %]
18     [% AmazonAssocTag = '' %]
19 [% END %]
20
21 [% ShowCourseReserves = 0 | html %]
22 [% IF UseCourseReserves %]
23     [% FOREACH item IN itemloop %]
24        [% IF item.course_reserves %]
25            [% FOREACH r IN item.course_reserves %]
26                [% IF r.course.enabled == 'yes' %]
27                    [% ShowCourseReserves = 1 | html %]
28                [% END %]
29            [% END %]
30         [% END %]
31     [% END %]
32 [% END %]
33
34 [% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %]
35
36 [% SET footerjs = 1 %]
37 [% INCLUDE 'doc-head-open.inc' %]
38 <title>
39   [% IF ( unknownbiblionumber ) %]
40     Unknown record
41   [% ELSE %]
42     Details for [% INCLUDE 'biblio-title-head.inc' %]
43   [% END %] &rsaquo; Catalog &rsaquo; Koha
44 </title>
45 [% INCLUDE 'doc-head-close.inc' %]
46 </head>
47
48 <body id="catalog_detail" class="catalog">
49
50 [% INCLUDE 'header.inc' %]
51 [% INCLUDE 'cat-search.inc' %]
52
53 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
54     <ol>
55         <li>
56             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
57         </li>
58         <li>
59             <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
60         </li>
61
62         [% IF ( unknownbiblionumber ) %]
63             <li>
64                 <a href="#" aria-current="page">
65                     Unknown record
66                 </a>
67             </li>
68         [% ELSE %]
69             <li>
70                 [% INCLUDE 'biblio-title.inc' link = 1 %]
71             </li>
72             <li>
73                 <a href="#" aria-current="page">
74                     Details
75                 </a>
76             </li>
77         [% END %]
78     </ol>
79 </nav>
80
81 <div class="main container-fluid">
82     <div class="row">
83         <div class="col-sm-10 col-sm-push-2">
84             <main>
85                 <div class="row">
86
87 [% IF ( unknownbiblionumber ) %]
88   <div class="dialog message">The record you requested does not exist ([% biblionumber | html %]).</div>
89 [% ELSE %]
90
91 [% IntranetCoce    = Koha.Preference('IntranetCoce') %]
92 [% CoceProviders   = Koha.Preference('CoceProviders') %]
93 [% CoceHost        = Koha.Preference('CoceHost') %]
94
95 [% INCLUDE 'cat-toolbar.inc' %]
96     [% IF decoding_error %]
97         <div>
98            <span class="biberror">
99             There is an error with this bibliographic record, the view may be degraded.</span>
100             <span class="error"><br/> Error: [% decoding_error | html %]</span>
101         </div>
102     [% END %]
103     [% IF ( ocoins ) %]
104         <!-- COinS / OpenURL -->
105         <span class="Z3988" title="[% ocoins | html %]"></span>
106     [% END %]
107
108     [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
109         [% IF ( XSLTDetailsDisplay ) %]
110             <div id="catalogue_detail_biblio" class="col-xs-9">
111         [% ELSE %]
112             <div id="catalogue_detail_biblio" class="col-xs-9">
113         [% END %]
114     [% ELSE %]
115         <div id="catalogue_detail_biblio" class="col-xs-12">
116     [% END %]
117
118         [% XSLTBloc | $raw %]
119
120         [% IF shelves.count %]
121             <span class="results_summary"><span class="label">Lists that include this title: </span>
122             [% FOREACH s IN shelves %]
123                 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a>
124                 [% IF ( loop.last ) %][% ELSE %]|[% END %]
125             [% END %]
126             </span>
127         [% END %]
128         [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
129                 <span class="results_summary"><span class="label">Tags:</span>
130                     [% FOREACH TagLoo IN TagLoop %]
131                         [% IF ( CAN_user_tools_moderate_tags ) %]
132                         <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
133                         [% ELSE %]
134                         [% TagLoo.term | html %]
135                         [% END %]
136                         <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
137                     [% END %]
138                     </span>
139         [% END %]
140         <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 | uri %]&amp;viewas=html" title="MARC" class="previewMARC">Show</a></span>
141         [% IF !item_level_itypes ||  Koha.Preference("BiblioItemtypeInfo") %]
142            <span class="results_summary itemtype"><span class="label">Itemtype:</span>
143           [% IF ( !noItemTypeImages && imageurl ) %]
144               <img src="[% imageurl | html %]" alt="" />
145           [% END %]
146           [% IF ( description ) %]
147             [% description | html %]
148           [% ELSE %]
149             [% itemtype | html %]
150           [% END %]
151           </span>
152         [% END %]
153
154         [% IF ( holdcount ) %]
155             <span class="results_summary">
156                 <span class="label">Holds:</span>
157                 <span class="number_box">
158                     [% IF CAN_user_reserveforothers_place_holds %]
159                         <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber | uri %]">[% holdcount | html %]</a>
160                     [% ELSE %]
161                         <span>[% holdcount | html %]</span>
162                     [% END %]
163                 </span>
164             </span>
165         [% END %]
166
167         [% IF illrequests.count %]
168             <span class="results_summary">
169                 <span class="label">ILL requests:</span>
170                 [% IF CAN_user_ill %]
171                     [% FOREACH ill IN illrequests %]
172                         <a href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% ill.illrequest_id | uri %]">Request [% ill.illrequest_id | html %]</a>[% IF ! loop.last %], [% END %]
173                     [% END %]
174                 [% ELSE %]
175                     [% FOREACH ill IN illrequests %]
176                         <span>Request [% ill.illrequest_id | html %]</span>[% IF ! loop.last %], [% END %]
177                     [% END %]
178                 [% END %]
179             </span>
180         [% END %]
181
182         [% IF ( article_requests_count = Biblio.ArticleRequestsActiveCount( biblionumber ) ) %]
183             <span class="results_summary">
184                 <span class="label">Article requests:</span>
185                 <span class="number_box">
186                     <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | uri %]">[% article_requests_count | html %]</a>
187                 </span>
188             </span>
189         [% END %]
190
191         [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
192             </div>
193             <div class="col-xs-3 bookcoverimg">
194                 <div id="biblio-cover-slider" class="cover-slider">
195                     [% IF ( LocalCoverImages ) %]
196                         [% IF localimages.count %]
197                             [% FOREACH image IN localimages %]
198                                 <div class="cover-image local-coverimg">
199                                     <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]">
200                                         <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" />
201                                     </a>
202                                     <div class="hint">Local cover image</div>
203                                 </div>
204                             [% END %]
205                         [% END %]
206                     [% END %]
207
208                     [% IF ( AdlibrisEnabled && normalized_isbn ) %]
209                         <div class="cover-image" id="adlibris-coverimg">
210                             <a href="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]">
211                                 <img src="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]" class="adlibris-cover-big" alt="Adlibris cover image" />
212                             </a>
213                             <div class="hint">Image from Adlibris</div>
214                         </div>
215                     [% END %]
216
217                     [% IF ( AmazonCoverImages && normalized_isbn) %]
218                         <div class="cover-image" id="amazon-bookcoverimg">
219                             <a href="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link">
220                                 <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | html %].01.MZZZZZZZ.jpg" alt="Amazon cover image" />
221                             </a>
222                             <div class="hint">Image from Amazon.com</div>
223                         </div>
224                     [% END %]
225
226                     [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
227                         [% coce_id = normalized_ean || normalized_isbn %]
228                         <div class="cover-image" id="coce-coverimg">
229                             [% IF ( coce_id ) %]
230                                 <span title="[% biblionumber | url %]" class="[% coce_id | html %]" id="coce-thumbnail-preview"></span>
231                             [% ELSE %]
232                                 <span class="no-image">No cover image available</span>
233                             [% END %]
234                             <div class="hint">Image from Coce</div>
235                         </div>
236                     [% END %]
237
238                     [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
239                         [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
240                         [% IF custom_cover_image_url %]
241                             <div class="cover-image" id="custom-coverimg">
242                                 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]">
243                                     <img id="custom-img" alt="Custom cover image" src="[% custom_cover_image_url | url %]" />
244                                 </a>
245                                 <div class="hint">Custom cover image</div>
246                             </div>
247                         [% END %]
248                     [% END %]
249                 </div> <!-- /.cover-slider -->
250             </div> <!-- /.bookcoverimg.col-xs-3 -->
251         [% ELSE %]
252         </div> <!-- /.col-xs-* -->
253         [% END # /IF ( AmazonCoverImages, etc ) %]
254 </div>
255 <div id="bibliodetails" class="toptabs">
256
257 <ul>
258     [% IF (SeparateHoldings) %]
259         <li>
260             <a href="#holdings">[% Branches.GetLoggedInBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
261         </li>
262         <li>
263             <a href="#otherholdings">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
264         </li>
265     [% ELSE %]
266         <li>
267             <a href="#holdings">Holdings ([% itemloop.size() || 0 | html %])</a>
268         </li>
269     [% END %]
270 [% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</a></li>[% END %]
271 [% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
272 [% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %]
273 [% IF suggestions.count %]<li><a href="#suggestion_details">Suggestion details</a></li>[% END %]
274 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %]
275 [% IF ( LocalCoverImages ) %]
276     [% IF ( localimages.count || CAN_user_tools_upload_local_cover_images ) %]
277         <li>
278             <a href="#images">Images ([% localimages.count || 0 | html %])</a>
279         </li>
280     [% END %]
281 [% END %]
282 [% IF HTML5MediaEnabled && HTML5MediaSets.size %]<li id="media_tab"><a href="#html5media">Play media</a></li>[% END %]
283 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
284     <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
285 [% END %]
286 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
287     <li><a href="#[% plugins_intranet_catalog_biblio_tab.id | uri %]">[% plugins_intranet_catalog_biblio_tab.title | html %]</a></li>
288 [% END %]
289 </ul>
290
291 [% items_table_block_iter = 0 %]
292 [% BLOCK items_table %]
293     [% items_table_block_iter = items_table_block_iter + 1 %]
294     <div class="[% tab | html %]_table_table_controls">
295         [% IF (StaffDetailItemSelection) %]
296             | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a> |
297             <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
298             <span class="itemselection_actions">
299               | Actions:
300               [% IF CAN_user_tools_items_batchdel %]
301                 <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
302               [% END %]
303               [% IF CAN_user_tools_items_batchmod %]
304                 <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
305               [% END %]
306             </span>
307         [% END %]
308     </div>
309     <table class="items_table" id="[% tab | html %]_table">
310         <thead>
311             <tr>
312                 [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
313                 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
314                     <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th>
315                 [% END %]
316                 [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
317                 <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
318                 <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
319                 [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
320                 <th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th>
321                 [% IF volinfo %]
322                     <th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th>
323                 [% END %]
324                 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
325                 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen">Last seen</th>
326                 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned">Date accessioned</th>
327                 <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed">Date last borrowed</th>
328                 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
329                 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
330                 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
331                 [% IF ( itemdata_stocknumber ) %]<th id="[% tab | html %]_stocknumber" data-colname="[% tab | html %]_stocknumber">Inventory number</th>[% END %]
332                 [% IF materials %]<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>[% END %]
333                 [% IF ( itemdata_itemnotes ) %]<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>[% END %]
334                 [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>[% END %]
335                 [% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
336                 [% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
337                 [% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
338                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
339                 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort">&nbsp;</th>[% END %]
340             </tr>
341         </thead>
342         <tbody>
343             [% FOREACH item IN items %]
344                 <tr>
345                 [% IF (StaffDetailItemSelection) %]
346                     <td style="text-align:center;vertical-align:middle">
347                         <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
348                     </td>
349                 [% END %]
350                     [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
351                         <td class="cover">
352                             <div class="bookcoverimg">
353                                 <div class="cover-slider">
354                                     [% FOREACH image IN item.cover_images %]
355                                         <div class="cover-image local-coverimg">
356                                             <a href="/cgi-bin/koha/catalogue/imageviewer.pl?itemnumber=[% image.itemnumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]">
357                                                 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" />
358                                             </a>
359                                         </div>
360                                     [% END %]
361                                 </div>
362                             </div>
363                         </td>
364                     [% END %]
365
366                     [% IF ( item_level_itypes ) %]
367                         <td class="itype">
368                             [% IF !noItemTypeImages && item.imageurl %]
369                                 <img src="[% item.imageurl | html %]" alt="[% item.translated_description | html %]" title="[% item.translated_description | html %]" />
370                             [% END %]
371                             <span class="itypedesc">[% item.translated_description | html %]</span>
372                         </td>
373                     [% END %]
374                     <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td>
375                     <td class="homebranch">
376                         <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
377                         <span class="shelvingloc">
378 <!--
379 If permanent location is defined, show description or code and display current location in parentheses. If not, display current location.
380 Note that permanent location is a code, and location may be an authval.
381 -->
382                             [% IF item.permanent_location %]
383                                 [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
384                                 [% permloc_authval | html %]
385                                 [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %]
386                                     ([% item.location | html %])
387                                 [% END %]
388                             [% ELSE %]
389                                 [% item.location | html %]
390                             [% END %]
391                         </span>
392                     </td>
393                     [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
394                     <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
395                     [% IF ( volinfo ) %]
396                         <td class="enumchron" data-order="[% item.publisheddate | html %]">
397                             [% IF ( itemdata_enumchron ) %]
398                                 [% IF item.enumchron && item.serialseq %]
399                                     <span class="enum">[% item.enumchron | html %]</span>
400                                     [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %]
401                                         <span class="sep"> -- </span>
402                                         <span class="serialseq">[% item.serialseq | html %]</span>
403                                     [% END %]
404                                 [% ELSIF item.enumchron %]
405                                     <span class="enum">[% item.enumchron | html %]</span>
406                                 [% ELSIF item.serialseq %]
407                                     <span class="serialseq">[% item.serialseq | html %]</span>
408                                 [% END %]
409                                 [% IF ( item.publisheddate ) %]
410                                     <span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
411                                 [% END %]
412                             [% END %]
413                             </span>
414                         </td>
415                     [% END %]
416                     <td class="status">
417
418                         [% IF item.CheckedOutFor %]
419                           [% IF item.onsite_checkout %]
420                             <span>Currently in local use
421                           [% ELSE %]
422                             <span class="datedue">Checked out
423                           [% END %]
424                                 [% UNLESS ( item.NOTSAMEBRANCH ) %]
425                                   [% IF item.onsite_checkout %]
426                                     by
427                                   [% ELSE %]
428                                     to
429                                   [% END %]
430                                   [% INCLUDE 'patron-title.inc' patron=item.CheckedOutFor hide_patron_infos_if_needed=1 %]
431                                 [% END %]
432                                 : due [% item.datedue | html %]
433                             </span>
434                         [% ELSIF ( item.transfertwhen ) %]
435                             <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
436                         [% END %]
437
438                         [% IF ( item.itemlost ) %]
439                             [% IF itemlostloop %]
440                                 [% FOREACH itemlostloo IN itemlostloop %]
441                                     [% IF itemlostloo.authorised_value == item.itemlost %]
442                                         <span class="lost">[% itemlostloo.lib | html %]</span>
443                                     [% END %]
444                                 [% END %]
445                             [% ELSE %]
446                                 <span class="lost">Unavailable (lost or missing)</span>
447                             [% END %]
448                         [% END %]
449
450                         [% IF ( item.withdrawn ) %]
451                             [% IF itemwithdrawnloop %]
452                                 [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
453                                     [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
454                                         <span class="wdn">[% itemwithdrawnloo.lib | html %]</span>
455                                     [% END %]
456                                 [% END %]
457                             [% ELSE %]
458                                 <span class="wdn">Withdrawn</span>
459                             [% END %]
460                         [% END %]
461
462                         [% IF ( item.damaged ) %]
463                             [% IF itemdamagedloop %]
464                                 [% FOREACH itemdamagedloo IN itemdamagedloop %]
465                                     [% IF itemdamagedloo.authorised_value == item.damaged %]
466                                         <span class="dmg">[% itemdamagedloo.lib | html %]</span>
467                                     [% END %]
468                                 [% END %]
469                             [% ELSE %]
470                                 <span class="dmg">Damaged</span>
471                             [% END %]
472                         [% END %]
473
474                         [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
475                             <span class="notforloan">Not for loan
476                             [% IF ( item.notforloanvalue ) %]
477                                 <span class="reason">([% item.notforloanvalue | html %])</span>
478                             [% END %]
479                             </span>
480                         [% END %]
481
482                         [% SET hold = item.first_hold %]
483                         [% IF hold %]
484                             [% IF hold.waitingdate %]
485                                 <span class="waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].</span>
486                                 [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
487                                     <span class="heldfor">Hold for:</span>
488                                     [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
489                                 [% END %]
490                             [% ELSE %]
491                                 <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span>
492                             [% END %]
493                         [% END %]
494                         [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold ) %]
495                             <span class="available">Available</span>
496                         [% END %]
497
498                         [% IF ( item.restricted ) %]
499                             <span class="restricted">([% item.restrictedvalue | html %])</span>
500                         [% END %]
501
502                     </td>
503                     <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
504                     <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
505                     <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td>
506                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
507                     [% IF ( itemdata_uri ) %]
508                         [% IF item.uri.split(' \| ').size > 1 %]
509                             <td class="uri">
510                                 [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %]
511                             </td>
512                         [% ELSE %]
513                             <td class="uri">
514                                 [% IF item.uri %]
515                                     <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a>
516                                 [% END %]
517                             </td>
518                         [% END %]
519                     [% END %]
520                     [% IF ( itemdata_copynumber ) %]
521                         <td class="copynumber">[% item.copynumber | html %]</td>
522                     [% END %]
523                     [% IF ( itemdata_stocknumber ) %]
524                         <td class="stocknumber">[% item.stocknumber | html %]</td>
525                     [% END %]
526                     [% IF materials %]
527                         <td class="materials"> [% item.materials | html %] </td>
528                     [% END %]
529                     [% IF ( itemdata_itemnotes ) %]
530                         <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td>
531                     [% END %]
532                     [% IF itemdata_nonpublicnotes %]
533                         <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
534                     [% END %]
535                     [% IF ( hostrecords ) %]
536                         <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
537                     [% END %]
538                     [% IF ( analyze ) %]
539                         <td>
540                             [% IF ( item.countanalytics ) %]
541                                 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
542                             [% END %]
543                         </td>
544                     [% END %]
545                     [% IF ( analyze ) %]
546                         <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&amp;hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
547                     [% END %]
548
549                 [% IF ShowCourseReserves %]
550                     <td>
551                         [% IF item.course_reserves %]
552                             [% FOREACH r IN item.course_reserves %]
553                                 [% IF r.course.enabled == 'yes' %]
554                                     <p>
555                                       <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
556                                          [% r.course.course_name | html %]
557                                          <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
558                                          [% IF r.course.section %] [% r.course.section | html %] [% END %]
559                                          [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
560                                       </a>
561                                    </p>
562                                [% END %]
563                            [% END %]
564                        [% END %]
565                     </td>
566                 [% END %]
567
568                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
569                     <td><a class="btn btn-default btn-xs print-label" href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode | uri %]"><i class="fa fa-print"></i> Print label</a></td>
570                 [% END %]
571
572                 [% IF CAN_user_editcatalogue_edit_items %]
573                     <td class="actions">
574                         [% UNLESS item.cannot_be_edited %]
575                             [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
576                                 <div class="btn-group">
577                                     <a  class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
578                                     <ul class="dropdown-menu pull-right">
579                                         <li><a href="/cgi-bin/koha/tools/upload-cover-image.pl?itemnumber=[% item.itemnumber | uri %]&amp;filetype=image"><i class="fa fa-upload"></i> Upload image</a></li>
580                                     </ul>
581                                 </div>
582                             [% ELSE %]
583                                 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a>
584                             [% END %]
585                         [% END %]
586                     </td>
587                 [% END %]
588                 </tr>
589             [% END %]
590         </tbody>
591     </table>
592
593 [% END %][%# end of block items_table %]
594
595 <div id="holdings">
596
597 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
598     <span class="results_summary NovelistSelect" style="display:none;">
599         <span class="label">Novelist Select: </span>
600         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
601     </span>
602 [% END %]
603
604 [% IF ( count ) %]
605     [% IF ( showncount ) %]
606         [% PROCESS items_table tab="holdings" items=itemloop %]
607         [% END %]
608                 [% IF ( hiddencount ) %]
609                    <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&amp;showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
610                 [% END %]               
611                 [% IF ( debug_display ) %]
612                 <br /><br />
613                 <table>
614                         <tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron | html %]</td></tr>
615                         <tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber | html %]</td></tr>
616                         <tr><td>serial</td><td>[% serial | html %]</td></tr>
617                 </table>
618                 [% END %]
619 [% ELSE %]
620     [% IF ( ALTERNATEHOLDINGS ) %]
621     [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
622         <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
623     [% END %]
624     [% ELSE %]
625     <div id="noitems">No physical items for this record</div>
626     [% END %]
627 [% END %]
628
629 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
630     <span class="results_summary NovelistSelect" style="display:none;">
631         <span class="label">Novelist Select: </span>
632         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
633     </span>
634 [% END %]
635     </div>
636
637 [% IF (SeparateHoldings) %]
638     <div id="otherholdings">
639         [% IF (otheritemloop.size) %]
640             [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
641         [% ELSE %]
642             <span class="nootheritems">No other items.</span>
643         [% END %]
644     </div>
645 [% END %]
646
647 [% IF ( MARCNOTES || notes ) %]
648
649 <div id="description">
650 <div class="content_set">
651
652 [% IF ( MARCNOTES ) %]
653     [% FOREACH MARCNOTE IN MARCNOTES %]
654         <p>
655         [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
656             <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
657         [% ELSE %]
658             [% MARCNOTE.marcnote | html | html_line_break %]
659         [% END %]
660         </p>
661     [% END %]
662 [% ELSE %]
663     [% IF ( notes ) %]
664         <p>[% notes | html %]</p>
665     [% END %]
666 [% END %]
667 </div>
668 </div>
669
670 [% END %]
671
672 [% IF ( subscriptionsnumber ) %]
673 <div id="subscriptions">
674 <div id="catalogue_detail_subscriptions">
675     <h2>This is a serial subscription</h2>
676     <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p> 
677     [% FOREACH subscription IN subscriptions %]
678             [% IF subscription.branchcode %]
679                 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
680             [% END %]
681             [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
682             [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]</p>[% END %]
683             [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
684             [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
685             [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
686             [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
687             [% IF ( subscription.latestserials ) %]
688             <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
689             <table>
690                 <tr>
691                     <th>Issue #</th>
692                     <th>Date arrived</th>
693                     <th>Date published</th>
694                     <th>Status</th>
695                     <th>Note</th>
696                 </tr>
697             [% FOREACH latestserial IN subscription.latestserials %]
698                 <tr>
699                     <td>[% latestserial.serialseq | html %]</td>
700                     <td data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
701                     <td data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
702                     <td>
703                       [% IF ( latestserial.status1 ) %]Expected[% END %]
704                       [% IF ( latestserial.status2 ) %]Arrived[% END %]
705                       [% IF ( latestserial.status3 ) %]Late[% END %]
706                       [% IF ( latestserial.status4 ) %]Missing[% END %]
707                       [% IF ( latestserial.status41 ) %]Missing (never received)[% END %]
708                       [% IF ( latestserial.status42 ) %]Missing (sold out)[% END %]
709                       [% IF ( latestserial.status43 ) %]Missing (damaged)[% END %]
710                       [% IF ( latestserial.status44 ) %]Missing (lost)[% END %]
711                       [% IF ( latestserial.status5 ) %]Not issued[% END %]
712                       [% IF ( latestserial.status6 ) %]Delete[% END %]
713                       [% IF ( latestserial.status7 ) %]Claimed[% END %]
714                       [% IF ( latestserial.status8 ) %]Stopped[% END %]
715                     </td>
716                     <td>[% latestserial.notes | html %]</td>
717                 </tr>
718             [% END %]
719             </table>
720             [% END %]
721             <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]">Subscription details</a>
722     [% END %]
723 </div>
724 </div>
725 [% END %]
726
727 [% IF Koha.Preference('AcquisitionDetails') %]
728 <div id="acq_details">
729   [% IF orders.count %]
730     <table id="orders">
731       <thead>
732         <tr>
733           <th>Vendor</th>
734           <th>Invoice</th>
735           <th>Basket group</th>
736           <th>Basket</th>
737           <th>Order number</th>
738           <th>Creation date</th>
739           <th>Receive date</th>
740           <th>Status</th>
741           <th>Quantity</th>
742           <th title="Estimated cost tax incl. while pending, actual cost tax incl. once received">Price</th>
743           <th>Internal note</th>
744           <th>Subscription</th>
745           <th>Subscription call number</th>
746         </tr>
747       </thead>
748       <tbody>
749       [% FOR order IN orders %]
750         [% SET basket = order.basket %]
751         [% SET vendor = basket.bookseller %]
752           <tr>
753             <td>
754                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
755             </td>
756             <td>
757             [% IF order.invoiceid %]
758                 [% IF CAN_user_acquisition %]
759                     <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
760                        title="Invoice detail page">
761                        [% order.invoice.invoicenumber | html %]</a>
762                 [% ELSE %]
763                     [% order.invoice.invoicenumber | html %]
764                 [% END %]
765             [% END %]
766             </td>
767             <td>
768             [% IF basket.basketgroupid %]
769                 [% SET basket_group = basket.basket_group %]
770                 [% IF CAN_user_acquisition_group_manage %]
771                     <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% vendor.id | uri %]&basketgroupid=[% basket_group.id | uri %]">[% basket_group.name | html%] ([% basket_group.id | html %])</a>
772                 [% ELSE %]
773                     [% basket_group.name | html %] ([% basket_group.id | html %])
774                 [% END %]
775             [% END %]
776             </td>
777             <td>[% IF CAN_user_acquisition_order_manage %]
778                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
779             [% ELSE %]
780                 [% basket.basketname | html %] ([% basket.basketno | html %])
781             [% END %]</td>
782             <td>[% order.ordernumber | html %]</td>
783             <td data-order="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</td>
784             <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</td>
785             <td>
786               [% SWITCH order.orderstatus %]
787                 [% CASE 'new' %]New
788                 [% CASE 'ordered' %]Ordered
789                 [% CASE 'partial' %]Partial
790                 [% CASE 'complete' %]Complete
791                 [% CASE 'cancelled' %]Cancelled
792               [% END %]
793             </td>
794             <td>[% order.quantity | html %]</td>
795             <td>[% IF ( order.unitprice_tax_included > 0 ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %]
796             <td>[% order.order_internalnote | html %]</td>
797             <td>
798                 [% IF order.subscriptionid %]
799                     <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
800                 [% END %]
801             </td>
802             <td>
803                 [% IF order.subscriptionid %]
804                     [% order.subscription.callnumber | html %]
805                 [% END %]
806             </td>
807           </tr>
808       [% END %]
809       </tbody>
810     </table>
811   [% ELSE %]
812     <span class="noorder">There is no order for this bibliographic record.</span>
813   [% END %]
814 </div>
815 [% END %]
816
817 [% IF suggestions.count %]
818     <div id="suggestion_details">
819         [% IF nb_archived_suggestions > 0 %]
820             <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw  %]
821         [% END %]
822         <table id="suggestions" class="sorted">
823             <thead>
824                 <tr>
825                     <th class="NoSort">&nbsp;</th>
826                     <th class="anti-the">Suggestion</th>
827                     <th>Suggested by - on</th>
828                     <th>Managed by - on</th>
829                     <th>Last modification by - on</th>
830                     <th>Library</th>
831                     <th>Fund</th>
832                     <th>Status</th>
833                 </tr>
834             </thead>
835             <tbody>
836             [% FOREACH suggestion IN suggestions %]
837                 <tr>
838                     <td>[% suggestion.suggestionid | html %]</td>
839                     <td>
840                         <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&amp;op=show" title="suggestion" >
841                             [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
842                         <br />
843                         [% IF ( suggestion.copyrightdate ) %]&copy; [% suggestion.copyrightdate | html %] [% END %]
844                         [% IF ( suggestion.volumedesc ) %]; Volume:<em>[% suggestion.volumedesc | html %]</em> [% END %]
845                         [% IF ( suggestion.isbn ) %]; ISBN:<em>[% suggestion.isbn | html %]</em> [% END %][% IF ( suggestion.publishercode ) %]; Published by [% suggestion.publishercode | html %] [% END %][% IF ( suggestion.publicationyear ) %] in <em>[% suggestion.publicationyear | html %]</em> [% END %][% IF ( suggestion.place ) %] in <em>[% suggestion.place | html %]</em> [% END %][% IF ( suggestion.collectiontitle ) %]; [% suggestion.collectiontitle | html %] [% END %][% IF ( suggestion.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype, 0 ) | html %] [% END %]<br />[% IF ( suggestion.note ) %]<div class="suggestion_note"><i class="fa fa-comment"></i> [% suggestion.note | html %]</div>[% END %]
846                     </td>
847                     <td>
848                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
849                         [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
850                     </td>
851                     <td>
852                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
853                         [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
854                     </td>
855                     <td>
856                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
857                         [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
858                     </td>
859                     <td>
860                         [% Branches.GetName( suggestion.branchcode ) | html %]
861                     </td>
862                     <td>
863                         [% suggestion.fund.budget_name | html %]
864                     </td>
865                     <td>
866                         [% IF    suggestion.STATUS == 'ASKED'     %]Pending
867                         [% ELSIF suggestion.STATUS == 'ACCEPTED'  %]Accepted
868                         [% ELSIF suggestion.STATUS == 'ORDERED'   %]Ordered
869                         [% ELSIF suggestion.STATUS == 'REJECTED'  %]Rejected
870                         [% ELSIF suggestion.STATUS == 'CHECKED'   %]Checked
871                         [% ELSIF suggestion.STATUS == 'AVAILABLE' %]Available
872                         [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
873                             [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
874                         [% ELSE %]Status unknown
875                         [% END %]
876                         [% IF suggestion.reason %]
877                             <br />([% suggestion.reason | html %])
878                         [% END %]
879                     </td>
880                 </tr>
881                 [% END %]
882             </tbody>
883         </table>
884     </div>
885 [% END %]
886
887 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
888 <div id="editions"><h4>Editions</h4>
889 <table>
890 [% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% XISBN.normalized_isbn | html %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %]
891 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %]<td>[% IF ( noItemTypeImages ) %][% XISBN.description | html %][% ELSE %]<img src="[% XISBN.imageurl | html %]" alt="[% XISBN.description | html %]" title="[% XISBN.description | html %]">[% END %]</td>[% END %]
892 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber | uri %]">[% XISBN.title | html %]</a> by [% XISBN.author | html %] &copy;[% XISBN.copyrightdate | html %]
893   [% IF ( XISBN.publishercode ) %]
894 [% XISBN.publishercode | html %] [% IF ( XISBN.place ) %]([% XISBN.place | html %])[% END %] [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear | html %][% END %] [% IF ( XISBN.editionstatement ) %][% XISBN.editionstatement | html %][% END %] [% IF ( XISBN.editionresponsibility ) %][% XISBN.editionresponsibility | html %][% END %]
895     [% END %]
896                 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
897                 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
898 </td>
899
900 [% END %]
901 </table></div>[% END %]
902 [% END %]
903
904 [% IF ( LocalCoverImages ) %]
905     <div id="images">
906         [% IF localimages.count %]
907             <p>Click on an image to view it in the image viewer</p>
908             <ul class="thumbnails">
909                 [% FOREACH image IN localimages %]
910                     [% IF image %]
911                         <li id="imagenumber-[% image.imagenumber | html %]" class="thumbnail">
912                             <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]">
913                                 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image.imagenumber | uri %]" />
914                             </a>
915                             [% IF CAN_user_tools_upload_local_cover_images %]
916                                 <a href="#" class="remove"><i class="fa fa-trash"></i> Delete image</a>
917                             [% END %]
918                         </li>
919                     [% END %]
920                 [% END %]
921             </ul>
922         [% ELSE # - No image passed JavaScript takes care %]
923             <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span>
924         [% END %]
925         [% IF ( CAN_user_tools_upload_local_cover_images ) %]
926             <p>Upload an image file: <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber | uri %]&amp;filetype=image"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a>
927             </p>
928         [% END %]
929     </div>
930 [% END %]
931
932 [% IF ( HTML5MediaEnabled ) %]
933 <div id="html5media">
934           [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
935             <p>
936                 [% IF HTML5MediaSet.is_youtube %]
937                     <iframe id="player" type="text/html" width="640" height="360"
938                         src="[% HTML5MediaSet.srcblock | url %]" frameborder="0"></iframe>
939                 [% ELSE %]
940                   <[% HTML5MediaParent | html %] controls preload=none>
941                     <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
942                     [[% HTML5MediaParent | html %] tag not supported by your browser.]
943                   </[% HTML5MediaParent | html %]>
944                 [% END %]
945             </p>
946           [% END %]
947 </div>
948 [% END %]
949
950
951 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
952     <div id="NovelistSelect" class="novelistSelect">
953         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
954     </div>
955 [% END %]
956
957 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
958     <div id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
959         [% plugins_intranet_catalog_biblio_tab.content | $raw %]
960     </div>
961 [% END %]
962
963 </div><!-- /bibliodetails -->
964
965 <div id="export" style="margin-top: 1em;">
966 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
967 <table>  <tr>
968       <th>Save record</th>   </tr>
969     <tr><td> Select download format:    <select name="format">
970         <option value="mods">MODS (XML)</option>
971         <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
972         <option value="marcxml">MARCXML</option>
973         <option value="marc8">MARC (non-Unicode/MARC-8)</option>
974         <option value="utf8">MARC (Unicode/UTF-8)</option>    </select>
975         <input type="submit" name="save" value="Download record" /></td>
976   </tr>
977   <tr><td>
978     <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
979   </td></tr>
980 </table>
981 </form>
982 </div>
983
984 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
985     <div class="modal-dialog modal-lg">
986     <div class="modal-content">
987     <div class="modal-header">
988         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
989         <h3 id="marcPreviewLabel">MARC preview</h3>
990     </div>
991     <div class="modal-body">
992         <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
993     </div>
994     <div class="modal-footer">
995         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
996     </div>
997     </div>
998     </div>
999 </div>
1000
1001             </main>
1002         </div> <!-- /.col-sm-10.col-sm-push-2 -->
1003
1004         <div class="col-sm-2 col-sm-pull-10">
1005             <aside>
1006                 [% INCLUDE 'biblio-view-menu.inc' %]
1007             </aside>
1008         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1009      </div> <!-- /.row -->
1010
1011 [% END %]
1012
1013 [% MACRO jsinclude BLOCK %]
1014     [% INCLUDE 'catalog-strings.inc' %]
1015     [% Asset.js("js/catalog.js") | $raw %]
1016     [% Asset.js("js/coce.js") | $raw %]
1017     <script>
1018         var interface = "[% interface | html %]";
1019         var theme = "[% theme | html %]";
1020         // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
1021         function verify_images() {
1022             // Loop over each container in the template which contains covers
1023             $(".cover-slider").each(function(){
1024                 $(this).find(".cover-image").each( function( index ){
1025                     var div = $(this);
1026                     // Find the image in the container
1027                     var img = div.find("img")[0];
1028                     if( $(img).length > 0 ){
1029                         if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){
1030                             // No image loaded in the container. Remove the slide
1031                             div.remove();
1032                         } else {
1033                             // All slides start hidden. If this is the first one, show it.
1034                             if( index == 0 ){
1035                                 div.show();
1036                             }
1037                             // Check if Amazon image is present
1038                             if ( div.attr("id") == "amazon-bookcoverimg"  ) {
1039                                 w = img.width;
1040                                 h = img.height;
1041                                 if ((w == 1) || (h == 1)) {
1042                                     // Amazon returned single-pixel placeholder
1043                                     // Remove the container
1044                                     div.remove();
1045                                 }
1046                             }
1047                             if( div.attr("id") == "custom-img" ){
1048                                 if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1049                                     // No image was loaded via the CustomCoverImages system preference
1050                                     // Remove the container
1051                                     div.remove();
1052                                 }
1053                             }
1054                             if( div.attr("id") == "coce-coverimg" ){
1055                                 // Identify which service's image is being loaded by Coce
1056                                 if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1057                                     div.find(".hint").html(_("Coce image from Amazon.com"));
1058                                 } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1059                                     div.find(".hint").html(_("Coce image from Google Books"));
1060                                 } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1061                                     div.find(".hint").html(_("Coce image from Open Library"));
1062                                 }
1063                             }
1064                         }
1065                     }
1066                 });
1067             });
1068
1069             $(".cover-slider").each(function(){
1070                 var coverSlide = this;
1071                 var coverImages = $(this).find(".cover-image");
1072                 if( coverImages.length > 1 ){
1073                     coverImages.each(function( index ){
1074                         // If more that one image is present, add a navigation link
1075                         // for activating the slide
1076                         var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1077                         if( index == 0 ){
1078                             // Set the first navigation link as active
1079                             $(covernav).addClass("nav-active");
1080                         }
1081                         $(covernav).html("<i class=\"fa fa-circle\"></i>");
1082                         $(coverSlide).append( covernav );
1083                     });
1084                 }
1085
1086                 if( $(coverSlide).find(".cover-image:visible").length < 1 ){
1087                     $(coverSlide).remove();
1088                 } else {
1089                     $(coverSlide).addClass("cover-slides");
1090                 }
1091             });
1092
1093             $("#editions img").each(function(i){
1094                 if ( this.src.indexOf('amazon.com') >= 0 ) {
1095                     w = this.width;
1096                     h = this.height;
1097                     if ((w == 1) || (h == 1)) {
1098                         this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1099                     } else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) {
1100                         this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1101                     }
1102                 }
1103             });
1104         }
1105
1106         function removeLocalImage(imagenumber) {
1107             var thumbnail = $("#imagenumber-" + imagenumber );
1108             var copy = thumbnail.html();
1109             thumbnail.find("img").css("opacity", ".2");
1110             thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
1111             $.ajax({
1112                 url: "/cgi-bin/koha/svc/cover_images?action=delete&imagenumber=" + imagenumber,
1113                 success: function(data) {
1114                     $(data).each( function(i) {
1115                         if ( this.deleted == 1 ) {
1116                             thumbnail.remove();
1117                         } else {
1118                             thumbnail.html( copy );
1119                             alert(_("An error occurred on deleting this image"));
1120                         }
1121                         if ( $('ul.thumbnails > li').length == 0 ) {
1122                             showNoImageMessage();
1123                         }
1124                     });
1125                 },
1126                 error: function(data) {
1127                     thumbnail.html( copy );
1128                     alert(_("An error occurred on deleting this image"));
1129                 }
1130             });
1131         }
1132
1133         function showNoImageMessage() {
1134             var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
1135             no_images_msg = '<p>' + no_images_msg + '</p>';
1136             [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1137                 var please_upload = _("Upload an image file: %sUpload%s").format("<a class='btn btn-default btn-xs' href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=" + biblionumber + "&amp;filetype=image'><i class='fa fa-upload' aria-hidden='true'></i> ","</a>");
1138                 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
1139             [% END %]
1140             $('#images').html(no_images_msg);
1141         }
1142
1143         [% IF StaffDetailItemSelection %]
1144             function itemSelectionBuildDeleteLink(div) {
1145                 var itemnumbers = new Array();
1146                 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1147                     itemnumbers.push($(this).val());
1148                 });
1149                 if (itemnumbers.length > 0) {
1150                     var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
1151                     url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1152                     url += '&biblionumber=[% biblionumber | uri %]';
1153                     url += '&src=CATALOGUING';
1154                     $('a.itemselection_action_delete').attr('href', url);
1155                 } else {
1156                     return false;
1157                 }
1158                 return true
1159             }
1160
1161             function itemSelectionBuildModifyLink(div) {
1162                 var itemnumbers = new Array();
1163                 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1164                     itemnumbers.push($(this).val());
1165                 });
1166                 if (itemnumbers.length > 0) {
1167                     var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
1168                     url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1169                     url += '&biblionumber=[% biblionumber | uri %]';
1170                     url += '&src=CATALOGUING';
1171                     $('a.itemselection_action_modify').attr('href', url);
1172                 } else {
1173                     return false;
1174                 }
1175                 return true;
1176             }
1177
1178             function itemSelectionBuildActionLinks(tab) {
1179                 var div = $("#" + tab);
1180                 var delete_link_ok = itemSelectionBuildDeleteLink(div);
1181                 var modify_link_ok = itemSelectionBuildModifyLink(div);
1182                 if (modify_link_ok || delete_link_ok) {
1183                     $('.itemselection_actions', div).show();
1184                 } else {
1185                     $('.itemselection_actions', div).hide();
1186                 }
1187             }
1188
1189             $(document).ready(function() {
1190                 $('table.items_table').each(function() {
1191                     var div = $(this).parent().attr("id");
1192                     itemSelectionBuildActionLinks(div);
1193                 });
1194
1195                 $("input[name='itemnumber'][type='checkbox']").change(function() {
1196                     var div = $(this).parents('table').parent().parent().attr("id");
1197                     itemSelectionBuildActionLinks(div);
1198                 });
1199
1200                 $(".SelectAll").on("click",function(e){
1201                     e.preventDefault();
1202                     var tab = $(this).data("tab");
1203                     $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
1204                     itemSelectionBuildActionLinks(tab);
1205                 });
1206
1207                 $(".ClearAll").on("click",function(e){
1208                     e.preventDefault();
1209                     var tab = $(this).data("tab");
1210                     $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1211                     itemSelectionBuildActionLinks(tab);
1212                 });
1213             });
1214         [% END %]
1215
1216         $(document).ready(function() {
1217             $('#bibliodetails').tabs();
1218         [% IF count == 0 and ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) %]
1219             $('#bibliodetails').tabs("option", "active", $('#media_tab').index() );
1220         [% END %]
1221             $('#search-form').focus();
1222             $('.thumbnails > li > .remove').click(function() {
1223                 var result = confirm(_("Are you sure you want to delete this cover image?"));
1224
1225                 if ( result == true ) {
1226                     var imagenumber = $(this).parent().attr('id').split('-')[1];
1227                     removeLocalImage(imagenumber);
1228                 }
1229
1230                 return false;
1231             });
1232             [% IF ( IntranetCoce && CoceProviders ) %]
1233                 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
1234             [% END %]
1235
1236             $("body").on("click",".previewMARC", function(e){
1237                 e.preventDefault();
1238                 var page = $(this).attr("href");
1239                 $("#marcPreview .modal-body").load(page + " table");
1240                 $('#marcPreview').modal({show:true});
1241             });
1242             $("#marcPreview").on("hidden.bs.modal", function(){
1243                 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
1244             });
1245             [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1246                 novSelect.loadContentForQuery({
1247                     ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1248                     ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1249                     version : '2.1'
1250                 },
1251                 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
1252                 '[% Koha.Preference('NovelistSelectPassword') | html %]',
1253                 function(d){
1254                     if ( d.length > 0 ){ //If no content
1255                         $(".NovelistSelect").show();
1256                     }
1257                  });
1258              [% END %]
1259              $(".print-label").on("click", function(e){
1260                 e.preventDefault();
1261                 link = $(this).attr("href");
1262                 openWindow(link,"Print spine label",400,400);
1263              });
1264              $(".cover-slider").on("click",".cover-nav", function(e){
1265                  e.preventDefault();
1266                 var cover_slider = $(this).parent();
1267                 // Adding click handler for cover image navigation links
1268                 var num = $(this).data("num");
1269                 $(cover_slider).find(".cover-nav").removeClass("nav-active");
1270                 $(this).addClass("nav-active");
1271                 $(cover_slider).find(".cover-image").hide();
1272                 $(cover_slider).find(".cover-image").eq( num ).show();
1273              });
1274         });
1275
1276         $(window).load(function() {
1277             verify_images();
1278         });
1279     </script>
1280     [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1281         <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1282     [% END %]
1283     [% INCLUDE 'datatables.inc' %]
1284     [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1285     [% INCLUDE 'columns_settings.inc' %]
1286     [% Asset.js("js/browser.js") | $raw %]
1287     [% Asset.js("js/table_filters.js") | $raw %]
1288     <script>
1289         var browser;
1290         browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1291         browser.show();
1292
1293         $(document).ready(function() {
1294             var ids = ['holdings_table', 'otherholdings_table'];
1295             var columns_settings = [ [% TablesSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetColumns('catalogue', 'detail','otherholdings_table','json')  | $raw %] ];
1296             var has_images = ["[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]"];
1297             for (var i in ids) {
1298                 var id = ids[i];
1299                 if ( !has_images[i] ) { // remove the cover_image column
1300                     columns_settings.splice(1,1);
1301                 }
1302                 var dt_parameters = {
1303                     'sDom': 't',
1304                     'bPaginate': false,
1305                     'bAutoWidth': false,
1306                     "bKohaColumnsUseNames": true,
1307                     "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1308                 };
1309                 var table = KohaTable(id, dt_parameters, columns_settings[i], 'with_filters');
1310             }
1311
1312             [% IF Koha.Preference('AcquisitionDetails') %]
1313                 var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %];
1314                 var acquisitiondetails_table = KohaTable("orders", {
1315                     "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1316                     'bPaginate': false,
1317                     'bAutoWidth': false,
1318                     "aaSorting": [[ 4, "desc" ]],
1319                 }, columns_settings);
1320             [% END %]
1321
1322             [% IF suggestions.count %]
1323                 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
1324                     "aoColumnDefs": [
1325                         { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
1326                         { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
1327                     ],
1328                     "sPaginationType": "full"
1329                 }));
1330             [% END %]
1331         });
1332
1333         $(document).ready(function() {
1334             var search_index = localStorage.getItem("cat_search_pulldown_selection");
1335             var search_value = localStorage.getItem("searchbox_value");
1336             if ( search_index ){ $('#cat-search-block select.advsearch').val(search_index)};
1337             if ( search_value ){ $('#cat-search-block #search-form').val(search_value)};
1338         });
1339     </script>
1340 [% END %]
1341 [% INCLUDE 'intranet-bottom.inc' %]