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