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 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 [% SET itemtype = item.itemtype %]
401 [% IF !noItemTypeImages && itemtype.image_location %]
402 <img src="[% itemtype.image_location | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" />
404 <span class="itypedesc">[% itemtype.translated_description | html %]</span>
407 <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
408 <td class="homebranch">
409 <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
410 <span class="shelvingloc">
412 If permanent location is defined, show description or code and display current location in parentheses. If not, display current location.
413 Note that permanent location is a code, and location may be an authval.
415 [% IF item.permanent_location %]
416 [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
417 [% permloc_authval | html %]
418 [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %]
419 ([% item.location | html %])
422 [% item.location | html %]
426 [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
427 [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
428 <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
430 [% SET serial = item.itemserial.serial %]
431 [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
432 <td class="enumchron" data-order="[% serial.publisheddate | html %]">
434 <td class="enumchron">
436 [% IF ( itemdata_enumchron ) %]
437 [% IF item.enumchron && serial.serialseq %]
438 <span class="enum">[% item.enumchron | html %]</span>
439 [% IF ( item.serialseq && item.enumchron != serial.serialseq ) %]
440 <span class="sep"> -- </span>
441 <span class="serialseq">[% serial.serialseq | html %]</span>
443 [% ELSIF item.enumchron %]
444 <span class="enum">[% item.enumchron | html %]</span>
445 [% ELSIF item.serialseq %]
446 <span class="serialseq">[% serial.serialseq | html %]</span>
448 [% IF serial.publisheddate %]
449 <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span>
457 [% IF item.checkout %]
458 [% IF item.checkout.onsite_checkout %]
459 <span>Currently in local use
461 <span class="datedue">Checked out
463 [% UNLESS ( item.not_same_branch) %]
464 [% IF item.checkout.onsite_checkout %]
469 [% INCLUDE 'patron-title.inc' patron=item.checkout.patron hide_patron_infos_if_needed=1 %]
471 : due [% item.checkout.date_due | $KohaDates as_due_date => 1 %]
473 [% ELSIF ( item.transfertwhen ) %]
474 <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
477 [% IF ( item.itemlost ) %]
478 [% IF itemlostloop %]
479 [% FOREACH itemlostloo IN itemlostloop %]
480 [% IF itemlostloo.authorised_value == item.itemlost %]
481 <span class="lost">[% itemlostloo.lib | html %]</span>
485 <span class="lost">Unavailable (lost or missing)</span>
489 [% IF ( item.withdrawn ) %]
490 [% IF itemwithdrawnloop %]
491 [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
492 [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
493 <span class="wdn">[% itemwithdrawnloo.lib | html %]</span>
497 <span class="wdn">Withdrawn</span>
501 [% IF ( item.damaged ) %]
502 [% IF itemdamagedloop %]
503 [% FOREACH itemdamagedloo IN itemdamagedloop %]
504 [% IF itemdamagedloo.authorised_value == item.damaged %]
505 <span class="dmg">[% itemdamagedloo.lib | html %]</span>
509 <span class="dmg">Damaged</span>
513 [% IF ( item.notforloan || item.itemtype.notforloan ) %]
514 <span class="notforloan">Not for loan
515 [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
516 [% IF not_for_loan_description %]
517 <span class="reason">([% not_for_loan_description | html %])</span>
522 [% SET hold = item.first_hold %]
524 [% IF hold.waitingdate %]
525 <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>
526 [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
527 <span class="heldfor">Hold for:</span>
528 [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
531 <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span>
535 [% SET recall = item.recall %]
537 [% IF recall.waiting_date %]
538 <span>Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</span>
540 [% patron_link = BLOCK %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %] ([% recall.patron.cardnumber | html %])</a>[% END %]
541 <span>recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</span>
545 [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || ( Koha.Preference('UseRecalls') && recall ) ) %]
546 <span>Available</span>
549 [% IF ( item.restricted ) %]
550 <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span>
553 [% IF ( item.bundle_host ) %]
554 <span class="bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</span>
558 <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
559 <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
560 <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
561 <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
562 <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td>
563 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&biblionumber=[% item.biblionumber | uri %]&bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
564 [% IF ( itemdata_uri ) %]
565 [% IF item.uri.split(' \| ').size > 1 %]
567 [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %]
572 <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a>
577 [% IF ( itemdata_copynumber ) %]
578 <td class="copynumber">[% item.copynumber | html %]</td>
580 [% IF ( itemdata_stocknumber ) %]
581 <td class="stocknumber">[% item.stocknumber | html %]</td>
584 <td class="materials"> [% item.materials | html %] </td>
586 [% IF ( itemdata_itemnotes ) %]
587 <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td>
589 [% IF itemdata_nonpublicnotes %]
590 <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
592 [% IF ( hostrecords ) %]
593 <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
597 [% IF ( item.countanalytics ) %]
598 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
603 <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
606 [% IF ShowCourseReserves %]
608 [% IF item.course_reserves %]
609 [% FOREACH r IN item.course_reserves %]
610 [% IF r.course.enabled == 'yes' %]
612 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
613 [% r.course.course_name | html %]
614 <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
615 [% IF r.course.section %] [% r.course.section | html %] [% END %]
616 [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
625 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
626 <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>
629 [% IF CAN_user_editcatalogue_edit_items %]
631 [% UNLESS item.cannot_be_edited %]
632 [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
633 <div class="btn-group">
634 <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>
635 <ul class="dropdown-menu pull-right">
636 <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>
640 <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>
643 [% IF bundlesEnabled %]
644 <button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle ([% item.bundled | html %]|[% item.bundled_lost | html %])</button>
653 [% END %][%# end of block items_table %]
655 [% IF Koha.Preference('EnableItemGroups') %]
656 <div role="tabpanel" class="tab-pane" id="item_groups">
657 [% IF CAN_user_editcatalogue_manage_item_groups %]
658 <div class="item_groups_table_table_controls">
659 <a href="#" class="item-group-create btn btn-default btn-xs"><i class="fa fa-plus"></i> New item group</a>
662 <table class="items-group-table" id="items-group-table">
665 <td>Display Order</td>
675 <div role="tabpanel" class="tab-pane" id="holdings">
677 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
678 <span class="results_summary NovelistSelect" style="display:none;">
679 <span class="label">Novelist Select: </span>
680 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
685 [% IF ( showncount ) %]
686 [% PROCESS items_table tab="holdings" items=itemloop %]
688 [% IF ( hiddencount ) %]
689 <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
691 [% IF ( debug_display ) %]
694 <tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron | html %]</td></tr>
695 <tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber | html %]</td></tr>
696 <tr><td>serial</td><td>[% serial | html %]</td></tr>
700 [% IF ( ALTERNATEHOLDINGS ) %]
701 [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
702 <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
705 <div id="noitems">No physical items for this record</div>
709 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
710 <span class="results_summary NovelistSelect" style="display:none;">
711 <span class="label">Novelist Select: </span>
712 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
717 [% IF (SeparateHoldings) %]
718 <div role="tabpanel" class="tab-pane" id="otherholdings">
719 [% IF (otheritemloop.size) %]
720 [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
722 <span class="nootheritems">No other items.</span>
727 [% IF ( MARCNOTES ) %]
729 <div role="tabpanel" class="tab-pane" id="description">
730 <div class="content_set">
732 [% FOREACH MARCNOTE IN MARCNOTES %]
734 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
735 <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
737 [% MARCNOTE.marcnote | html | html_line_break %]
746 [% IF ComponentParts && ComponentParts.size %]
747 <div role="tabpanel" class="tab-pane" id="components">
748 <div class="content_set">
750 [% FOR PART IN ComponentParts %]
758 [% IF ComponentParts.size == Koha.Preference('MaxComponentRecords')%]
759 <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>
761 </div> <!-- /.content_set -->
762 </div> <!-- /#components -->
766 [% IF ( subscriptionsnumber ) %]
767 <div role="tabpanel" class="tab-pane" id="subscriptions">
768 <div id="catalogue_detail_subscriptions">
769 <h2>This is a serial subscription</h2>
770 <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p>
771 [% FOREACH subscription IN subscriptions %]
772 [% IF subscription.branchcode %]
773 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
775 [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
776 [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]</p>[% END %]
777 [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
778 [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
779 [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
780 [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
781 [% IF ( subscription.latestserials ) %]
782 <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
786 <th>Date arrived</th>
787 <th>Date published</th>
791 [% FOREACH latestserial IN subscription.latestserials %]
793 <td>[% latestserial.serialseq | html %]</td>
794 <td data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
795 <td data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
797 [% IF ( latestserial.status1 ) %]<span>Expected</span>[% END %]
798 [% IF ( latestserial.status2 ) %]<span>Arrived</span>[% END %]
799 [% IF ( latestserial.status3 ) %]<span>Late</span>[% END %]
800 [% IF ( latestserial.status4 ) %]<span>Missing</span>[% END %]
801 [% IF ( latestserial.status41 ) %]<span>Missing (never received)</span>[% END %]
802 [% IF ( latestserial.status42 ) %]<span>Missing (sold out)</span>[% END %]
803 [% IF ( latestserial.status43 ) %]<span>Missing (damaged)</span>[% END %]
804 [% IF ( latestserial.status44 ) %]<span>Missing (lost)</span>[% END %]
805 [% IF ( latestserial.status5 ) %]<span>Not issued</span>[% END %]
806 [% IF ( latestserial.status6 ) %]<span>Delete</span>[% END %]
807 [% IF ( latestserial.status7 ) %]<span>Claimed</span>[% END %]
808 [% IF ( latestserial.status8 ) %]<span>Stopped</span>[% END %]
810 <td>[% latestserial.notes | html %]</td>
815 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]">Subscription details</a>
821 [% IF Koha.Preference('AcquisitionDetails') %]
822 <div role="tabpanel" class="tab-pane" id="acq_details">
823 [% IF orders.count %]
829 <th>Basket group</th>
831 <th>Order number</th>
832 <th>Creation date</th>
833 <th>Receive date</th>
836 <th title="Estimated cost tax incl. while pending, actual cost tax incl. once received">Price</th>
837 <th>Internal note</th>
838 <th>Subscription</th>
839 <th>Subscription call number</th>
843 [% FOR order IN orders %]
844 [% SET basket = order.basket %]
845 [% SET vendor = basket.bookseller %]
848 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
851 [% IF order.invoiceid %]
852 [% IF CAN_user_acquisition %]
853 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
854 title="Invoice detail page">
855 [% order.invoice.invoicenumber | html %]</a>
857 [% order.invoice.invoicenumber | html %]
862 [% IF basket.basketgroupid %]
863 [% SET basket_group = basket.basket_group %]
864 [% IF CAN_user_acquisition_group_manage %]
865 <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>
867 [% basket_group.name | html %] ([% basket_group.id | html %])
871 <td>[% IF CAN_user_acquisition_order_manage %]
872 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
874 [% basket.basketname | html %] ([% basket.basketno | html %])
876 <td>[% order.ordernumber | html %]</td>
877 <td data-order="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</td>
878 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</td>
880 [% SWITCH order.orderstatus %]
881 [% CASE 'new' %]<span>New</span>
882 [% CASE 'ordered' %]<span>Ordered</span>
883 [% CASE 'partial' %]<span>Partial</span>
884 [% CASE 'complete' %]<span>Complete</span>
885 [% CASE 'cancelled' %]<span>Cancelled</span>
888 <td>[% order.quantity | html %]</td>
889 <td>[% IF ( order.unitprice_tax_included > 0 ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %]
890 <td>[% order.order_internalnote | html %]</td>
892 [% IF order.subscriptionid %]
893 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
897 [% IF order.subscriptionid %]
898 [% order.subscription.callnumber | html %]
906 <span class="noorder">There is no order for this bibliographic record.</span>
911 [% IF suggestions.count %]
912 <div role="tabpanel" class="tab-pane" id="suggestion_details">
913 [% IF nb_archived_suggestions > 0 %]
914 <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw %]
916 <table id="suggestions" class="sorted">
919 <th class="NoSort"> </th>
920 <th class="anti-the">Suggestion</th>
921 <th>Suggested by - on</th>
922 <th>Managed by - on</th>
923 <th>Last modification by - on</th>
930 [% FOREACH suggestion IN suggestions %]
932 <td>[% suggestion.suggestionid | html %]</td>
934 <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show" title="suggestion" >
935 [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
937 [% IF ( suggestion.copyrightdate ) %]© [% suggestion.copyrightdate | html %] [% END %]
938 [% IF ( suggestion.volumedesc ) %]; Volume:<em>[% suggestion.volumedesc | html %]</em> [% END %]
939 [% 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 %]
942 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
943 [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
946 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
947 [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
950 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
951 [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
954 [% Branches.GetName( suggestion.branchcode ) | html %]
957 [% suggestion.fund.budget_name | html %]
960 [% IF suggestion.STATUS == 'ASKED' %]<span>Pending</span>
961 [% ELSIF suggestion.STATUS == 'ACCEPTED' %]<span>Accepted</span>
962 [% ELSIF suggestion.STATUS == 'ORDERED' %]<span>Ordered</span>
963 [% ELSIF suggestion.STATUS == 'REJECTED' %]<span>Rejected</span>
964 [% ELSIF suggestion.STATUS == 'CHECKED' %]<span>Checked</span>
965 [% ELSIF suggestion.STATUS == 'AVAILABLE' %]<span>Available</span>
966 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
967 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
968 [% ELSE %]<span>Status unknown</span>
970 [% IF suggestion.reason %]
971 <br />([% suggestion.reason | html %])
981 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
982 <div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4>
984 [% 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 %]
985 [% 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 %]
986 <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 %]
987 [% IF ( XISBN.publishercode ) %]
988 [% 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 %]
990 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
991 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
995 </table></div>[% END %]
998 [% IF ( LocalCoverImages ) %]
999 <div role="tabpanel" class="tab-pane" id="images">
1000 [% IF localimages.count %]
1001 <p>Click on an image to view it in the image viewer</p>
1002 <ul class="thumbnails">
1003 [% FOREACH image IN localimages %]
1005 <li id="imagenumber-[% image.imagenumber | html %]" class="thumbnail">
1006 <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]">
1007 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" />
1009 [% IF CAN_user_tools_upload_local_cover_images %]
1010 <a href="#" class="remove"><i class="fa fa-trash"></i> Delete image</a>
1016 [% ELSE # - No image passed JavaScript takes care %]
1017 <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span>
1019 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1020 <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>
1026 [% IF ( HTML5MediaEnabled ) %]
1027 <div role="tabpanel" class="tab-pane" id="html5media">
1028 [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
1030 [% IF HTML5MediaSet.is_youtube %]
1031 <iframe id="player" width="640" height="360" src="[% HTML5MediaSet.srcblock | url %]"></iframe>
1033 <[% HTML5MediaParent | html %] controls preload=none>
1034 <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
1035 [[% HTML5MediaParent | html %] tag not supported by your browser.]
1036 </[% HTML5MediaParent | html %]>
1044 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
1045 <div role="tabpanel" class="tab-pane" id="NovelistSelect" class="novelistSelect">
1046 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
1050 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
1051 <div role="tabpanel" class="tab-pane" id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
1052 [% plugins_intranet_catalog_biblio_tab.content | $raw %]
1056 </div><!-- /tab-content -->
1057 </div><!-- /bibliodetails -->
1059 <div id="export" style="margin-top: 1em;">
1060 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
1062 <th>Save record</th> </tr>
1063 <tr><td> Select download format: <select name="format">
1064 <option value="mods">MODS (XML)</option>
1065 <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
1066 <option value="marcxml">MARCXML</option>
1067 <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1068 <option value="utf8">MARC (Unicode/UTF-8)</option> </select>
1069 <input type="submit" name="save" value="Download record" /></td>
1072 <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
1078 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
1079 <div class="modal-dialog modal-lg">
1080 <div class="modal-content">
1081 <div class="modal-header">
1082 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1083 <h3 id="marcPreviewLabel">MARC preview</h3>
1085 <div class="modal-body">
1086 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
1088 <div class="modal-footer">
1089 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1096 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1098 <div class="col-sm-2 col-sm-pull-10">
1100 [% INCLUDE 'biblio-view-menu.inc' %]
1102 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1103 </div> <!-- /.row -->
1107 <div class="modal fade" id="modal-item-group-create" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-create-label">
1108 <div class="modal-dialog">
1109 <div class="modal-content">
1110 <div class="modal-header">
1111 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1112 <h3 id="modal-item-group-create-label"><i class="fa fa-plus"></i> Create a new item group</h3>
1114 <form id="modal-item-group-create-form" class="validated">
1115 <div class="modal-body">
1118 <label for="item_group_description" class="required">Name: </label>
1119 <input name="description" id="modal-item-group-create-form-description" type="text" size="30" required="required" class="required" />
1120 <span class="required">Required</span>
1123 <label for="item_group_display_order" class="required">Display order: </label>
1124 <input name="display_order" id="modal-item-group-create-form-display_order" value="0" size="5" required="required" class="required" />
1125 <span class="required">Required</span>
1127 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1131 <div class="modal-footer">
1132 <button id="modal-item-group-create-submit" class="btn btn-default"><i class="fa fa-plus"></i> Submit</button>
1133 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1140 <div class="modal fade" id="modal-item-group-edit" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-edit-label">
1141 <div class="modal-dialog">
1142 <div class="modal-content">
1143 <div class="modal-header">
1144 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1145 <h3 id="modal-item-group-edit-label"><i class='fa fa-edit'></i> Edit item group</h3>
1147 <form id="modal-item-group-edit-form" class="validated">
1148 <div class="modal-body">
1151 <label for="item_group_description" class="required">Name: </label>
1152 <input name="description" id="modal-item-group-edit-form-description" type="text" size="30" required="required" class="required" />
1153 <span class="required">Required</span>
1156 <label for="item_group_display_order" class="required">Sort order: </label>
1157 <input name="display_order" id="modal-item-group-edit-form-display_order" size="5" />
1158 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1162 <div class="modal-footer">
1163 <button id="modal-item-group-edit-submit" class="btn btn-default"><i class='fa fa-edit'></i> Submit</button>
1164 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1171 <div class="modal fade" id="modal-item-group-delete" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-delete-label">
1172 <div class="modal-dialog">
1173 <div class="modal-content">
1174 <div class="modal-header">
1175 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1176 <h3 id="modal-item-group-delete-label"><i class='fa fa-trash'></i> Delete item group</h3>
1178 <div class="modal-body">
1179 Are you sure you want to delete this item group?
1181 <div class="modal-footer">
1182 <button id="modal-item-group-delete-submit" class="btn btn-danger"><i class='fa fa-trash'></i> Delete</button>
1183 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1189 <div class="modal fade" id="modal-item-group-set" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-set-label">
1190 <div class="modal-dialog">
1191 <div class="modal-content">
1192 <div class="modal-header">
1193 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1194 <h3 id="modal-item-group-set-label"><i class='fa fa-book'></i> Set item group for items</h3>
1196 <form id="modal-item-group-set-form" class="validated">
1197 <div class="modal-body">
1200 <label for="item_group" class="required">Item group: </label>
1201 <select name="item_group" id="item-group-add-form-select">
1202 [% FOREACH ig IN biblio.item_groups %]
1203 <option value="[% ig.id | html %]">[% ig.description | html %]</option>
1206 <span class="required">Required</span>
1210 <div class="modal-footer">
1211 <button id="modal-item-group-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set item group</button>
1212 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1219 <div class="modal fade" id="modal-item-group-unset" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-unset-label">
1220 <div class="modal-dialog">
1221 <div class="modal-content">
1222 <div class="modal-header">
1223 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1224 <h3 id="modal-item-group-unset-label"><i class='fa fa-unlink'></i> Remove item from item group</h3>
1226 <div class="modal-body">
1227 Are you sure you want to remove these item(s) from their item group(s)?
1229 <div class="modal-footer">
1230 <button id="modal-item-group-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button>
1231 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1237 [% IF bundlesEnabled %]
1238 <div class="modal" id="addToBundleModal" tabindex="-1" role="dialog" aria-labelledby="addToBundleLabel">
1239 <form id="addToBundleForm" action="">
1240 <div class="modal-dialog" role="document">
1241 <div class="modal-content">
1242 <div class="modal-header">
1243 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1244 <h3 id="addToBundleLabel">Add to bundle</h3>
1246 <div class="modal-body">
1247 <div id="addResult"></div>
1248 <fieldset class="rows">
1251 <label class="required" for="external_id">Item barcode: </label>
1252 <input type="text" id="external_id" name="external_id" required="required">
1253 <span class="required">Required</span>
1258 <div class="modal-footer">
1259 <button type="submit" class="btn btn-default">Submit</button>
1260 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1267 <div class="modal" id="removeFromBundleModal" tabindex="-1" role="dialog" aria-labelledby="removeFromBundleLabel">
1268 <form id="removeFromBundleForm" action="">
1269 <div class="modal-dialog" role="document">
1270 <div class="modal-content">
1271 <div class="modal-header">
1272 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1273 <h3 id="removeFromBundleLabel">Remove from bundle</h3>
1275 <div class="modal-body">
1276 <div id="removeResult"></div>
1277 <fieldset class="rows">
1280 <label class="required" for="external_id">Item barcode: </label>
1281 <input type="text" id="rm_external_id" name="external_id" required="required">
1282 <span class="required">Required</span>
1287 <div class="modal-footer">
1288 <button type="submit" class="btn btn-default">Submit</button>
1289 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1297 [% MACRO jsinclude BLOCK %]
1298 [% INCLUDE 'catalog-strings.inc' %]
1299 [% Asset.js("js/catalog.js") | $raw %]
1300 [% Asset.js("js/recalls.js") | $raw %]
1301 [% Asset.js("js/coce.js") | $raw %]
1302 [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1304 var interface = "[% interface | html %]";
1305 var theme = "[% theme | html %]";
1306 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
1307 function verify_cover_images() {
1308 // Loop over each container in the template which contains covers
1309 $(".cover-slider").each(function(){
1310 var lightbox_descriptions = [];
1311 $(this).find(".cover-image").each( function( index ){
1313 // Find the image in the container
1314 var img = div.find("img")[0];
1315 if( $(img).length > 0 ){
1316 var description = "";
1317 if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){
1318 // No image loaded in the container. Remove the slide
1321 // All slides start hidden. If this is the first one, show it.
1325 // Check if Amazon image is present
1326 if ( div.attr("id") == "amazon-bookcoverimg" ) {
1329 if ((w == 1) || (h == 1)) {
1330 // Amazon returned single-pixel placeholder
1331 // Remove the container
1334 lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1336 } else if( div.attr("id") == "custom-coverimg" ){
1337 if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1338 // No image was loaded via the CustomCoverImages system preference
1339 // Remove the container
1342 lightbox_descriptions.push("Custom cover image");
1344 } else if ( div.attr("id") == "syndetics-bookcoverimg" ){
1345 lightbox_descriptions.push(_("Syndetics cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1347 else if( div.hasClass("coce-coverimg" ) ){
1348 // Identify which service's image is being loaded by Coce
1349 var coce_description;
1350 if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1351 coce_description = ("Coce image from Amazon.com");
1352 } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1353 coce_description = _("Coce image from Google Books");
1354 } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1355 coce_description = _("Coce image from Open Library");
1357 div.find(".hint").html(coce_description);
1358 lightbox_descriptions.push(coce_description);
1359 } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1360 lightbox_descriptions.push(_("Local cover image (<a href='%s'>edit</a>)").format($(img).data('link')));
1362 lightbox_descriptions.push(_("Cover image source unknown"));
1368 // Lightbox for cover images
1369 Chocolat(this.querySelectorAll('.cover-image a'), {
1370 description: function(){
1371 return lightbox_descriptions[this.settings.currentImageIndex];
1377 $(".cover-slider").each(function(){
1378 var coverSlide = this;
1379 var coverImages = $(this).find(".cover-image");
1380 if( coverImages.length > 1 ){
1381 coverImages.each(function( index ){
1382 // If more that one image is present, add a navigation link
1383 // for activating the slide
1384 var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1386 // Set the first navigation link as active
1387 $(covernav).addClass("nav-active");
1389 $(covernav).html("<i class=\"fa fa-circle\"></i>");
1390 $(coverSlide).append( covernav );
1394 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
1395 && $(coverSlide).find(".cover-image:visible").length < 1 ){
1396 $(coverSlide).remove();
1398 $(coverSlide).addClass("cover-slides");
1402 $("#editions img").each(function(i){
1403 if ( this.src.indexOf('amazon.com') >= 0 ) {
1406 if ((w == 1) || (h == 1)) {
1407 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1408 } else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) {
1409 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1415 function removeLocalImage(imagenumber) {
1416 var thumbnail = $("#imagenumber-" + imagenumber );
1417 var copy = thumbnail.html();
1418 thumbnail.find("img").css("opacity", ".2");
1419 thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
1421 url: "/cgi-bin/koha/svc/cover_images?action=delete&imagenumber=" + imagenumber,
1422 success: function(data) {
1423 $(data).each( function(i) {
1424 if ( this.deleted == 1 ) {
1427 thumbnail.html( copy );
1428 alert(_("An error occurred on deleting this image"));
1430 if ( $('ul.thumbnails > li').length == 0 ) {
1431 showNoImageMessage();
1435 error: function(data) {
1436 thumbnail.html( copy );
1437 alert(_("An error occurred on deleting this image"));
1442 function showNoImageMessage() {
1443 var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
1444 no_images_msg = '<p>' + no_images_msg + '</p>';
1445 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1446 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>");
1447 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
1449 $('#images').html(no_images_msg);
1452 [% IF StaffDetailItemSelection %]
1453 function itemSelectionBuildDeleteLink(div) {
1454 var itemnumbers = new Array();
1455 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1456 itemnumbers.push($(this).val());
1458 if (itemnumbers.length > 0) {
1459 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
1460 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1461 url += '&biblionumber=[% biblionumber | uri %]';
1462 url += '&src=CATALOGUING';
1463 $('a.itemselection_action_delete').attr('href', url);
1470 function itemSelectionBuildModifyLink(div) {
1471 var itemnumbers = new Array();
1472 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1473 itemnumbers.push($(this).val());
1475 if (itemnumbers.length > 0) {
1476 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
1477 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1478 url += '&biblionumber=[% biblionumber | uri %]';
1479 url += '&src=CATALOGUING';
1480 $('a.itemselection_action_modify').attr('href', url);
1487 function itemSelectionBuildActionLinks(tab) {
1488 var div = $("#" + tab);
1489 var delete_link_ok = itemSelectionBuildDeleteLink(div);
1490 var modify_link_ok = itemSelectionBuildModifyLink(div);
1491 if (modify_link_ok || delete_link_ok) {
1492 $('.itemselection_actions', div).show();
1494 $('.itemselection_actions', div).hide();
1498 $(document).ready(function() {
1499 $('table.items_table').each(function() {
1500 var div = $(this).parent().attr("id");
1501 itemSelectionBuildActionLinks(div);
1504 $("input[name='itemnumber'][type='checkbox']").change(function() {
1505 var div = $(this).parents('table').parent().parent().attr("id");
1506 itemSelectionBuildActionLinks(div);
1509 $(".SelectAll").on("click",function(e){
1511 var tab = $(this).data("tab");
1512 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
1513 itemSelectionBuildActionLinks(tab);
1516 $(".ClearAll").on("click",function(e){
1518 var tab = $(this).data("tab");
1519 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1520 itemSelectionBuildActionLinks(tab);
1525 $(document).ready(function() {
1526 // Pick details tab to display by default
1528 [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
1529 $(".nav-tabs a[href='#html5media']").tab("show");
1530 [% ELSIF ComponentParts && ComponentParts.size %]
1531 $(".nav-tabs a[href='#components']").tab("show");
1533 $(".nav-tabs a[href='#holdings']").tab("show");
1536 $(".nav-tabs a[href='#holdings']").tab("show");
1538 $('#search-form').focus();
1539 $('.thumbnails > li > .remove').click(function() {
1540 var result = confirm(_("Are you sure you want to delete this cover image?"));
1542 if ( result == true ) {
1543 var imagenumber = $(this).parent().attr('id').split('-')[1];
1544 removeLocalImage(imagenumber);
1549 [% IF ( IntranetCoce && CoceProviders ) %]
1550 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
1553 $("body").on("click",".previewMARC", function(e){
1555 var page = $(this).attr("href");
1556 $("#marcPreview .modal-body").load(page + " table");
1557 $('#marcPreview').modal({show:true});
1559 $("#marcPreview").on("hidden.bs.modal", function(){
1560 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
1562 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1563 novSelect.loadContentForQuery({
1564 ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1565 ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1568 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
1569 '[% Koha.Preference('NovelistSelectPassword') | html %]',
1571 if ( d.length > 0 ){ //If no content
1572 $(".NovelistSelect").show();
1576 $(".print-label").on("click", function(e){
1578 link = $(this).attr("href");
1579 openWindow(link,"Print spine label",400,400);
1581 $(".cover-slider").on("click",".cover-nav", function(e){
1583 var cover_slider = $(this).parent();
1584 // Adding click handler for cover image navigation links
1585 var num = $(this).data("num");
1586 $(cover_slider).find(".cover-nav").removeClass("nav-active");
1587 $(this).addClass("nav-active");
1588 $(cover_slider).find(".cover-image").hide();
1589 $(cover_slider).find(".cover-image").eq( num ).show();
1593 $(window).load(function() {
1594 verify_cover_images();
1597 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1598 <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1600 [% INCLUDE 'datatables.inc' %]
1601 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1602 [% INCLUDE 'columns_settings.inc' %]
1603 [% INCLUDE 'js-date-format.inc' %]
1604 [% INCLUDE 'js-patron-format.inc' %]
1605 [% INCLUDE 'js-biblio-format.inc' %]
1606 [% Asset.js("js/browser.js") | $raw %]
1607 [% Asset.js("js/table_filters.js") | $raw %]
1610 browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1613 [% IF bundlesEnabled %]
1614 var bundle_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','bundle_tables','json') | $raw %];
1615 var bundle_lost_value = [% Koha.Preference('BundleLostValue') | html %];
1617 $(document).ready(function() {
1619 [% IF bundlesEnabled %] // Bundle handling
1620 function createChild ( row, itemnumber, duedate ) {
1623 var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>');
1624 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>');
1625 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>');
1627 // Disable management if there's a duedate
1629 bundle_toolbar.children('.btn').addClass("disabled");
1632 // This is the table we'll convert into a DataTable
1633 var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>');
1635 // Display it the child row
1636 row.child( bundle_toolbar.add(bundles_table), 'bundle' ).show();
1638 // Initialise as a DataTable
1639 var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?";
1640 var bundle_table = bundles_table.kohaTable({
1642 "url": bundle_table_url
1644 "header_filter": false,
1647 "return_claim.patron"
1649 "order": [[ 1, "asc" ]],
1651 "targets": [0,1,2,3],
1652 "render": function (data, type, row, meta) {
1653 if ( data && type == 'display' ) {
1654 return data.escapeHtml();
1661 "data": "biblio.title:biblio.subtitle:biblio.medium",
1662 "title": _("Title"),
1665 "render": function(data, type, row, meta) {
1666 return $biblio_to_html(row.biblio, { link: 1 });
1670 "data": "biblio.author",
1671 "title": _("Author"),
1676 "data": "callnumber",
1677 "title": _("Callnumber"),
1682 "data": "external_id",
1683 "title": _("Barcode"),
1688 "data": "lost_status:last_seen_date:return_claim.patron",
1689 "title": _("Status"),
1690 "searchable": false,
1692 "render": function(data, type, row, meta) {
1693 if ( row.lost_status == bundle_lost_value ) {
1694 let out = '<span class="lost">' + _("Last seen") + ': ' + $date(row.last_seen_date) + '</span>';
1695 if ( row.return_claim ) {
1696 out = out + '<span class="claims_return">' + _("Claims returned by") + ': ' + $patron_to_html( row.return_claim.patron, { display_cardnumber: false, url: true } ) + '</span>';
1700 else if ( row.lost_status !== 0 ) {
1701 return '<span class="lost">' + _("Lost") + ': ' + row.lost_status + '</span>';
1703 return '<span class="available">' + _("Present") + '</span>';
1707 "data": function( row, type, val, meta ) {
1710 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';
1712 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';
1716 "title": _("Actions"),
1717 "searchable": false,
1722 }, bundle_settings, 1);
1723 $(".tbundle").on("click", ".remove:not(.disabled)", function(){
1724 var bundle_table = $(this).closest('table');
1725 var host_itemnumber = bundle_table.data('itemnumber');
1726 var component_itemnumber = $(this).data('itemnumber');
1727 var unlink_item_url = "/api/v1/items/" + host_itemnumber + "/bundled_items/" + component_itemnumber;
1730 url: unlink_item_url,
1731 success: function(){
1732 bundle_table.DataTable({ 'retrieve': true }).draw(false);
1741 var bundle_form_active;
1742 $("#addToBundleModal").on("shown.bs.modal", function(e){
1743 var button = $(e.relatedTarget);
1744 var item_id = button.data('item');
1745 $("#addResult").replaceWith('<div id="addResult"></div>');
1746 $("#addToBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items');
1747 $("#external_id").focus();
1749 bundle_form_active = item_id;
1752 $("#addToBundleForm").submit(function(event) {
1754 /* stop form from submitting normally */
1755 event.preventDefault();
1757 /* get the action attribute from the <form action=""> element */
1758 var $form = $(this),
1759 url = $form.attr('action');
1761 /* Send the data using post with external_id */
1762 var posting = $.post({
1764 data: JSON.stringify({ external_id: $('#external_id').val()}),
1765 contentType: "application/json; charset=utf-8",
1769 /* Report the results */
1770 posting.done(function(data) {
1771 var barcode = $('#external_id').val();
1772 $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">'+_("Success: Added '%s'").format(barcode)+'</div>');
1773 $('#external_id').val('').focus();
1776 posting.fail(function(data) {
1777 var barcode = $('#external_id').val();
1778 if ( data.status === 409 ) {
1779 var response = data.responseJSON;
1780 if ( response.key === "PRIMARY" ) {
1781 $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1783 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
1785 } else if ( data.status === 404 ) {
1786 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
1788 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
1790 $('#external_id').val('').focus();
1794 $("#addToBundleModal").on("hidden.bs.modal", function(e){
1795 if ( bundle_changed ) {
1796 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
1798 bundle_form_active = 0;
1802 $("#removeFromBundleModal").on("shown.bs.modal", function(e){
1803 var button = $(e.relatedTarget);
1804 var item_id = button.data('item');
1805 $("#removeResult").replaceWith('<div id="removeResult"></div>');
1806 $("#removeFromBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items/');
1807 $("#rm_external_id").focus();
1809 bundle_form_active = item_id;
1812 $("#removeFromBundleForm").submit(function(event) {
1814 /* stop form from submitting normally */
1815 event.preventDefault();
1817 /* get the action attribute from the <form action=""> element */
1818 var $form = $(this),
1819 url = $form.attr('action');
1821 var barcode = $('#rm_external_id').val();
1823 /* Fetch itemnumber using rm_external_id */
1824 var itemReq = $.get('/api/v1/items', { q: JSON.stringify({
1825 external_id: barcode
1826 }) }, null, "json");
1829 itemReq.done(function(data) {
1830 if (data.length === 1) {
1831 itemnumber = data[0].item_id;
1833 /* Remove link using fetch itemnumber */
1834 var deleteReq = $.ajax( url + itemnumber, {
1838 /* Report the results */
1839 deleteReq.done(function(data) {
1840 var barcode = $('#rm_external_id').val();
1841 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed '%s'").format(barcode)+'</div>');
1842 $('#rm_external_id').val('').focus();
1845 deleteReq.fail(function(data) {
1846 var barcode = $('#rm_external_id').val();
1847 if ( data.status === 409 ) {
1848 var response = data.responseJSON;
1849 if ( response.key === "PRIMARY" ) {
1850 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1852 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
1854 } else if ( data.status === 404 ) {
1855 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
1857 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
1859 $('#rm_external_id').val('').focus();
1862 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'</div>');
1865 itemReq.fail(function(data) {
1866 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found '%s'").format(barcode)+'</div>');
1867 $('#rm_external_id').val('').focus();
1872 $("#removeFromBundleModal").on("hidden.bs.modal", function(e){
1873 if ( bundle_changed ) {
1874 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
1876 bundle_form_active = 0;
1879 // End bundle handling
1882 var table_names = [ 'holdings_table', 'otherholdings_table' ];
1883 var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ];
1884 var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ];
1885 table_names.forEach( function( table_name, index ) {
1886 if ( !has_images[index] ) {
1887 table_settings[index].columns.splice(1,1);
1889 var dt_parameters = {
1892 'bAutoWidth': false,
1893 "bKohaColumnsUseNames": true,
1894 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1896 var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' );
1898 [% IF bundlesEnabled %]
1899 // Add event listener for opening and closing bundle details
1900 $('#' + table_name + ' tbody').on('click', 'button.details-control', function () {
1901 var button = $(this);
1902 var tr = button.closest('tr');
1903 var dTable = button.closest('table').DataTable({ 'retrieve': true });
1905 var itemnumber = tr.data('itemnumber');
1906 var duedate = tr.data('duedate');
1907 var row = dTable.row( tr );
1909 if ( row.child.isShown() ) {
1910 // This row is already open - close it
1912 tr.removeClass('shown');
1913 button.removeClass('active');
1917 createChild(row, itemnumber, duedate);
1918 tr.addClass('shown');
1919 button.addClass('active');
1925 [% IF Koha.Preference('AcquisitionDetails') %]
1926 var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
1927 var acquisitiondetails_table = KohaTable("orders", {
1928 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1930 'bAutoWidth': false,
1931 "aaSorting": [[ 4, "desc" ]],
1935 [% IF suggestions.count %]
1936 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
1938 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
1939 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
1941 "sPaginationType": "full"
1948 $(document).ready(function() {
1949 var search_index = localStorage.getItem("cat_search_pulldown_selection");
1950 var search_value = localStorage.getItem("searchbox_value");
1951 if ( search_index ){ $('#cat-search-block select.advsearch').val(search_index)};
1952 if ( search_value ){ $('#cat-search-block #search-form').val(search_value)};
1956 [% IF Koha.Preference('EnableItemGroups') %]
1957 // Load item groups table
1958 var itemGroupsTable = KohaTable("items-group-table", {
1959 "bAutoWidth": false,
1960 'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
1963 "mDataProp": function( oObj ) {
1964 return oObj.display_order;
1968 "mDataProp": function( oObj ) {
1969 return oObj.description;
1973 "mDataProp": function( oObj ) {
1974 [% IF CAN_user_editcatalogue_manage_item_groups %]
1975 return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1976 <i class='fa fa-edit'></i> ${_("Edit")}
1979 + `<button class='item-group-delete btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1980 <i class='fa fa-trash'></i> ${('Delete')}
1989 "bProcessing": true,
1990 "bServerSide": false,
1991 "sAjaxSource": `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1`,
1992 "sAjaxDataProp": "",
1993 "fnServerData": function ( sSource, aoData, fnCallback ) {
1994 $.getJSON( sSource, aoData, function (json) {
2000 // Create new item groups
2001 $('.item-group-create').on('click', function(){
2002 $('#modal-item-group-create-form-description').val("");
2003 $('#modal-item-group-create-submit').removeAttr('disabled');
2004 $('#modal-item-group-create').modal('show');
2007 $("#modal-item-group-create-form").validate({
2008 submitHandler: function(form) {
2010 url: `/api/v1/biblios/${biblionumber}/item_groups`,
2011 headers: { "x-koha-embed": "items" },
2012 success: function(item_groups){
2013 $('#modal-item-group-create-submit').attr('disabled', 'disabled');
2016 "url": `/api/v1/biblios/${biblionumber}/item_groups`,
2019 "Content-Type": "application/json"
2021 "data": JSON.stringify(
2023 "description": $("#modal-item-group-create-form-description").val(),
2024 "display_order": $("#modal-item-group-create-form-display_order").val(),
2030 .done(function (response) {
2031 $('#item-group-add-form-select').append($('<option>', {
2032 value: response.item_group_id,
2033 text: response.description
2036 $('#modal-item-group-create').modal('hide');
2037 if ( item_groups.length == 0 ) {
2038 // This bib has no previous item groups, reload the page
2039 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2041 // Has other item groups, just reload the table
2042 itemGroupsTable.api().ajax.reload();
2045 .fail(function(err) {
2046 var message = err.responseJSON.error;
2054 $('#modal-item-group-create').on('shown.bs.modal', function () {
2055 $('#modal-item-group-create-form-description').focus();
2058 // Edit existing item groups
2059 $('body').on( 'click', '.item-group-edit', function(){
2060 const item_group_id = $(this).data('item-group-id');
2061 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2062 $.get( url, function( data ) {
2063 $('#modal-item-group-edit-form-description').val( data.description );
2064 $('#modal-item-group-edit-form-display_order').val( data.display_order );
2065 $('#modal-item-group-edit-submit').data('item-group-id', item_group_id );
2066 $('#modal-item-group-edit-submit').removeAttr('disabled');
2067 $('#modal-item-group-edit').modal('show');
2071 $("#modal-item-group-edit-form").validate({
2072 submitHandler: function(form) {
2073 $('#modal-item-group-edit-submit').attr('disabled', 'disabled');
2075 const item_group_id = $('#modal-item-group-edit-submit').data('item-group-id');
2076 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2082 "Content-Type": "application/json"
2084 "data": JSON.stringify(
2086 "description": $("#modal-item-group-edit-form-description").val(),
2087 "display_order": $("#modal-item-group-edit-form-display_order").val(),
2093 .done(function (response) {
2094 $('#modal-item-group-edit').modal('hide');
2095 itemGroupsTable.api().ajax.reload();
2097 .fail(function(err) {
2098 var message = err.responseJSON.error;
2104 $('#modal-item-group-edit').on('shown.bs.modal', function () {
2105 $('#modal-item-group-edit-form-description').focus();
2108 // Delete existing item groups
2109 $('body').on( 'click', '.item-group-delete', function(){
2110 const item_group_id = $(this).data('item-group-id');
2111 $('#modal-item-group-delete-submit').data('item-group-id', item_group_id );
2112 $('#modal-item-group-delete-submit').removeAttr('disabled');
2113 $('#modal-item-group-delete').modal('show');
2115 $("#modal-item-group-delete-submit").on('click', function(){
2116 $('#modal-item-group-delete-submit').attr('disabled', 'disabled');
2117 const item_group_id = $("#modal-item-group-delete-submit").data('item-group-id');
2120 url: `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2121 headers: { "x-koha-embed": "items" },
2122 success: function(item_group_data){
2124 "url": `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2127 .done(function (response) {
2128 $('#modal-item-group-delete').modal('hide');
2129 $(`#item-group-add-form-select option[value='${item_group_id}']`).remove();
2130 if ( item_group_data.items === null ) {
2131 // No items for this item group, we can just refresh the table
2132 itemGroupsTable.api().ajax.reload();
2134 // This item group had items attached to it, we need to reload the page
2135 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2138 .fail(function(err) {
2139 var message = err.responseJSON.error;
2146 // Add item(s) to a item group
2147 $('.itemselection_action_item_group_set').on('click', function(){
2148 $('#modal-item-group-set').modal('show');
2151 $("#modal-item-group-set-form").validate({
2152 submitHandler: function(form) {
2153 $('#modal-item-group-set-submit').attr('disabled', 'disabled');
2155 const item_group_id = $('#item-group-add-form-select').val();
2157 let itemnumbers = new Array();
2158 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2159 const itemnumber = $(this).val();
2160 itemnumbers.push( itemnumber );
2162 if (itemnumbers.length > 0) {
2163 let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_item_group';
2164 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2165 url += '&biblionumber=[% biblionumber | uri %]';
2166 url += `&item_group_id=${item_group_id}`;
2168 window.location.replace(url);
2171 $('#modal-item-group-set').modal('hide');
2175 // Remove item(s) from an item group
2176 $('.itemselection_action_item_group_unset').on('click', function(){
2177 $('#modal-item-group-unset').modal('show');
2180 $("#modal-item-group-unset-submit").on('click', function(){
2181 $('#modal-item-group-unset-submit').attr('disabled', 'disabled');
2183 let itemnumbers = new Array();
2184 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2185 const itemnumber = $(this).val();
2186 itemnumbers.push( itemnumber );
2188 if (itemnumbers.length > 0) {
2189 let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_item_group';
2190 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2191 url += '&biblionumber=[% biblionumber | uri %]';
2193 window.location.replace(url);
2196 $('#modal-item-group-unset').modal('hide');
2202 [% INCLUDE 'intranet-bottom.inc' %]