6 [% USE AuthorisedValues %]
10 [% USE TablesSettings %]
11 [% PROCESS 'i18n.inc' %]
13 [% IF Koha.Preference('AmazonAssocTag') %]
14 [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
16 [% AmazonAssocTag = '' %]
19 [% ShowCourseReserves = 0 | html %]
20 [% IF UseCourseReserves %]
21 [% FOREACH item IN itemloop %]
22 [% IF item.course_reserves %]
23 [% FOREACH r IN item.course_reserves %]
24 [% IF r.course.enabled == 'yes' %]
25 [% ShowCourseReserves = 1 | html %]
32 [% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %]
34 [% SET footerjs = 1 %]
35 [% INCLUDE 'doc-head-open.inc' %]
37 [% IF ( unknownbiblionumber ) %]
40 Details for [% INCLUDE 'biblio-title-head.inc' %]
41 [% END %] › Catalog › Koha
43 [% INCLUDE 'doc-head-close.inc' %]
44 [% Asset.css("lib/Chocolat/css/chocolat.css") | $raw %]
47 <body id="catalog_detail" class="catalog">
49 [% INCLUDE 'header.inc' %]
50 [% INCLUDE 'cat-search.inc' %]
52 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
55 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
58 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
61 [% IF ( unknownbiblionumber ) %]
63 <a href="#" aria-current="page">
69 [% INCLUDE 'biblio-title.inc' link = 1 %]
72 <a href="#" aria-current="page">
80 <div class="main container-fluid">
82 <div class="col-sm-10 col-sm-push-2">
86 [% IF ( unknownbiblionumber ) %]
87 <div class="dialog message">The record you requested does not exist ([% biblionumber | html %]).</div>
90 [% IntranetCoce = Koha.Preference('IntranetCoce') %]
91 [% CoceProviders = Koha.Preference('CoceProviders') %]
92 [% CoceHost = Koha.Preference('CoceHost') %]
93 [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
95 [% INCLUDE 'cat-toolbar.inc' %]
96 [% IF decoding_error %]
98 <span class="biberror">
99 There is an error with this bibliographic record, the view may be degraded.</span>
100 <span class="error"><br/> Error: [% decoding_error | html %]</span>
103 [% IF analytics_error %]
105 <span class="analytics_error">
106 There was an error searching for analytic records, please see the logs for details.</span>
110 <!-- COinS / OpenURL -->
111 <span class="Z3988" title="[% ocoins | html %]"></span>
114 [% IF ( AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
115 <div id="catalogue_detail_biblio" class="col-xs-9">
117 <div id="catalogue_detail_biblio" class="col-xs-12">
120 [% XSLTBloc | $raw %]
122 [% IF shelves.count %]
123 <span class="results_summary"><span class="label">Lists that include this title: </span>
124 [% FOREACH s IN shelves %]
125 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a>
126 [% IF ( loop.last ) %][% ELSE %]|[% END %]
130 [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %]
131 <span class="results_summary"><span class="label">Tags:</span>
132 [% FOREACH TagLoo IN TagLoop %]
133 [% IF ( CAN_user_tools_moderate_tags ) %]
134 <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |uri %]">[% TagLoo.term | html %]</a>
136 [% TagLoo.term | html %]
138 <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
142 <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 %]&viewas=html" title="MARC" class="previewMARC">Show</a></span>
143 [% IF !item_level_itypes || Koha.Preference("BiblioItemtypeInfo") %]
144 <span class="results_summary itemtype"><span class="label">Itemtype:</span>
145 [% IF ( !noItemTypeImages && imageurl ) %]
146 <img src="[% imageurl | html %]" alt="" />
148 [% IF ( description ) %]
149 [% description | html %]
151 [% itemtype | html %]
156 [% IF ( holdcount ) %]
157 <span class="results_summary">
158 <span class="label">Holds:</span>
159 <span class="number_box">
160 [% IF CAN_user_reserveforothers_place_holds %]
161 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber | uri %]">[% holdcount | html %]</a>
163 <span>[% holdcount | html %]</span>
169 [% IF illrequests.count %]
170 <span class="results_summary">
171 <span class="label">ILL requests:</span>
172 [% IF CAN_user_ill %]
173 [% FOREACH ill IN illrequests %]
174 <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 %]
177 [% FOREACH ill IN illrequests %]
178 <span>Request [% ill.illrequest_id | html %]</span>[% IF ! loop.last %], [% END %]
184 [% IF ( article_requests_count = Biblio.ArticleRequestsActiveCount( biblionumber ) ) %]
185 <span class="results_summary">
186 <span class="label">Article requests:</span>
187 <span class="number_box">
188 <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | uri %]">[% article_requests_count | html %]</a>
193 [% IF course_reserves %]
194 <span class="results_summary"><span class="label">Courses that have reserved this title: </span>
195 [% FOREACH c IN course_reserves %]
196 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% c.course_id | uri %]">[% c.course.course_name | html %]</a>
197 [% IF ( loop.last ) %][% ELSE %]|[% END %]
202 [% IF ( AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
204 <div class="col-xs-3 bookcoverimg">
205 <div id="biblio-cover-slider" class="cover-slider">
206 [% IF ( LocalCoverImages ) %]
207 [% IF localimages.count %]
208 [% FOREACH image IN localimages %]
209 <div class="cover-image local-coverimg">
210 <a href="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
211 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]" />
213 <div class="hint">Local cover image</div>
219 [% IF ( AmazonCoverImages && normalized_isbn) %]
220 <div class="cover-image" id="amazon-bookcoverimg">
221 <a href="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.LZZZZZZZ.jpg" title="Amazon cover image">
222 <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.MZZZZZZZ.jpg" alt="Amazon cover image" data-link="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"/>
224 <div class="hint">Image from Amazon.com</div>
228 [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
229 [% coce_id = normalized_ean || normalized_isbn %]
230 <div class="cover-image" id="coce-coverimg">
232 <a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a>
234 <span class="no-image">No cover image available</span>
236 <div class="hint">Image from Coce</div>
240 [% IF ( SyndeticsCovers ) %]
241 [% IF ( content_identifier_exists ) %]
242 <div class="cover-image" id="syndetics-bookcoverimg">
243 <a href="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | url %]/LC.GIF&client=[% Koha.Preference('SyndeticsClientCode') | url %]&type=xw10&upc=[% normalized_upc | url %]&oclc=[% normalized_oclc | url %]" title="Syndetics cover image">
244 <img src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | url %]/[% Koha.Preference('SyndeticsCoverImageSize') | url %].GIF&client=[% Koha.Preference('SyndeticsClientCode') | url %]&type=xw10&upc=[% normalized_upc | url %]&oclc=[% normalized_oclc | url %]" alt="" class="thumbnail" />
246 <div class="hint">Image from Syndetics</div>
249 <span class="no-image">No cover image available</span>
253 [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
254 [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
255 [% IF custom_cover_image_url %]
256 <div class="cover-image" id="custom-coverimg">
257 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]" title="Custom cover image">
258 <img id="custom-img" alt="Custom cover image" src="[% custom_cover_image_url | url %]" />
260 <div class="hint">Custom cover image</div>
264 </div> <!-- /.cover-slider -->
265 </div> <!-- /.bookcoverimg.col-xs-3 -->
267 </div> <!-- /.col-xs-* -->
268 [% END # /IF ( AmazonCoverImages, etc ) %]
271 <div id="bibliodetails" class="toptabs">
273 <ul class="nav nav-tabs" role="tablist">
274 [% IF (SeparateHoldings) %]
275 <li role="presentation">
276 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">[% Branches.GetLoggedInBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
278 <li role="presentation">
279 <a href="#otherholdings" aria-controls="otherholdings" role="tab" data-toggle="tab">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
282 <li role="presentation">
283 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">Holdings ([% itemloop.size() || 0 | html %])</a>
286 [% IF Koha.Preference('EnableItemGroups') %]
287 <li role="presentation">
288 <a href="#item_groups" aria-controls="item_groups" role="tab" data-toggle="tab">Item groups</a>
291 [% IF ( MARCNOTES || notes ) %]<li role="presentation"><a href="#description" aria-controls="description" role="tab" data-toggle="tab">Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</a></li>[% END %]
292 [% IF ComponentParts && ComponentParts.size %]<li id="components_tab" role="presentation"><a href="#components" aria-controls="components" role="tab" data-toggle="tab">Components ([% ComponentParts.size | html %])</a></li>[% END %]
293 [% IF ( subscriptionsnumber ) %]<li role="presentation"><a href="#subscriptions" aria-controls="subscriptions" role="tab" data-toggle="tab">Subscriptions</a></li>[% END %]
294 [% IF Koha.Preference('AcquisitionDetails') %]<li role="presentation"><a href="#acq_details" aria-controls="acq_details" role="tab" data-toggle="tab">Acquisition details</a></li>[% END %]
295 [% IF suggestions.count %]<li role="presentation"><a href="#suggestion_details" aria-controls="suggestion_details" role="tab" data-toggle="tab">Suggestion details</a></li>[% END %]
296 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li role="presentation"><a href="#editions" aria-controls="editions" role="tab" data-toggle="tab">Editions</a></li>[% END %][% END %]
297 [% IF ( LocalCoverImages ) %]
298 <li role="presentation">
299 <a href="#images" aria-controls="images" role="tab" data-toggle="tab">Images ([% localimages.count || 0 | html %])</a>
302 [% IF HTML5MediaEnabled && HTML5MediaSets.size %]
303 <li id="media_tab" role="presentation"><a href="#html5media" aria-controls="html5media" role="tab" data-toggle="tab">Play media</a></li>
305 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
306 <li class="NovelistSelect" style="display:none;" role="presentation"><a href="#NovelistSelect" aria-controls="NovelistSelect" role="tab" data-toggle="tab">NoveList Select</a></li>
308 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
309 <li role="presentation"><a href="#[% plugins_intranet_catalog_biblio_tab.id | uri %]" aria-controls="[% plugins_intranet_catalog_biblio_tab.id | uri %]" role="tab" data-toggle="tab">[% plugins_intranet_catalog_biblio_tab.title | html %]</a></li>
313 <div class="tab-content">
314 [% items_table_block_iter = 0 %]
315 [% BLOCK items_table %]
316 [% items_table_block_iter = items_table_block_iter + 1 %]
317 <div class="[% tab | html %]_table_table_controls">
318 [% IF (StaffDetailItemSelection) %]
319 | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a> |
320 <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
321 <span class="itemselection_actions">
323 [% IF CAN_user_tools_items_batchdel %]
324 <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
326 [% IF CAN_user_tools_items_batchmod %]
327 <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
329 [% IF CAN_user_editcatalogue_manage_item_groups && biblio.item_groups.count %]
330 <a class="itemselection_action_item_group_set" href="#"><i class="fa fa-book"></i> Add/move to item group</a>
331 <a class="itemselection_action_item_group_unset" href="#"><i class="fa fa-unlink"></i> Remove from item group</a>
336 <table class="items_table" id="[% tab | html %]_table">
339 [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
340 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
341 <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th>
343 [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
344 <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
345 <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
346 [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
347 [% IF Koha.Preference('EnableItemGroups') %]
348 <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
350 <th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th>
352 <th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th>
354 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
355 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen">Last seen</th>
356 <th id="[% tab | html %]_issues" data-colname="[% tab | html %]_issues">Checkouts</th>
357 <th id="[% tab | html %]_renewals" data-colname="[% tab | html %]_renewals">Renewals</th>
358 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned">Date accessioned</th>
359 <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed">Date last borrowed</th>
360 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
361 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
362 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
363 [% IF ( itemdata_stocknumber ) %]<th id="[% tab | html %]_stocknumber" data-colname="[% tab | html %]_stocknumber">Inventory number</th>[% END %]
364 [% IF materials %]<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>[% END %]
365 [% IF ( itemdata_itemnotes ) %]<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>[% END %]
366 [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>[% END %]
367 [% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
368 [% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
369 [% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
370 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
371 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport"> </th>[% END %]
375 [% FOREACH item IN items %]
376 <tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% item.datedue | html %]">
377 [% IF (StaffDetailItemSelection) %]
378 <td style="text-align:center;vertical-align:middle">
379 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
382 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
384 <div class="bookcoverimg">
385 <div class="cover-slider">
386 [% FOREACH image IN item.cover_images %]
387 <div class="cover-image local-coverimg">
388 <a href="/cgi-bin/koha/catalogue/image.pl?itemnumber=[% image.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
389 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/catalogue/imageviewer.pl?itemnumber=[% item.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" />
398 [% IF ( item_level_itypes ) %]
400 [% IF !noItemTypeImages && item.imageurl %]
401 <img src="[% item.imageurl | html %]" alt="[% item.translated_description | html %]" title="[% item.translated_description | html %]" />
403 <span class="itypedesc">[% item.translated_description | html %]</span>
406 <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td>
407 <td class="homebranch">
408 <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
409 <span class="shelvingloc">
411 If permanent location is defined, show description or code and display current location in parentheses. If not, display current location.
412 Note that permanent location is a code, and location may be an authval.
414 [% IF item.permanent_location %]
415 [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
416 [% permloc_authval | html %]
417 [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %]
418 ([% item.location | html %])
421 [% item.location | html %]
425 [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
426 [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
427 <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
429 [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
430 <td class="enumchron" data-order="[% item.publisheddate | html %]">
432 <td class="enumchron">
434 [% IF ( itemdata_enumchron ) %]
435 [% IF item.enumchron && item.serialseq %]
436 <span class="enum">[% item.enumchron | html %]</span>
437 [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %]
438 <span class="sep"> -- </span>
439 <span class="serialseq">[% item.serialseq | html %]</span>
441 [% ELSIF item.enumchron %]
442 <span class="enum">[% item.enumchron | html %]</span>
443 [% ELSIF item.serialseq %]
444 <span class="serialseq">[% item.serialseq | html %]</span>
446 [% IF ( item.publisheddate ) %]
447 <span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
455 [% IF item.CheckedOutFor %]
456 [% IF item.onsite_checkout %]
457 <span>Currently in local use
459 <span class="datedue">Checked out
461 [% UNLESS ( item.NOTSAMEBRANCH ) %]
462 [% IF item.onsite_checkout %]
467 [% INCLUDE 'patron-title.inc' patron=item.CheckedOutFor hide_patron_infos_if_needed=1 %]
469 : due [% item.datedue | html %]
471 [% ELSIF ( item.transfertwhen ) %]
472 <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
475 [% IF ( item.itemlost ) %]
476 [% IF itemlostloop %]
477 [% FOREACH itemlostloo IN itemlostloop %]
478 [% IF itemlostloo.authorised_value == item.itemlost %]
479 <span class="lost">[% itemlostloo.lib | html %]</span>
483 <span class="lost">Unavailable (lost or missing)</span>
487 [% IF ( item.withdrawn ) %]
488 [% IF itemwithdrawnloop %]
489 [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
490 [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
491 <span class="wdn">[% itemwithdrawnloo.lib | html %]</span>
495 <span class="wdn">Withdrawn</span>
499 [% IF ( item.damaged ) %]
500 [% IF itemdamagedloop %]
501 [% FOREACH itemdamagedloo IN itemdamagedloop %]
502 [% IF itemdamagedloo.authorised_value == item.damaged %]
503 <span class="dmg">[% itemdamagedloo.lib | html %]</span>
507 <span class="dmg">Damaged</span>
511 [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
512 <span class="notforloan">Not for loan
513 [% IF ( item.notforloanvalue ) %]
514 <span class="reason">([% item.notforloanvalue | html %])</span>
519 [% SET hold = item.first_hold %]
521 [% IF hold.waitingdate %]
522 <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>
523 [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
524 <span class="heldfor">Hold for:</span>
525 [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
528 <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span>
532 [% IF item.recalled %]
533 [% IF item.recall.waiting_date %]
534 <span>Waiting at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.waiting_date | $KohaDates %]</span>
536 [% patron_link = BLOCK %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.recall.patron_id | uri %]">[% item.recall.patron.firstname | html %] [% item.recall.patron.surname | html %] ([% item.recall.patron.cardnumber | html %])</a>[% END %]
537 <span>Item recalled by [% patron_link| $raw %] on [% item.recall.created_date | $KohaDates %]</span>
541 [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || item.recalled ) %]
542 <span>Available</span>
545 [% IF ( item.restricted ) %]
546 <span class="restricted">([% item.restrictedvalue | html %])</span>
549 [% IF ( item.bundle_host ) %]
550 <span class="bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</span>
554 <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
555 <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
556 <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
557 <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
558 <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td>
559 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type | uri %]&itemnumber=[% item.itemnumber | uri %]&biblionumber=[% item.biblionumber | uri %]&bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
560 [% IF ( itemdata_uri ) %]
561 [% IF item.uri.split(' \| ').size > 1 %]
563 [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %]
568 <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a>
573 [% IF ( itemdata_copynumber ) %]
574 <td class="copynumber">[% item.copynumber | html %]</td>
576 [% IF ( itemdata_stocknumber ) %]
577 <td class="stocknumber">[% item.stocknumber | html %]</td>
580 <td class="materials"> [% item.materials | html %] </td>
582 [% IF ( itemdata_itemnotes ) %]
583 <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td>
585 [% IF itemdata_nonpublicnotes %]
586 <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
588 [% IF ( hostrecords ) %]
589 <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
593 [% IF ( item.countanalytics ) %]
594 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
599 <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
602 [% IF ShowCourseReserves %]
604 [% IF item.course_reserves %]
605 [% FOREACH r IN item.course_reserves %]
606 [% IF r.course.enabled == 'yes' %]
608 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
609 [% r.course.course_name | html %]
610 <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
611 [% IF r.course.section %] [% r.course.section | html %] [% END %]
612 [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
621 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
622 <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>
625 [% IF CAN_user_editcatalogue_edit_items %]
627 [% UNLESS item.cannot_be_edited %]
628 [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
629 <div class="btn-group">
630 <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>
631 <ul class="dropdown-menu pull-right">
632 <li><a href="/cgi-bin/koha/tools/upload-cover-image.pl?itemnumber=[% item.itemnumber | uri %]&filetype=image"><i class="fa fa-upload"></i> Upload image</a></li>
636 <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>
639 [% IF bundlesEnabled %]
640 <button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle</button>
649 [% END %][%# end of block items_table %]
651 [% IF Koha.Preference('EnableItemGroups') %]
652 <div role="tabpanel" class="tab-pane" id="item_groups">
653 [% IF CAN_user_editcatalogue_manage_item_groups %]
654 <div class="item_groups_table_table_controls">
655 <a href="#" class="item-group-create btn btn-default btn-xs"><i class="fa fa-plus"></i> New item group</a>
658 <table class="items-group-table" id="items-group-table">
661 <td>Display Order</td>
671 <div role="tabpanel" class="tab-pane" id="holdings">
673 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
674 <span class="results_summary NovelistSelect" style="display:none;">
675 <span class="label">Novelist Select: </span>
676 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
681 [% IF ( showncount ) %]
682 [% PROCESS items_table tab="holdings" items=itemloop %]
684 [% IF ( hiddencount ) %]
685 <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
687 [% IF ( debug_display ) %]
690 <tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron | html %]</td></tr>
691 <tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber | html %]</td></tr>
692 <tr><td>serial</td><td>[% serial | html %]</td></tr>
696 [% IF ( ALTERNATEHOLDINGS ) %]
697 [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
698 <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
701 <div id="noitems">No physical items for this record</div>
705 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
706 <span class="results_summary NovelistSelect" style="display:none;">
707 <span class="label">Novelist Select: </span>
708 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
713 [% IF (SeparateHoldings) %]
714 <div role="tabpanel" class="tab-pane" id="otherholdings">
715 [% IF (otheritemloop.size) %]
716 [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
718 <span class="nootheritems">No other items.</span>
723 [% IF ( MARCNOTES ) %]
725 <div role="tabpanel" class="tab-pane" id="description">
726 <div class="content_set">
728 [% FOREACH MARCNOTE IN MARCNOTES %]
730 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
731 <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
733 [% MARCNOTE.marcnote | html | html_line_break %]
742 [% IF ComponentParts && ComponentParts.size %]
743 <div role="tabpanel" class="tab-pane" id="components">
744 <div class="content_set">
746 [% FOR PART IN ComponentParts %]
754 [% IF ComponentParts.size == Koha.Preference('MaxComponentRecords')%]
755 <p>Only [% ComponentParts.size | html %] results are shown: <a href="/cgi-bin/koha/catalogue/search.pl?q=[% ComponentPartsQuery | url %]"/>show all component parts</a></p>
757 </div> <!-- /.content_set -->
758 </div> <!-- /#components -->
762 [% IF ( subscriptionsnumber ) %]
763 <div role="tabpanel" class="tab-pane" id="subscriptions">
764 <div id="catalogue_detail_subscriptions">
765 <h2>This is a serial subscription</h2>
766 <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p>
767 [% FOREACH subscription IN subscriptions %]
768 [% IF subscription.branchcode %]
769 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
771 [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
772 [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]</p>[% END %]
773 [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
774 [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
775 [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
776 [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
777 [% IF ( subscription.latestserials ) %]
778 <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
782 <th>Date arrived</th>
783 <th>Date published</th>
787 [% FOREACH latestserial IN subscription.latestserials %]
789 <td>[% latestserial.serialseq | html %]</td>
790 <td data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
791 <td data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
793 [% IF ( latestserial.status1 ) %]<span>Expected</span>[% END %]
794 [% IF ( latestserial.status2 ) %]<span>Arrived</span>[% END %]
795 [% IF ( latestserial.status3 ) %]<span>Late</span>[% END %]
796 [% IF ( latestserial.status4 ) %]<span>Missing</span>[% END %]
797 [% IF ( latestserial.status41 ) %]<span>Missing (never received)</span>[% END %]
798 [% IF ( latestserial.status42 ) %]<span>Missing (sold out)</span>[% END %]
799 [% IF ( latestserial.status43 ) %]<span>Missing (damaged)</span>[% END %]
800 [% IF ( latestserial.status44 ) %]<span>Missing (lost)</span>[% END %]
801 [% IF ( latestserial.status5 ) %]<span>Not issued</span>[% END %]
802 [% IF ( latestserial.status6 ) %]<span>Delete</span>[% END %]
803 [% IF ( latestserial.status7 ) %]<span>Claimed</span>[% END %]
804 [% IF ( latestserial.status8 ) %]<span>Stopped</span>[% END %]
806 <td>[% latestserial.notes | html %]</td>
811 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]">Subscription details</a>
817 [% IF Koha.Preference('AcquisitionDetails') %]
818 <div role="tabpanel" class="tab-pane" id="acq_details">
819 [% IF orders.count %]
825 <th>Basket group</th>
827 <th>Order number</th>
828 <th>Creation date</th>
829 <th>Receive date</th>
832 <th title="Estimated cost tax incl. while pending, actual cost tax incl. once received">Price</th>
833 <th>Internal note</th>
834 <th>Subscription</th>
835 <th>Subscription call number</th>
839 [% FOR order IN orders %]
840 [% SET basket = order.basket %]
841 [% SET vendor = basket.bookseller %]
844 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
847 [% IF order.invoiceid %]
848 [% IF CAN_user_acquisition %]
849 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
850 title="Invoice detail page">
851 [% order.invoice.invoicenumber | html %]</a>
853 [% order.invoice.invoicenumber | html %]
858 [% IF basket.basketgroupid %]
859 [% SET basket_group = basket.basket_group %]
860 [% IF CAN_user_acquisition_group_manage %]
861 <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>
863 [% basket_group.name | html %] ([% basket_group.id | html %])
867 <td>[% IF CAN_user_acquisition_order_manage %]
868 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
870 [% basket.basketname | html %] ([% basket.basketno | html %])
872 <td>[% order.ordernumber | html %]</td>
873 <td data-order="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</td>
874 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</td>
876 [% SWITCH order.orderstatus %]
877 [% CASE 'new' %]<span>New</span>
878 [% CASE 'ordered' %]<span>Ordered</span>
879 [% CASE 'partial' %]<span>Partial</span>
880 [% CASE 'complete' %]<span>Complete</span>
881 [% CASE 'cancelled' %]<span>Cancelled</span>
884 <td>[% order.quantity | html %]</td>
885 <td>[% IF ( order.unitprice_tax_included > 0 ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %]
886 <td>[% order.order_internalnote | html %]</td>
888 [% IF order.subscriptionid %]
889 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
893 [% IF order.subscriptionid %]
894 [% order.subscription.callnumber | html %]
902 <span class="noorder">There is no order for this bibliographic record.</span>
907 [% IF suggestions.count %]
908 <div role="tabpanel" class="tab-pane" id="suggestion_details">
909 [% IF nb_archived_suggestions > 0 %]
910 <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw %]
912 <table id="suggestions" class="sorted">
915 <th class="NoSort"> </th>
916 <th class="anti-the">Suggestion</th>
917 <th>Suggested by - on</th>
918 <th>Managed by - on</th>
919 <th>Last modification by - on</th>
926 [% FOREACH suggestion IN suggestions %]
928 <td>[% suggestion.suggestionid | html %]</td>
930 <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show" title="suggestion" >
931 [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
933 [% IF ( suggestion.copyrightdate ) %]© [% suggestion.copyrightdate | html %] [% END %]
934 [% IF ( suggestion.volumedesc ) %]; Volume:<em>[% suggestion.volumedesc | html %]</em> [% END %]
935 [% 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 %]
938 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
939 [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
942 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
943 [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
946 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
947 [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
950 [% Branches.GetName( suggestion.branchcode ) | html %]
953 [% suggestion.fund.budget_name | html %]
956 [% IF suggestion.STATUS == 'ASKED' %]<span>Pending</span>
957 [% ELSIF suggestion.STATUS == 'ACCEPTED' %]<span>Accepted</span>
958 [% ELSIF suggestion.STATUS == 'ORDERED' %]<span>Ordered</span>
959 [% ELSIF suggestion.STATUS == 'REJECTED' %]<span>Rejected</span>
960 [% ELSIF suggestion.STATUS == 'CHECKED' %]<span>Checked</span>
961 [% ELSIF suggestion.STATUS == 'AVAILABLE' %]<span>Available</span>
962 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
963 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
964 [% ELSE %]<span>Status unknown</span>
966 [% IF suggestion.reason %]
967 <br />([% suggestion.reason | html %])
977 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
978 <div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4>
980 [% 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 %]
981 [% 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 %]
982 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber | uri %]">[% XISBN.title | html %]</a> <span>by</span> [% XISBN.author | html %] ©[% XISBN.copyrightdate | html %]
983 [% IF ( XISBN.publishercode ) %]
984 [% 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 %]
986 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
987 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
991 </table></div>[% END %]
994 [% IF ( LocalCoverImages ) %]
995 <div role="tabpanel" class="tab-pane" id="images">
996 [% IF localimages.count %]
997 <p>Click on an image to view it in the image viewer</p>
998 <ul class="thumbnails">
999 [% FOREACH image IN localimages %]
1001 <li id="imagenumber-[% image.imagenumber | html %]" class="thumbnail">
1002 <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]">
1003 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" />
1005 [% IF CAN_user_tools_upload_local_cover_images %]
1006 <a href="#" class="remove"><i class="fa fa-trash"></i> Delete image</a>
1012 [% ELSE # - No image passed JavaScript takes care %]
1013 <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span>
1015 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1016 <p>Upload an image file: <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber | uri %]&filetype=image"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a>
1022 [% IF ( HTML5MediaEnabled ) %]
1023 <div role="tabpanel" class="tab-pane" id="html5media">
1024 [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
1026 [% IF HTML5MediaSet.is_youtube %]
1027 <iframe id="player" width="640" height="360" src="[% HTML5MediaSet.srcblock | url %]"></iframe>
1029 <[% HTML5MediaParent | html %] controls preload=none>
1030 <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
1031 [[% HTML5MediaParent | html %] tag not supported by your browser.]
1032 </[% HTML5MediaParent | html %]>
1040 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
1041 <div role="tabpanel" class="tab-pane" id="NovelistSelect" class="novelistSelect">
1042 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
1046 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
1047 <div role="tabpanel" class="tab-pane" id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
1048 [% plugins_intranet_catalog_biblio_tab.content | $raw %]
1052 </div><!-- /tab-content -->
1053 </div><!-- /bibliodetails -->
1055 <div id="export" style="margin-top: 1em;">
1056 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
1058 <th>Save record</th> </tr>
1059 <tr><td> Select download format: <select name="format">
1060 <option value="mods">MODS (XML)</option>
1061 <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
1062 <option value="marcxml">MARCXML</option>
1063 <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1064 <option value="utf8">MARC (Unicode/UTF-8)</option> </select>
1065 <input type="submit" name="save" value="Download record" /></td>
1068 <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
1074 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
1075 <div class="modal-dialog modal-lg">
1076 <div class="modal-content">
1077 <div class="modal-header">
1078 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1079 <h3 id="marcPreviewLabel">MARC preview</h3>
1081 <div class="modal-body">
1082 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
1084 <div class="modal-footer">
1085 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1092 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1094 <div class="col-sm-2 col-sm-pull-10">
1096 [% INCLUDE 'biblio-view-menu.inc' %]
1098 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1099 </div> <!-- /.row -->
1103 <div class="modal fade" id="modal-item-group-create" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-create-label">
1104 <div class="modal-dialog">
1105 <div class="modal-content">
1106 <div class="modal-header">
1107 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1108 <h3 id="modal-item-group-create-label"><i class="fa fa-plus"></i> Create a new item group</h3>
1110 <form id="modal-item-group-create-form" class="validated">
1111 <div class="modal-body">
1114 <label for="item_group_description" class="required">Name: </label>
1115 <input name="description" id="modal-item-group-create-form-description" type="text" size="30" required="required" class="required" />
1116 <span class="required">Required</span>
1119 <label for="item_group_display_order" class="required">Display order: </label>
1120 <input name="display_order" id="modal-item-group-create-form-display_order" value="0" size="5" required="required" class="required" />
1121 <span class="required">Required</span>
1123 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1127 <div class="modal-footer">
1128 <button id="modal-item-group-create-submit" class="btn btn-default"><i class="fa fa-plus"></i> Submit</button>
1129 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1136 <div class="modal fade" id="modal-item-group-edit" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-edit-label">
1137 <div class="modal-dialog">
1138 <div class="modal-content">
1139 <div class="modal-header">
1140 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1141 <h3 id="modal-item-group-edit-label"><i class='fa fa-edit'></i> Edit item group</h3>
1143 <form id="modal-item-group-edit-form" class="validated">
1144 <div class="modal-body">
1147 <label for="item_group_description" class="required">Name: </label>
1148 <input name="description" id="modal-item-group-edit-form-description" type="text" size="30" required="required" class="required" />
1149 <span class="required">Required</span>
1152 <label for="item_group_display_order" class="required">Sort order: </label>
1153 <input name="display_order" id="modal-item-group-edit-form-display_order" size="5" />
1154 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1158 <div class="modal-footer">
1159 <button id="modal-item-group-edit-submit" class="btn btn-default"><i class='fa fa-edit'></i> Submit</button>
1160 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1167 <div class="modal fade" id="modal-item-group-delete" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-delete-label">
1168 <div class="modal-dialog">
1169 <div class="modal-content">
1170 <div class="modal-header">
1171 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1172 <h3 id="modal-item-group-delete-label"><i class='fa fa-trash'></i> Delete item group</h3>
1174 <div class="modal-body">
1175 Are you sure you want to delete this item group?
1177 <div class="modal-footer">
1178 <button id="modal-item-group-delete-submit" class="btn btn-danger"><i class='fa fa-trash'></i> Delete</button>
1179 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1185 <div class="modal fade" id="modal-item-group-set" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-set-label">
1186 <div class="modal-dialog">
1187 <div class="modal-content">
1188 <div class="modal-header">
1189 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1190 <h3 id="modal-item-group-set-label"><i class='fa fa-book'></i> Set item group for items</h3>
1192 <form id="modal-item-group-set-form" class="validated">
1193 <div class="modal-body">
1196 <label for="item_group" class="required">Item group: </label>
1197 <select name="item_group" id="item-group-add-form-select">
1198 [% FOREACH ig IN biblio.item_groups %]
1199 <option value="[% ig.id | html %]">[% ig.description | html %]</option>
1202 <span class="required">Required</span>
1206 <div class="modal-footer">
1207 <button id="modal-item-group-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set item group</button>
1208 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1215 <div class="modal fade" id="modal-item-group-unset" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-unset-label">
1216 <div class="modal-dialog">
1217 <div class="modal-content">
1218 <div class="modal-header">
1219 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1220 <h3 id="modal-item-group-unset-label"><i class='fa fa-unlink'></i> Remove item from item group</h3>
1222 <div class="modal-body">
1223 Are you sure you want to remove these item(s) from their item group(s)?
1225 <div class="modal-footer">
1226 <button id="modal-item-group-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button>
1227 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1233 [% IF bundlesEnabled %]
1234 <div class="modal" id="addToBundleModal" tabindex="-1" role="dialog" aria-labelledby="addToBundleLabel">
1235 <form id="addToBundleForm" action="">
1236 <div class="modal-dialog" role="document">
1237 <div class="modal-content">
1238 <div class="modal-header">
1239 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1240 <h3 id="addToBundleLabel">Add to bundle</h3>
1242 <div class="modal-body">
1243 <div id="addResult"></div>
1244 <fieldset class="rows">
1247 <label class="required" for="external_id">Item barcode: </label>
1248 <input type="text" id="external_id" name="external_id" required="required">
1249 <span class="required">Required</span>
1254 <div class="modal-footer">
1255 <button type="submit" class="btn btn-default">Submit</button>
1256 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1263 <div class="modal" id="removeFromBundleModal" tabindex="-1" role="dialog" aria-labelledby="removeFromBundleLabel">
1264 <form id="removeFromBundleForm" action="">
1265 <div class="modal-dialog" role="document">
1266 <div class="modal-content">
1267 <div class="modal-header">
1268 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1269 <h3 id="removeFromBundleLabel">Remove from bundle</h3>
1271 <div class="modal-body">
1272 <div id="removeResult"></div>
1273 <fieldset class="rows">
1276 <label class="required" for="external_id">Item barcode: </label>
1277 <input type="text" id="rm_external_id" name="external_id" required="required">
1278 <span class="required">Required</span>
1283 <div class="modal-footer">
1284 <button type="submit" class="btn btn-default">Submit</button>
1285 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1293 [% MACRO jsinclude BLOCK %]
1294 [% INCLUDE 'catalog-strings.inc' %]
1295 [% Asset.js("js/catalog.js") | $raw %]
1296 [% Asset.js("js/recalls.js") | $raw %]
1297 [% Asset.js("js/coce.js") | $raw %]
1298 [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1300 var interface = "[% interface | html %]";
1301 var theme = "[% theme | html %]";
1302 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
1303 function verify_cover_images() {
1304 // Loop over each container in the template which contains covers
1305 $(".cover-slider").each(function(){
1306 var lightbox_descriptions = [];
1307 $(this).find(".cover-image").each( function( index ){
1309 // Find the image in the container
1310 var img = div.find("img")[0];
1311 if( $(img).length > 0 ){
1312 var description = "";
1313 if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){
1314 // No image loaded in the container. Remove the slide
1317 // All slides start hidden. If this is the first one, show it.
1321 // Check if Amazon image is present
1322 if ( div.attr("id") == "amazon-bookcoverimg" ) {
1325 if ((w == 1) || (h == 1)) {
1326 // Amazon returned single-pixel placeholder
1327 // Remove the container
1330 lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1332 } else if( div.attr("id") == "custom-coverimg" ){
1333 if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1334 // No image was loaded via the CustomCoverImages system preference
1335 // Remove the container
1338 lightbox_descriptions.push("Custom cover image");
1340 } else if ( div.attr("id") == "syndetics-bookcoverimg" ){
1341 lightbox_descriptions.push(_("Syndetics cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1343 else if( div.attr("id") == "coce-coverimg" ){
1344 // Identify which service's image is being loaded by Coce
1345 var coce_description;
1346 if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1347 coce_description = ("Coce image from Amazon.com");
1348 } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1349 coce_description = _("Coce image from Google Books");
1350 } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1351 coce_description = _("Coce image from Open Library");
1353 div.find(".hint").html(coce_description);
1354 lightbox_descriptions.push(coce_description);
1355 } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1356 lightbox_descriptions.push(_("Local cover image (<a href='%s'>edit</a>)").format($(img).data('link')));
1358 lightbox_descriptions.push(_("Cover image source unknown"));
1364 // Lightbox for cover images
1365 Chocolat(this.querySelectorAll('.cover-image a'), {
1366 description: function(){
1367 return lightbox_descriptions[this.settings.currentImageIndex];
1373 $(".cover-slider").each(function(){
1374 var coverSlide = this;
1375 var coverImages = $(this).find(".cover-image");
1376 if( coverImages.length > 1 ){
1377 coverImages.each(function( index ){
1378 // If more that one image is present, add a navigation link
1379 // for activating the slide
1380 var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1382 // Set the first navigation link as active
1383 $(covernav).addClass("nav-active");
1385 $(covernav).html("<i class=\"fa fa-circle\"></i>");
1386 $(coverSlide).append( covernav );
1390 if( $(coverSlide).attr('id') == 'biblio-cover-slider' // Hide if not visible, but only for the biblio images. Images for items are only local cover images
1391 && $(coverSlide).find(".cover-image:visible").length < 1 ){
1392 $(coverSlide).remove();
1394 $(coverSlide).addClass("cover-slides");
1398 $("#editions img").each(function(i){
1399 if ( this.src.indexOf('amazon.com') >= 0 ) {
1402 if ((w == 1) || (h == 1)) {
1403 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1404 } else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) {
1405 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1411 function removeLocalImage(imagenumber) {
1412 var thumbnail = $("#imagenumber-" + imagenumber );
1413 var copy = thumbnail.html();
1414 thumbnail.find("img").css("opacity", ".2");
1415 thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
1417 url: "/cgi-bin/koha/svc/cover_images?action=delete&imagenumber=" + imagenumber,
1418 success: function(data) {
1419 $(data).each( function(i) {
1420 if ( this.deleted == 1 ) {
1423 thumbnail.html( copy );
1424 alert(_("An error occurred on deleting this image"));
1426 if ( $('ul.thumbnails > li').length == 0 ) {
1427 showNoImageMessage();
1431 error: function(data) {
1432 thumbnail.html( copy );
1433 alert(_("An error occurred on deleting this image"));
1438 function showNoImageMessage() {
1439 var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
1440 no_images_msg = '<p>' + no_images_msg + '</p>';
1441 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1442 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 + "&filetype=image'><i class='fa fa-upload' aria-hidden='true'></i> ","</a>");
1443 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
1445 $('#images').html(no_images_msg);
1448 [% IF StaffDetailItemSelection %]
1449 function itemSelectionBuildDeleteLink(div) {
1450 var itemnumbers = new Array();
1451 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1452 itemnumbers.push($(this).val());
1454 if (itemnumbers.length > 0) {
1455 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
1456 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1457 url += '&biblionumber=[% biblionumber | uri %]';
1458 url += '&src=CATALOGUING';
1459 $('a.itemselection_action_delete').attr('href', url);
1466 function itemSelectionBuildModifyLink(div) {
1467 var itemnumbers = new Array();
1468 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1469 itemnumbers.push($(this).val());
1471 if (itemnumbers.length > 0) {
1472 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
1473 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1474 url += '&biblionumber=[% biblionumber | uri %]';
1475 url += '&src=CATALOGUING';
1476 $('a.itemselection_action_modify').attr('href', url);
1483 function itemSelectionBuildActionLinks(tab) {
1484 var div = $("#" + tab);
1485 var delete_link_ok = itemSelectionBuildDeleteLink(div);
1486 var modify_link_ok = itemSelectionBuildModifyLink(div);
1487 if (modify_link_ok || delete_link_ok) {
1488 $('.itemselection_actions', div).show();
1490 $('.itemselection_actions', div).hide();
1494 $(document).ready(function() {
1495 $('table.items_table').each(function() {
1496 var div = $(this).parent().attr("id");
1497 itemSelectionBuildActionLinks(div);
1500 $("input[name='itemnumber'][type='checkbox']").change(function() {
1501 var div = $(this).parents('table').parent().parent().attr("id");
1502 itemSelectionBuildActionLinks(div);
1505 $(".SelectAll").on("click",function(e){
1507 var tab = $(this).data("tab");
1508 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
1509 itemSelectionBuildActionLinks(tab);
1512 $(".ClearAll").on("click",function(e){
1514 var tab = $(this).data("tab");
1515 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1516 itemSelectionBuildActionLinks(tab);
1521 $(document).ready(function() {
1522 // Pick details tab to display by default
1524 [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
1525 $(".nav-tabs a[href='#html5media']").tab("show");
1526 [% ELSIF ComponentParts && ComponentParts.size %]
1527 $(".nav-tabs a[href='#components']").tab("show");
1529 $(".nav-tabs a[href='#holdings']").tab("show");
1532 $(".nav-tabs a[href='#holdings']").tab("show");
1534 $('#search-form').focus();
1535 $('.thumbnails > li > .remove').click(function() {
1536 var result = confirm(_("Are you sure you want to delete this cover image?"));
1538 if ( result == true ) {
1539 var imagenumber = $(this).parent().attr('id').split('-')[1];
1540 removeLocalImage(imagenumber);
1545 [% IF ( IntranetCoce && CoceProviders ) %]
1546 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
1549 $("body").on("click",".previewMARC", function(e){
1551 var page = $(this).attr("href");
1552 $("#marcPreview .modal-body").load(page + " table");
1553 $('#marcPreview').modal({show:true});
1555 $("#marcPreview").on("hidden.bs.modal", function(){
1556 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
1558 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1559 novSelect.loadContentForQuery({
1560 ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1561 ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1564 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
1565 '[% Koha.Preference('NovelistSelectPassword') | html %]',
1567 if ( d.length > 0 ){ //If no content
1568 $(".NovelistSelect").show();
1572 $(".print-label").on("click", function(e){
1574 link = $(this).attr("href");
1575 openWindow(link,"Print spine label",400,400);
1577 $(".cover-slider").on("click",".cover-nav", function(e){
1579 var cover_slider = $(this).parent();
1580 // Adding click handler for cover image navigation links
1581 var num = $(this).data("num");
1582 $(cover_slider).find(".cover-nav").removeClass("nav-active");
1583 $(this).addClass("nav-active");
1584 $(cover_slider).find(".cover-image").hide();
1585 $(cover_slider).find(".cover-image").eq( num ).show();
1589 $(window).load(function() {
1590 verify_cover_images();
1593 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1594 <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1596 [% INCLUDE 'datatables.inc' %]
1597 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1598 [% INCLUDE 'columns_settings.inc' %]
1599 [% INCLUDE 'js-date-format.inc' %]
1600 [% INCLUDE 'js-patron-format.inc' %]
1601 [% INCLUDE 'js-biblio-format.inc' %]
1602 [% Asset.js("js/browser.js") | $raw %]
1603 [% Asset.js("js/table_filters.js") | $raw %]
1606 browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1609 [% IF bundlesEnabled %]
1610 var bundle_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','bundle_tables','json') | $raw %];
1611 var bundle_lost_value = [% Koha.Preference('BundleLostValue') | html %];
1613 $(document).ready(function() {
1615 [% IF bundlesEnabled %] // Bundle handling
1616 function createChild ( row, itemnumber, duedate ) {
1619 var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>');
1620 bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#addToBundleModal" data-item="' + itemnumber + '"><i class="fa fa-plus"></i> ' + _("Add to bundle") + '</a>');
1621 bundle_toolbar.append('<a class="btn btn-default" data-toggle="modal" data-target="#removeFromBundleModal" data-item="' + itemnumber + '"><i class="fa fa-minus"></i> ' + _("Remove from bundle") + '</a>');
1623 // Disable management if there's a duedate
1625 bundle_toolbar.children('.btn').addClass("disabled");
1628 // This is the table we'll convert into a DataTable
1629 var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>');
1631 // Display it the child row
1632 row.child( bundle_toolbar.add(bundles_table), 'bundle' ).show();
1634 // Initialise as a DataTable
1635 var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?";
1636 var bundle_table = bundles_table.kohaTable({
1638 "url": bundle_table_url
1640 "header_filter": false,
1643 "return_claim.patron"
1645 "order": [[ 1, "asc" ]],
1647 "targets": [0,1,2,3,4,5],
1648 "render": function (data, type, row, meta) {
1649 if ( data && type == 'display' ) {
1650 return data.escapeHtml();
1657 "data": "biblio.title:biblio.subtitle:biblio.medium",
1658 "title": _("Title"),
1661 "render": function(data, type, row, meta) {
1662 return $biblio_to_html(row.biblio, { link: 1 });
1666 "data": "biblio.author",
1667 "title": _("Author"),
1672 "data": "collection_code",
1673 "title": _("Collection"),
1678 "data": "item_type",
1679 "title": _("Item type"),
1680 "searchable": false,
1684 "data": "callnumber",
1685 "title": _("Callnumber"),
1690 "data": "external_id",
1691 "title": _("Barcode"),
1696 "data": "lost_status:last_seen_date:return_claim.patron",
1697 "title": _("Status"),
1698 "searchable": false,
1700 "render": function(data, type, row, meta) {
1701 if ( row.lost_status == bundle_lost_value ) {
1702 let out = '<span class="lost">' + _("Last seen") + ': ' + row.last_seen_date + '</span>';
1703 if ( row.return_claim ) {
1704 out = out + '<span class="claims_return">' + _("Claims returned by") + ': ' + $patron_to_html( row.return_claim.patron, { display_cardnumber: false, url: true } ) + '</span>';
1708 else if ( row.lost_status !== 0 ) {
1709 return '<span class="lost">' + _("Lost") + ': ' + row.lost_status + '</span>';
1711 return '<span class="available">' + _("Present") + '</span>';
1715 "data": function( row, type, val, meta ) {
1718 result = '<button class="btn btn-default btn-xs remove disabled" role="button" data-itemnumber="'+row.item_id+'"><i class="fa fa-minus" aria-hidden="true"></i> '+_("Remove")+'</button>\n';
1720 result = '<button class="btn btn-default btn-xs remove" role="button" data-itemnumber="'+row.item_id+'"><i class="fa fa-minus" aria-hidden="true"></i> '+_("Remove")+'</button>\n';
1724 "title": _("Actions"),
1725 "searchable": false,
1730 }, bundle_settings, 1);
1731 $(".tbundle").on("click", ".remove:not(.disabled)", function(){
1732 var bundle_table = $(this).closest('table');
1733 var host_itemnumber = bundle_table.data('itemnumber');
1734 var component_itemnumber = $(this).data('itemnumber');
1735 var unlink_item_url = "/api/v1/items/" + host_itemnumber + "/bundled_items/" + component_itemnumber;
1738 url: unlink_item_url,
1739 success: function(){
1740 bundle_table.DataTable({ 'retrieve': true }).draw(false);
1749 var bundle_form_active;
1750 $("#addToBundleModal").on("shown.bs.modal", function(e){
1751 var button = $(e.relatedTarget);
1752 var item_id = button.data('item');
1753 $("#addResult").replaceWith('<div id="addResult"></div>');
1754 $("#addToBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items');
1755 $("#external_id").focus();
1757 bundle_form_active = item_id;
1760 $("#addToBundleForm").submit(function(event) {
1762 /* stop form from submitting normally */
1763 event.preventDefault();
1765 /* get the action attribute from the <form action=""> element */
1766 var $form = $(this),
1767 url = $form.attr('action');
1769 /* Send the data using post with external_id */
1770 var posting = $.post({
1772 data: JSON.stringify({ external_id: $('#external_id').val()}),
1773 contentType: "application/json; charset=utf-8",
1777 /* Report the results */
1778 posting.done(function(data) {
1779 var barcode = $('#external_id').val();
1780 $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">'+_("Success: Added '%s'").format(barcode)+'</div>');
1781 $('#external_id').val('').focus();
1784 posting.fail(function(data) {
1785 var barcode = $('#external_id').val();
1786 if ( data.status === 409 ) {
1787 var response = data.responseJSON;
1788 if ( response.key === "PRIMARY" ) {
1789 $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1791 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
1793 } else if ( data.status === 404 ) {
1794 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
1796 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
1798 $('#external_id').val('').focus();
1802 $("#addToBundleModal").on("hidden.bs.modal", function(e){
1803 if ( bundle_changed ) {
1804 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
1806 bundle_form_active = 0;
1810 $("#removeFromBundleModal").on("shown.bs.modal", function(e){
1811 var button = $(e.relatedTarget);
1812 var item_id = button.data('item');
1813 $("#removeResult").replaceWith('<div id="removeResult"></div>');
1814 $("#removeFromBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items/');
1815 $("#rm_external_id").focus();
1817 bundle_form_active = item_id;
1820 $("#removeFromBundleForm").submit(function(event) {
1822 /* stop form from submitting normally */
1823 event.preventDefault();
1825 /* get the action attribute from the <form action=""> element */
1826 var $form = $(this),
1827 url = $form.attr('action');
1829 var barcode = $('#rm_external_id').val();
1831 /* Fetch itemnumber using rm_external_id */
1832 var itemReq = $.get('/api/v1/items', { q: JSON.stringify({
1833 external_id: barcode
1834 }) }, null, "json");
1837 itemReq.done(function(data) {
1838 if (data.length === 1) {
1839 itemnumber = data[0].item_id;
1841 /* Remove link using fetch itemnumber */
1842 var deleteReq = $.ajax( url + itemnumber, {
1846 /* Report the results */
1847 deleteReq.done(function(data) {
1848 var barcode = $('#rm_external_id').val();
1849 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed '%s'").format(barcode)+'</div>');
1850 $('#rm_external_id').val('').focus();
1853 deleteReq.fail(function(data) {
1854 var barcode = $('#rm_external_id').val();
1855 if ( data.status === 409 ) {
1856 var response = data.responseJSON;
1857 if ( response.key === "PRIMARY" ) {
1858 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1860 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
1862 } else if ( data.status === 404 ) {
1863 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
1865 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
1867 $('#rm_external_id').val('').focus();
1870 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'</div>');
1873 itemReq.fail(function(data) {
1874 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found '%s'").format(barcode)+'</div>');
1875 $('#rm_external_id').val('').focus();
1880 $("#removeFromBundleModal").on("hidden.bs.modal", function(e){
1881 if ( bundle_changed ) {
1882 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
1884 bundle_form_active = 0;
1887 // End bundle handling
1890 var table_names = [ 'holdings_table', 'otherholdings_table' ];
1891 var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ];
1892 var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ];
1893 table_names.forEach( function( table_name, index ) {
1894 if ( !has_images[index] ) {
1895 table_settings[index].columns.splice(1,1);
1897 var dt_parameters = {
1900 'bAutoWidth': false,
1901 "bKohaColumnsUseNames": true,
1902 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1904 var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' );
1906 [% IF bundlesEnabled %]
1907 // Add event listener for opening and closing bundle details
1908 $('#' + table_name + ' tbody').on('click', 'button.details-control', function () {
1909 var tr = $(this).closest('tr');
1910 var dTable = $(this).closest('table').DataTable({ 'retrieve': true });
1912 var itemnumber = tr.data('itemnumber');
1913 var duedate = tr.data('duedate');
1914 var row = dTable.row( tr );
1916 if ( row.child.isShown() ) {
1917 // This row is already open - close it
1919 tr.removeClass('shown');
1923 createChild(row, itemnumber, duedate);
1924 tr.addClass('shown');
1930 [% IF Koha.Preference('AcquisitionDetails') %]
1931 var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
1932 var acquisitiondetails_table = KohaTable("orders", {
1933 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1935 'bAutoWidth': false,
1936 "aaSorting": [[ 4, "desc" ]],
1940 [% IF suggestions.count %]
1941 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
1943 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
1944 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
1946 "sPaginationType": "full"
1953 $(document).ready(function() {
1954 var search_index = localStorage.getItem("cat_search_pulldown_selection");
1955 var search_value = localStorage.getItem("searchbox_value");
1956 if ( search_index ){ $('#cat-search-block select.advsearch').val(search_index)};
1957 if ( search_value ){ $('#cat-search-block #search-form').val(search_value)};
1961 [% IF Koha.Preference('EnableItemGroups') %]
1962 // Load item groups table
1963 var itemGroupsTable = KohaTable("items-group-table", {
1964 "bAutoWidth": false,
1965 'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
1968 "mDataProp": function( oObj ) {
1969 return oObj.display_order;
1973 "mDataProp": function( oObj ) {
1974 return oObj.description;
1978 "mDataProp": function( oObj ) {
1979 [% IF CAN_user_editcatalogue_manage_item_groups %]
1980 return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1981 <i class='fa fa-edit'></i> ${_("Edit")}
1984 + `<button class='item-group-delete btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1985 <i class='fa fa-trash'></i> ${('Delete')}
1994 "bProcessing": true,
1995 "bServerSide": false,
1996 "sAjaxSource": `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1`,
1997 "sAjaxDataProp": "",
1998 "fnServerData": function ( sSource, aoData, fnCallback ) {
1999 $.getJSON( sSource, aoData, function (json) {
2005 // Create new item groups
2006 $('.item-group-create').on('click', function(){
2007 $('#modal-item-group-create-form-description').val("");
2008 $('#modal-item-group-create-submit').removeAttr('disabled');
2009 $('#modal-item-group-create').modal('show');
2012 $("#modal-item-group-create-form").validate({
2013 submitHandler: function(form) {
2015 url: `/api/v1/biblios/${biblionumber}/item_groups`,
2016 headers: { "x-koha-embed": "items" },
2017 success: function(item_groups){
2018 $('#modal-item-group-create-submit').attr('disabled', 'disabled');
2021 "url": `/api/v1/biblios/${biblionumber}/item_groups`,
2024 "Content-Type": "application/json"
2026 "data": JSON.stringify(
2028 "description": $("#modal-item-group-create-form-description").val(),
2029 "display_order": $("#modal-item-group-create-form-display_order").val(),
2035 .done(function (response) {
2036 $('#item-group-add-form-select').append($('<option>', {
2037 value: response.item_group_id,
2038 text: response.description
2041 $('#modal-item-group-create').modal('hide');
2042 if ( item_groups.length == 0 ) {
2043 // This bib has no previous item groups, reload the page
2044 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2046 // Has other item groups, just reload the table
2047 itemGroupsTable.api().ajax.reload();
2050 .fail(function(err) {
2051 var message = err.responseJSON.error;
2059 $('#modal-item-group-create').on('shown.bs.modal', function () {
2060 $('#modal-item-group-create-form-description').focus();
2063 // Edit existing item groups
2064 $('body').on( 'click', '.item-group-edit', function(){
2065 const item_group_id = $(this).data('item-group-id');
2066 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2067 $.get( url, function( data ) {
2068 $('#modal-item-group-edit-form-description').val( data.description );
2069 $('#modal-item-group-edit-form-display_order').val( data.display_order );
2070 $('#modal-item-group-edit-submit').data('item-group-id', item_group_id );
2071 $('#modal-item-group-edit-submit').removeAttr('disabled');
2072 $('#modal-item-group-edit').modal('show');
2076 $("#modal-item-group-edit-form").validate({
2077 submitHandler: function(form) {
2078 $('#modal-item-group-edit-submit').attr('disabled', 'disabled');
2080 const item_group_id = $('#modal-item-group-edit-submit').data('item-group-id');
2081 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2087 "Content-Type": "application/json"
2089 "data": JSON.stringify(
2091 "description": $("#modal-item-group-edit-form-description").val(),
2092 "display_order": $("#modal-item-group-edit-form-display_order").val(),
2098 .done(function (response) {
2099 $('#modal-item-group-edit').modal('hide');
2100 itemGroupsTable.api().ajax.reload();
2102 .fail(function(err) {
2103 var message = err.responseJSON.error;
2109 $('#modal-item-group-edit').on('shown.bs.modal', function () {
2110 $('#modal-item-group-edit-form-description').focus();
2113 // Delete existing item groups
2114 $('body').on( 'click', '.item-group-delete', function(){
2115 const item_group_id = $(this).data('item-group-id');
2116 $('#modal-item-group-delete-submit').data('item-group-id', item_group_id );
2117 $('#modal-item-group-delete-submit').removeAttr('disabled');
2118 $('#modal-item-group-delete').modal('show');
2120 $("#modal-item-group-delete-submit").on('click', function(){
2121 $('#modal-item-group-delete-submit').attr('disabled', 'disabled');
2122 const item_group_id = $("#modal-item-group-delete-submit").data('item-group-id');
2125 url: `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2126 headers: { "x-koha-embed": "items" },
2127 success: function(item_group_data){
2129 "url": `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2132 .done(function (response) {
2133 $('#modal-item-group-delete').modal('hide');
2134 $(`#item-group-add-form-select option[value='${item_group_id}']`).remove();
2135 if ( item_group_data.items === null ) {
2136 // No items for this item group, we can just refresh the table
2137 itemGroupsTable.api().ajax.reload();
2139 // This item group had items attached to it, we need to reload the page
2140 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2143 .fail(function(err) {
2144 var message = err.responseJSON.error;
2151 // Add item(s) to a item group
2152 $('.itemselection_action_item_group_set').on('click', function(){
2153 $('#modal-item-group-set').modal('show');
2156 $("#modal-item-group-set-form").validate({
2157 submitHandler: function(form) {
2158 $('#modal-item-group-set-submit').attr('disabled', 'disabled');
2160 const item_group_id = $('#item-group-add-form-select').val();
2162 let itemnumbers = new Array();
2163 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2164 const itemnumber = $(this).val();
2165 itemnumbers.push( itemnumber );
2167 if (itemnumbers.length > 0) {
2168 let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_item_group';
2169 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2170 url += '&biblionumber=[% biblionumber | uri %]';
2171 url += `&item_group_id=${item_group_id}`;
2173 window.location.replace(url);
2176 $('#modal-item-group-set').modal('hide');
2180 // Remove item(s) from an item group
2181 $('.itemselection_action_item_group_unset').on('click', function(){
2182 $('#modal-item-group-unset').modal('show');
2185 $("#modal-item-group-unset-submit").on('click', function(){
2186 $('#modal-item-group-unset-submit').attr('disabled', 'disabled');
2188 let itemnumbers = new Array();
2189 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2190 const itemnumber = $(this).val();
2191 itemnumbers.push( itemnumber );
2193 if (itemnumbers.length > 0) {
2194 let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_item_group';
2195 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2196 url += '&biblionumber=[% biblionumber | uri %]';
2198 window.location.replace(url);
2201 $('#modal-item-group-unset').modal('hide');
2207 [% INCLUDE 'intranet-bottom.inc' %]