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