7 [% USE AuthorisedValues %]
12 [% USE TablesSettings %]
13 [% PROCESS 'i18n.inc' %]
14 [% SET CoverImagePlugins = KohaPlugins.get_plugins_intranet_cover_images %]
16 [% IF Koha.Preference('AmazonAssocTag') %]
17 [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
19 [% AmazonAssocTag = '' %]
22 [% ShowCourseReserves = 0 | html %]
23 [% IF UseCourseReserves %]
24 [% FOREACH item IN itemloop %]
25 [% IF item.course_reserves %]
26 [% FOREACH r IN item.course_reserves %]
27 [% IF r.course.enabled == 'yes' %]
28 [% ShowCourseReserves = 1 | html %]
35 [% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %]
37 [% SET footerjs = 1 %]
38 [% INCLUDE 'doc-head-open.inc' %]
39 <title>[% FILTER collapse %]
40 [% IF ( unknownbiblionumber ) %]
41 [% t("Unknown record") | html %]
43 [% title_in_title = INCLUDE 'biblio-title-head.inc' %]
44 [% tx("Details for {title}", { title = title_in_title }) | html %]
46 [% t("Catalog") | html %] ›
47 [% t("Koha") | html %]
49 [% Asset.css("lib/Chocolat/css/chocolat.css") | $raw %]
50 [% INCLUDE 'doc-head-close.inc' %]
53 <body id="catalog_detail" class="catalog">
55 [% WRAPPER 'header.inc' %]
56 [% INCLUDE 'cat-search.inc' %]
59 [% WRAPPER 'sub-header.inc' %]
60 [% WRAPPER breadcrumbs %]
61 [% WRAPPER breadcrumb_item %]
62 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
65 [% IF ( unknownbiblionumber ) %]
66 [% WRAPPER breadcrumb_item bc_active= 1 %]
67 <span>Unknown record</span>
70 [% WRAPPER breadcrumb_item %]
71 [% INCLUDE 'biblio-title.inc' link = 1 %]
73 [% WRAPPER breadcrumb_item bc_active= 1 %]
77 [% END #/ WRAPPER breadcrumbs %]
78 [% END #/ WRAPPER sub-header.inc %]
80 <div class="main container-fluid">
82 <div class="col-sm-10 col-sm-push-2">
84 [% INCLUDE 'messages.inc' %]
87 [% IF ( unknownbiblionumber ) %]
88 <div class="dialog message">The record you requested does not exist ([% biblionumber | html %]).</div>
91 [% IntranetCoce = Koha.Preference('IntranetCoce') %]
92 [% CoceProviders = Koha.Preference('CoceProviders') %]
93 [% CoceHost = Koha.Preference('CoceHost') %]
94 [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
96 [% INCLUDE 'cat-toolbar.inc' %]
98 <!-- COinS / OpenURL -->
99 <span class="Z3988" title="[% ocoins | html %]"></span>
102 [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
103 <div id="catalogue_detail_biblio" class="col-xs-9">
105 <div id="catalogue_detail_biblio" class="col-xs-12">
107 [% IF decoding_error || analytics_error %]
108 <div class="page-section bg-danger">
109 <h1>Errors found</h1>
110 [% IF decoding_error %]
111 <h2>Encoding errors</h2>
112 <p class="biberror">There is at least one encoding error with this bibliographic record, the view may be degraded.</p>
113 <pre class="error">[% decoding_error | html %]</pre>
115 [% IF analytics_error %]
116 <h2>Analytics errors</h2>
117 <p class="analytics_error">There was an error searching for analytic records, please see the logs for details.</p>
122 <div class="page-section">
124 [% XSLTBloc | $raw %]
126 [% IF shelves.count %]
127 <span class="results_summary"><span class="label">Lists that include this title: </span>
128 [% FOREACH s IN shelves %]
129 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a>
130 [% IF ( loop.last ) %][% ELSE %]|[% END %]
134 [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %]
135 <span class="results_summary"><span class="label">Tags:</span>
136 [% FOREACH TagLoo IN TagLoop %]
137 [% IF ( CAN_user_tools_moderate_tags ) %]
138 <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |uri %]">[% TagLoo.term | html %]</a>
140 [% TagLoo.term | html %]
142 <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
146 <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>
147 <span id="catalogue_detail_framework" class="results_summary">
148 <span class="label">MARC framework:</span>
149 <span class="frameworkcode">[% Frameworks.GetName(biblio.frameworkcode) | html %]</span>
151 [% IF !item_level_itypes || Koha.Preference("BiblioItemtypeInfo") %]
152 <span class="results_summary itemtype"><span class="label">Itemtype:</span>
153 [% IF ( !noItemTypeImages && imageurl ) %]
154 <img src="[% imageurl | html %]" alt="" />
156 [% IF ( description ) %]
157 <span class="itypetext">[% description | html %]</span>
159 <span class="itypetext">[% itemtype | html %]</span>
164 [% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' ) %]
165 <span id="catalogue_detail_elastic_record" class="results_summary"><span class="label">Elasticsearch record:</span> <a href="/cgi-bin/koha/catalogue/showelastic.pl?id=[% biblionumber | uri %]" title="Elasticsearch record" class="previewElastic">Show</a></span>
168 [% IF ( holdcount ) %]
169 <span class="results_summary">
170 <span class="label">Holds:</span>
171 <span class="number_box">
172 [% IF CAN_user_reserveforothers_place_holds %]
173 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber | uri %]">[% holdcount | html %]</a>
175 <span>[% holdcount | html %]</span>
181 [% IF illrequests.count %]
182 <span class="results_summary">
183 <span class="label">ILL requests:</span>
184 [% IF CAN_user_ill %]
185 [% FOREACH ill IN illrequests %]
186 <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 %]
189 [% FOREACH ill IN illrequests %]
190 <span>Request [% ill.illrequest_id | html %]</span>[% IF ! loop.last %], [% END %]
196 [% IF ( article_requests_count = biblio.article_requests.filter_by_current.count ) %]
197 <span class="results_summary">
198 <span class="label">Article requests:</span>
199 <span class="number_box">
200 <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | uri %]">[% article_requests_count | html %]</a>
205 [% IF course_reserves %]
206 <span class="results_summary"><span class="label">Courses that have reserved this title: </span>
207 [% FOREACH c IN course_reserves %]
208 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% c.course_id | uri %]">[% c.course.course_name | html %]</a>
209 [% IF ( loop.last ) %][% ELSE %]|[% END %]
213 </div> [%# .page-section %]
215 [% IF ( CoverImagePlugins || AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
217 <div class="col-xs-3 bookcoverimg">
218 <div id="biblio-cover-slider" class="cover-slider" data-isbn="[% normalized_isbn | html %]">
219 [% IF ( LocalCoverImages ) %]
220 [% IF localimages.count %]
221 [% FOREACH image IN localimages %]
222 <div class="cover-image local-coverimg">
223 <a href="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
224 <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 %]" />
226 <div class="hint">Local cover image</div>
232 [% IF ( AmazonCoverImages && normalized_isbn) %]
233 <div class="cover-image" id="amazon-bookcoverimg">
234 <a href="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.LZZZZZZZ.jpg" title="Amazon cover image">
235 <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"/>
237 <div class="hint">Image from Amazon.com</div>
241 [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
242 [% coce_id = normalized_ean || normalized_isbn %]
243 <div class="cover-image coce-coverimg">
245 <a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a>
247 <span class="no-image">No cover image available</span>
249 <div class="hint">Image from Coce</div>
253 [% IF ( SyndeticsCovers ) %]
254 [% IF ( content_identifier_exists ) %]
255 <div class="cover-image" id="syndetics-bookcoverimg">
256 <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">
257 <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" />
259 <div class="hint">Image from Syndetics</div>
262 <span class="no-image">No cover image available</span>
266 [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
267 [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
268 [% IF custom_cover_image_url %]
269 <div class="cover-image" id="custom-coverimg">
270 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]" title="Custom cover image">
271 <img id="custom-img" alt="Custom cover image" src="[% custom_cover_image_url | url %]" />
273 <div class="hint">Custom cover image</div>
277 </div> <!-- /.cover-slider -->
278 </div> <!-- /.bookcoverimg.col-xs-3 -->
280 </div> <!-- /.col-xs-* -->
281 [% END # /IF ( AmazonCoverImages, etc ) %]
284 <div id="bibliodetails" class="toptabs">
286 <ul class="nav nav-tabs" role="tablist">
287 [% IF (SeparateHoldings) %]
288 <li role="presentation">
289 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">[% Branches.GetLoggedInBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
291 <li role="presentation">
292 <a href="#otherholdings" aria-controls="otherholdings" role="tab" data-toggle="tab">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
295 <li role="presentation">
296 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">Holdings ([% itemloop.size() || 0 | html %])</a>
299 [% IF Koha.Preference('EnableItemGroups') %]
300 <li role="presentation">
301 <a href="#item_groups" aria-controls="item_groups" role="tab" data-toggle="tab">Item groups</a>
304 [% 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 %]
305 [% 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 %]
306 [% IF ( subscriptionsnumber ) %]<li role="presentation"><a href="#subscriptions" aria-controls="subscriptions" role="tab" data-toggle="tab">Subscriptions</a></li>[% END %]
307 [% 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 %]
308 [% IF suggestions.count %]<li role="presentation"><a href="#suggestion_details" aria-controls="suggestion_details" role="tab" data-toggle="tab">Suggestion details</a></li>[% END %]
309 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li role="presentation"><a href="#editions" aria-controls="editions" role="tab" data-toggle="tab">Editions</a></li>[% END %][% END %]
310 [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]<li role="presentation"><a href="#concerns" aria-controls="concerns" role="tab" data-toggle="tab">Concerns ([% biblio.tickets.count | html %])</a></li>[% END %]
311 [% IF ( LocalCoverImages ) %]
312 <li role="presentation">
313 <a href="#images" aria-controls="images" role="tab" data-toggle="tab">Images ([% localimages.count || 0 | html %])</a>
316 [% IF HTML5MediaEnabled && HTML5MediaSets.size %]
317 <li id="media_tab" role="presentation"><a href="#html5media" aria-controls="html5media" role="tab" data-toggle="tab">Play media</a></li>
319 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
320 <li class="NovelistSelect" style="display:none;" role="presentation"><a href="#NovelistSelect" aria-controls="NovelistSelect" role="tab" data-toggle="tab">NoveList Select</a></li>
322 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
323 <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>
327 <div class="tab-content">
328 [% items_table_block_iter = 0 %]
329 [% BLOCK items_table %]
330 [% items_table_block_iter = items_table_block_iter + 1 %]
331 <div class="[% tab | html %]_table_table_controls">
332 [% IF (StaffDetailItemSelection) %]
333 | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a> |
334 <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-times"></i> Clear all</a>
335 <span class="itemselection_actions">
337 [% IF CAN_user_tools_items_batchdel %]
338 <a class="itemselection_action_delete"><i class="fa fa-trash-can"></i> Delete selected items</a>
340 [% IF CAN_user_tools_items_batchmod %]
341 <a class="itemselection_action_modify"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Modify selected items</a>
343 [% IF CAN_user_editcatalogue_manage_item_groups && biblio.item_groups.count %]
344 <a class="itemselection_action_item_group_set" href="#"><i class="fa fa-book"></i> Add/move to item group</a>
345 <a class="itemselection_action_item_group_unset" href="#"><i class="fa fa-unlink"></i> Remove from item group</a>
350 <table class="items_table" id="[% tab | html %]_table">
353 [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
354 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
355 <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th>
357 [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
358 <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
359 <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
360 [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
361 [% IF Koha.Preference('EnableItemGroups') %]
362 <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
364 <th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th>
366 <th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th>
368 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
369 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen">Last seen</th>
370 <th id="[% tab | html %]_issues" data-colname="[% tab | html %]_issues">Checkouts</th>
371 <th id="[% tab | html %]_renewals" data-colname="[% tab | html %]_renewals">Renewals</th>
372 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned">Date accessioned</th>
373 <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed">Date last borrowed</th>
374 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
375 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
376 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
377 [% IF ( itemdata_stocknumber ) %]<th id="[% tab | html %]_stocknumber" data-colname="[% tab | html %]_stocknumber">Inventory number</th>[% END %]
378 [% IF materials %]<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>[% END %]
379 [% IF ( itemdata_itemnotes ) %]<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>[% END %]
380 [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>[% END %]
381 [% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
382 [% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
383 [% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
384 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
385 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport"> </th>[% END %]
389 [% FOREACH item IN items %]
390 [% SET date_due = item.object.checkout.date_due %]
391 <tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% date_due | html %]">
392 [% IF (StaffDetailItemSelection) %]
393 <td style="text-align:center;vertical-align:middle">
394 [% IF item.can_be_edited %]
395 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
399 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
401 <div class="bookcoverimg">
402 <div class="cover-slider">
403 [% FOREACH image IN item.object.cover_images %]
404 <div class="cover-image local-coverimg">
405 <a href="/cgi-bin/koha/catalogue/image.pl?itemnumber=[% image.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
406 <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 %]" />
415 [% IF ( item_level_itypes ) %]
417 [% SET itemtype = item.itemtype %]
418 [% IF !noItemTypeImages && itemtype.image_location('intranet') %]
419 <img src="[% itemtype.image_location('intranet') | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" />
421 <span class="itypedesc itypetext">[% itemtype.translated_description | html %]</span>
424 <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
425 <td class="homebranch">
426 <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
427 <span class="shelvingloc">
428 [%# If permanent location is defined, show description or code and %]
429 [%# display current location in parentheses. If not, display current location. %]
430 [%# Note that permanent location is a code, and location may be an authval. %]
431 [% SET item_location = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) %]
432 [% IF item.permanent_location %]
433 [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
434 [% permloc_authval | html %]
435 [% IF item_location AND item_location != permloc_authval AND item.location != item.permanent_location %]
436 ([% item_location | html %])
439 [% item_location | html %]
443 [% IF ( itemdata_ccode ) %]<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>[% END %]
444 [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
445 <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
447 [% SET serial = item.serial %]
448 [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
449 <td class="enumchron" data-order="[% serial.publisheddate | html %]">
451 <td class="enumchron">
453 [% IF ( itemdata_enumchron ) %]
454 [% IF item.enumchron && serial.serialseq %]
455 <span class="enum">[% item.enumchron | html %]</span>
456 [% IF ( serial.serialseq && item.enumchron != serial.serialseq ) %]
457 <span class="sep"> -- </span>
458 <span class="serialseq">[% serial.serialseq | html %]</span>
460 [% ELSIF item.enumchron %]
461 <span class="enum">[% item.enumchron | html %]</span>
462 [% ELSIF item.serialseq %]
463 <span class="serialseq">[% serial.serialseq | html %]</span>
465 [% IF serial.publisheddate %]
466 <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span>
474 [% IF item.object.checkout %]
475 [% IF item.object.checkout.onsite_checkout %]
476 <div class="item_status localuse">Currently in local use
478 <div class="item_status datedue">Checked out
480 [% IF item.object.checkout.onsite_checkout %]
485 [% INCLUDE 'patron-title.inc' patron=item.object.checkout.patron hide_patron_infos_if_needed=1 %]
486 : due [% date_due | $KohaDates as_due_date => 1 %]
488 [% ELSIF ( transfer = item.object.get_transfer ) %]
489 [% IF (transfer.datesent) %]
490 <div class="item_status intransit">In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %]</div>
492 <div class="item_status transitrequested">Transit pending from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.daterequested | $KohaDates %]</div>
496 [% IF ( item.itemlost ) %]
497 [% SET itemlost_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %]
498 [% IF itemlostloop %]
499 <div class="item_status lost">[% itemlost_description | html %]</div>
501 <div class="item_status lost">Unavailable (lost or missing)</div>
505 [% IF ( item.withdrawn ) %]
506 [% SET withdrawn_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %]
507 [% IF withdrawn_description %]
508 <div class="item_status wdn">[% withdrawn_description | html %]</div>
510 <div class="item_status wdn">Withdrawn</div>
514 [% IF ( item.damaged ) %]
515 [% SET damaged_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged ) %]
516 [% IF damaged_description %]
517 <div class="item_status dmg">[% damaged_description | html %]</div>
519 <div class="item_status dmg">Damaged</div>
523 [% IF ( item.notforloan || item.itemtype.notforloan ) %]
524 <div class="item_status notforloan">Not for loan
525 [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
526 [% IF not_for_loan_description %]
527 <span class="reason">([% not_for_loan_description | html %])</span>
532 [% SET hold = item.first_hold %]
534 [% IF hold.waitingdate %]
535 <div class="item_status waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].</div>
536 [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
537 <span class="heldfor">Hold for:</span>
538 [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
541 <div class="item_status holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</div>
545 [% IF Koha.Preference('UseRecalls') %]
546 [% SET recall = item.object.recall %]
548 [% IF recall.waiting_date %]
549 <div class="item_status recallat">Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</div>
551 [% 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 %]
552 <div class="item_status recallby">recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</div>
557 [% UNLESS ( item.notforloan || item.itemtype.notforloan || item.onloan || item.itemlost || item.withdrawn || item.damaged || transfer || hold || ( Koha.Preference('UseRecalls') && recall ) ) %]
558 <div class="item_status available">Available</div>
561 [% IF ( item.restricted ) %]
562 <div class="item_status restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</div>
565 [% IF ( item.bundle_host ) %]
566 <div class="item_status bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</div>
570 <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates with_hours => 1 %]</td>
571 <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
572 <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
573 <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
574 <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td>
575 <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>
576 [% IF ( itemdata_uri ) %]
577 [% IF item.uri.split(' \| ').size > 1 %]
579 [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %]
584 <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a>
589 [% IF ( itemdata_copynumber ) %]
590 <td class="copynumber">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.copynumber', authorised_value => item.copynumber ) | html %]</td>
592 [% IF ( itemdata_stocknumber ) %]
593 <td class="stocknumber">[% item.stocknumber | html %]</td>
596 <td class="materials"> [% item.materials | html %] </td>
598 [% IF ( itemdata_itemnotes ) %]
599 <td><div class="itemnotes">[% item.object.itemnotes.replace('\n','<br />') | $raw %]</div></td>
601 [% IF itemdata_nonpublicnotes %]
602 <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
604 [% IF ( hostrecords ) %]
605 <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
609 [% IF ( item.countanalytics ) %]
610 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
615 <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
618 [% IF ShowCourseReserves %]
620 [% IF item.course_reserves %]
621 [% FOREACH r IN item.course_reserves %]
622 [% IF r.course.enabled == 'yes' %]
624 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
625 [% r.course.course_name | html %]
626 <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
627 [% IF r.course.section %] [% r.course.section | html %] [% END %]
628 [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
637 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
638 <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>
641 [% IF CAN_user_editcatalogue_edit_items %]
643 [% IF item.can_be_edited %]
644 [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
645 <div class="btn-group">
646 <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-solid fa-pencil" aria-hidden="true"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
647 <ul class="dropdown-menu pull-right">
648 <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>
652 <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-solid fa-pencil" aria-hidden="true"></i> Edit</a>
655 [% IF bundlesEnabled %]
656 <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>
665 [% END %][%# end of block items_table %]
667 [% IF Koha.Preference('EnableItemGroups') %]
668 <div role="tabpanel" class="tab-pane" id="item_groups">
669 [% IF CAN_user_editcatalogue_manage_item_groups %]
670 <div class="item_groups_table_table_controls">
671 <a href="#" class="item-group-create btn btn-default btn-xs"><i class="fa fa-plus"></i> New item group</a>
674 <table class="items-group-table" id="items-group-table">
677 <th>Display order</th>
679 <th class="NoSort"> </th>
687 <div role="tabpanel" class="tab-pane" id="holdings">
689 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
690 <span class="results_summary NovelistSelect" style="display:none;">
691 <span class="label">Novelist Select: </span>
692 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
697 [% IF ( showncount ) %]
698 [% PROCESS items_table tab="holdings" items=itemloop %]
700 [% SET tab="holdings" %]
701 <table id="table_items">
703 [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
704 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
705 <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th>
707 [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
708 <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
709 <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
710 [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
711 [% IF Koha.Preference('EnableItemGroups') %]
712 <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
714 <th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th>
716 <th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th>
718 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
719 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen">Last seen</th>
720 <th id="[% tab | html %]_issues" data-colname="[% tab | html %]_issues">Checkouts</th>
721 <th id="[% tab | html %]_renewals" data-colname="[% tab | html %]_renewals">Renewals</th>
722 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned">Date accessioned</th>
723 <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed">Date last borrowed</th>
724 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
725 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
726 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
727 [% IF ( itemdata_stocknumber ) %]<th id="[% tab | html %]_stocknumber" data-colname="[% tab | html %]_stocknumber">Inventory number</th>[% END %]
728 [% IF materials %]<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>[% END %]
729 [% IF ( itemdata_itemnotes ) %]<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>[% END %]
730 [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>[% END %]
731 [% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
732 [% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
733 [% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
734 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
735 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport"> </th>[% END %]
741 [% IF ( hiddencount ) %]
742 <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
745 [% IF ( ALTERNATEHOLDINGS ) %]
746 [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
747 <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
750 <div id="noitems">No physical items for this record</div>
754 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
755 <span class="results_summary NovelistSelect" style="display:none;">
756 <span class="label">Novelist Select: </span>
757 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
762 [% IF (SeparateHoldings) %]
763 <div role="tabpanel" class="tab-pane" id="otherholdings">
764 [% IF (otheritemloop.size) %]
765 [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
767 <span class="nootheritems">No other items.</span>
772 [% IF ( MARCNOTES ) %]
774 <div role="tabpanel" class="tab-pane" id="description">
775 <div class="content_set">
777 [% FOREACH MARCNOTE IN MARCNOTES %]
778 <p class="marcnote marcnote-[% MARCNOTE.tag | html %]" id="marcnote-[% MARCNOTE.tag | html %]-[% loop.count | html %]">
779 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
780 <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
782 [% MARCNOTE.marcnote | html | html_line_break %]
791 [% IF ComponentParts && ComponentParts.size %]
792 <div role="tabpanel" class="tab-pane" id="components">
793 <div class="content_set">
795 [% FOR PART IN ComponentParts %]
803 [% IF ComponentParts.size == Koha.Preference('MaxComponentRecords')%]
804 <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>
806 </div> <!-- /.content_set -->
807 </div> <!-- /#components -->
811 [% IF ( subscriptionsnumber ) %]
812 <div role="tabpanel" class="tab-pane" id="subscriptions">
813 <div id="catalogue_detail_subscriptions">
814 <h2>This is a serial subscription</h2>
815 <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p>
816 [% FOREACH subscription IN subscriptions %]
817 [% IF subscription.branchcode %]
818 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
820 [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
821 [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]</p>[% END %]
822 [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
823 [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
824 [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
825 [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
826 [% IF ( subscription.latestserials ) %]
827 <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
831 <th>Date arrived</th>
832 <th>Date published</th>
833 <th>Date published (text)</th>
837 [% FOREACH latestserial IN subscription.latestserials %]
839 <td>[% latestserial.serialseq | html %]</td>
840 <td data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
841 <td data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
842 <td>[% latestserial.publisheddatetext | html %]</td>
844 [% INCLUDE 'serial-status.inc' serial = latestserial %]
846 <td>[% latestserial.notes | html %]</td>
851 [% IF ( CAN_user_serials ) %]
853 <a class="btn btn-link" href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa fa-list" aria-hidden="true"></i> Subscription details</a>
861 [% IF Koha.Preference('AcquisitionDetails') %]
862 <div role="tabpanel" class="tab-pane" id="acq_details">
863 [% IF orders.count %]
869 <th>Basket group</th>
871 <th>Order number</th>
872 <th>Creation date</th>
873 <th>Receive date</th>
876 <th title="Estimated cost tax incl. while pending, actual cost tax incl. once received">Price</th>
877 <th>Internal note</th>
878 <th>Subscription</th>
879 <th>Subscription call number</th>
883 [% FOR order IN orders %]
884 [% SET basket = order.basket %]
885 [% SET vendor = basket.bookseller %]
888 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
891 [% IF order.invoiceid %]
892 [% IF CAN_user_acquisition %]
893 <div><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
894 title="Invoice detail page">
895 [% order.invoice.invoicenumber | html %]</a></div>
897 <div>[% order.invoice.invoicenumber | html %]</div>
900 [% IF ( Koha.Preference('EDIFACT') && CAN_user_acquisition_edi_manage && order.invoice.message_id ) %]
901 <div><a href="/cgi-bin/koha/acqui/edimsg.pl?id=[% order.invoice.message_id | uri %]" title="EDI INVOICE message">EDI message</a></div>
906 [% IF basket.basketgroupid %]
907 [% SET basket_group = basket.basket_group %]
908 [% IF CAN_user_acquisition_group_manage %]
909 <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>
911 [% basket_group.name | html %] ([% basket_group.id | html %])
915 <td>[% IF CAN_user_acquisition_order_manage %]
916 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
918 [% basket.basketname | html %] ([% basket.basketno | html %])
920 <td>[% order.ordernumber | html %]</td>
921 <td data-order="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</td>
922 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</td>
924 [% SWITCH order.orderstatus %]
925 [% CASE 'new' %]<span>New</span>
926 [% CASE 'ordered' %]<span>Ordered</span>
927 [% CASE 'partial' %]<span>Partial</span>
928 [% CASE 'complete' %]<span>Complete</span>
929 [% CASE 'cancelled' %]<span>Cancelled</span>
932 <td>[% order.quantity | html %]</td>
933 <td>[% IF ( order.orderstatus == "complete" ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %]
934 <td>[% order.order_internalnote | html %]</td>
936 [% IF order.subscriptionid %]
937 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
941 [% IF order.subscriptionid %]
942 [% order.subscription.callnumber | html %]
950 <span class="noorder">There is no order for this bibliographic record.</span>
955 [% IF suggestions.count %]
956 <div role="tabpanel" class="tab-pane" id="suggestion_details">
957 [% IF nb_archived_suggestions > 0 %]
958 <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw %]
960 <table id="suggestions" class="sorted">
963 <th class="NoSort"> </th>
964 <th class="anti-the">Suggestion</th>
965 <th>Suggested by - on</th>
966 <th>Managed by - on</th>
967 <th>Last modification by - on</th>
974 [% FOREACH suggestion IN suggestions %]
976 <td>[% suggestion.suggestionid | html %]</td>
978 <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show" title="suggestion" >
979 [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
981 [% IF ( suggestion.copyrightdate ) %]© [% suggestion.copyrightdate | html %] [% END %]
982 [% IF ( suggestion.volumedesc ) %]; Volume:<em>[% suggestion.volumedesc | html %]</em> [% END %]
983 [% 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 %]
986 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
987 [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
990 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
991 [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
994 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
995 [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
998 [% Branches.GetName( suggestion.branchcode ) | html %]
1001 [% suggestion.fund.budget_name | html %]
1004 [% IF suggestion.STATUS == 'ASKED' %]<span>Pending</span>
1005 [% ELSIF suggestion.STATUS == 'ACCEPTED' %]<span>Accepted</span>
1006 [% ELSIF suggestion.STATUS == 'ORDERED' %]<span>Ordered</span>
1007 [% ELSIF suggestion.STATUS == 'REJECTED' %]<span>Rejected</span>
1008 [% ELSIF suggestion.STATUS == 'CHECKED' %]<span>Checked</span>
1009 [% ELSIF suggestion.STATUS == 'AVAILABLE' %]<span>Available</span>
1010 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
1011 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
1012 [% ELSE %]<span>Status unknown</span>
1014 [% IF suggestion.reason %]
1015 <br />([% suggestion.reason | html %])
1025 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
1026 <div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4>
1028 [% 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 %]
1029 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %]<td>[% IF ( noItemTypeImages ) %]<span class="itypetext">[% XISBN.description | html %]</span>[% ELSE %]<img src="[% XISBN.imageurl | html %]" alt="[% XISBN.description | html %]" title="[% XISBN.description | html %]">[% END %]</td>[% END %]
1030 <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 %]
1031 [% IF ( XISBN.publishercode ) %]
1032 [% 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 %]
1034 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
1035 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
1039 </table></div>[% END %]
1042 [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]
1043 <div role="tabpanel" class="tab-pane" id="concerns">
1044 <fieldset class="action" style="cursor:pointer;">
1045 <a id="hideResolved"><i class="fa fa-minus-square"></i> Hide resolved</a>
1046 | <a id="showAll"><i class="fa fa-bars"></i> Show all</a>
1049 <table id="table_concerns" width="100%">
1055 <th data-class-name="actions noExport">Actions</th>
1062 [% IF ( LocalCoverImages ) %]
1063 <div role="tabpanel" class="tab-pane" id="images">
1064 [% IF localimages.count %]
1065 <p>Click on an image to view it in the image viewer</p>
1066 <ul class="thumbnails">
1067 [% FOREACH image IN localimages %]
1069 <li id="imagenumber-[% image.imagenumber | html %]" class="thumbnail">
1070 <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]">
1071 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" />
1073 [% IF CAN_user_tools_upload_local_cover_images %]
1074 <a href="#" class="remove"><i class="fa fa-trash-can"></i> Delete image</a>
1080 [% ELSE # - No image passed JavaScript takes care %]
1081 <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span>
1083 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1084 <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>
1090 [% IF ( HTML5MediaEnabled ) %]
1091 <div role="tabpanel" class="tab-pane" id="html5media">
1092 [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
1094 [% IF HTML5MediaSet.is_youtube %]
1095 <iframe id="player" width="640" height="360" src="[% HTML5MediaSet.srcblock | url %]"></iframe>
1097 <[% HTML5MediaParent | html %] controls preload=none>
1098 <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
1099 [[% HTML5MediaParent | html %] tag not supported by your browser.]
1100 </[% HTML5MediaParent | html %]>
1108 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
1109 <div role="tabpanel" class="tab-pane" id="NovelistSelect" class="novelistSelect">
1110 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
1114 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
1115 <div role="tabpanel" class="tab-pane" id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
1116 [% plugins_intranet_catalog_biblio_tab.content | $raw %]
1120 </div><!-- /tab-content -->
1121 </div><!-- /bibliodetails -->
1123 <div id="export" style="margin-top: 1em;">
1124 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
1126 <th>Save record</th> </tr>
1127 <tr><td> Select download format: <select name="format">
1128 <option value="mods">MODS (XML)</option>
1129 <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
1130 <option value="marcxml">MARCXML</option>
1131 <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1132 <option value="utf8">MARC (Unicode/UTF-8)</option> </select>
1133 <input type="submit" name="save" class="btn btn-primary" value="Download record" /></td>
1136 <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
1142 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
1143 <div class="modal-dialog modal-lg">
1144 <div class="modal-content">
1145 <div class="modal-header">
1146 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1147 <h3 id="marcPreviewLabel">MARC preview</h3>
1149 <div class="modal-body">
1150 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
1152 <div class="modal-footer">
1153 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1159 <div id="elasticPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="elasticPreviewLabel" aria-hidden="true">
1160 <div class="modal-dialog modal-lg">
1161 <div class="modal-content">
1162 <div class="modal-header">
1163 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1164 <h3 id="elasticPreviewLabel">Elasticsearch record</h3>
1166 <div class="modal-body">
1167 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
1169 <div class="modal-footer">
1170 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1177 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1179 <div class="col-sm-2 col-sm-pull-10">
1181 [% INCLUDE 'biblio-view-menu.inc' %]
1183 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1184 </div> <!-- /.row -->
1188 <div class="modal fade" id="modal-item-group-create" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-create-label">
1189 <div class="modal-dialog">
1190 <div class="modal-content">
1191 <div class="modal-header">
1192 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1193 <h3 id="modal-item-group-create-label"><i class="fa fa-plus"></i> Create a new item group</h3>
1195 <form method="get" id="modal-item-group-create-form" class="validated">
1196 <div class="modal-body">
1199 <label for="item_group_description" class="required">Name: </label>
1200 <input name="description" id="modal-item-group-create-form-description" type="text" size="30" required="required" class="required" />
1201 <span class="required">Required</span>
1204 <label for="item_group_display_order" class="required">Display order: </label>
1205 <input name="display_order" id="modal-item-group-create-form-display_order" value="0" size="5" required="required" class="required" />
1206 <span class="required">Required</span>
1208 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1212 <div class="modal-footer">
1213 <button id="modal-item-group-create-submit" class="btn btn-default"><i class="fa fa-plus"></i> Submit</button>
1214 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1221 <div class="modal fade" id="modal-item-group-edit" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-edit-label">
1222 <div class="modal-dialog">
1223 <div class="modal-content">
1224 <div class="modal-header">
1225 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1226 <h3 id="modal-item-group-edit-label"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit item group</h3>
1228 <form method="get" id="modal-item-group-edit-form" class="validated">
1229 <div class="modal-body">
1232 <label for="item_group_description" class="required">Name: </label>
1233 <input name="description" id="modal-item-group-edit-form-description" type="text" size="30" required="required" class="required" />
1234 <span class="required">Required</span>
1237 <label for="item_group_display_order" class="required">Sort order: </label>
1238 <input name="display_order" id="modal-item-group-edit-form-display_order" size="5" />
1239 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1243 <div class="modal-footer">
1244 <button id="modal-item-group-edit-submit" class="btn btn-default"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Submit</button>
1245 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1252 <div class="modal fade" id="modal-item-group-delete" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-delete-label">
1253 <div class="modal-dialog">
1254 <div class="modal-content">
1255 <div class="modal-header">
1256 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1257 <h3 id="modal-item-group-delete-label"><i class='fa fa-trash-can'></i> Delete item group</h3>
1259 <div class="modal-body">
1260 Are you sure you want to delete this item group?
1262 <div class="modal-footer">
1263 <button id="modal-item-group-delete-submit" class="btn btn-danger"><i class='fa fa-trash-can'></i> Delete</button>
1264 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1270 <div class="modal fade" id="modal-item-group-set" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-set-label">
1271 <div class="modal-dialog">
1272 <div class="modal-content">
1273 <div class="modal-header">
1274 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1275 <h3 id="modal-item-group-set-label"><i class='fa fa-book'></i> Set item group for items</h3>
1277 <form method="get" id="modal-item-group-set-form" class="validated">
1278 <div class="modal-body">
1281 <label for="item_group" class="required">Item group: </label>
1282 <select name="item_group" id="item-group-add-form-select">
1283 [% FOREACH ig IN biblio.item_groups.search({}, {order_by => 'display_order'}) %]
1284 <option value="[% ig.id | html %]">[% ig.description | html %]</option>
1287 <span class="required">Required</span>
1291 <div class="modal-footer">
1292 <button id="modal-item-group-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set item group</button>
1293 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1300 <div class="modal fade" id="modal-item-group-unset" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-unset-label">
1301 <div class="modal-dialog">
1302 <div class="modal-content">
1303 <div class="modal-header">
1304 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1305 <h3 id="modal-item-group-unset-label"><i class='fa fa-unlink'></i> Remove item from item group</h3>
1307 <div class="modal-body">
1308 Are you sure you want to remove these item(s) from their item group(s)?
1310 <div class="modal-footer">
1311 <button id="modal-item-group-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button>
1312 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1318 [% IF bundlesEnabled %]
1319 <div class="modal" id="addToBundleModal" tabindex="-1" role="dialog" aria-labelledby="addToBundleLabel">
1320 <form method="get" id="addToBundleForm" action="">
1321 <div class="modal-dialog" role="document">
1322 <div class="modal-content">
1323 <div class="modal-header">
1324 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1325 <h3 id="addToBundleLabel">Add to bundle</h3>
1327 <div class="modal-body">
1328 <div id="addResult"></div>
1329 <fieldset class="rows">
1332 <label class="required" for="external_id">Item barcode: </label>
1333 <input type="text" id="external_id" name="external_id" required="required">
1334 <span class="required">Required</span>
1339 <div class="modal-footer">
1340 <button type="submit" class="btn btn-default">Submit</button>
1341 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1348 <div class="modal" id="removeFromBundleModal" tabindex="-1" role="dialog" aria-labelledby="removeFromBundleLabel">
1349 <form method="get" id="removeFromBundleForm" action="">
1350 <div class="modal-dialog" role="document">
1351 <div class="modal-content">
1352 <div class="modal-header">
1353 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1354 <h3 id="removeFromBundleLabel">Remove from bundle</h3>
1356 <div class="modal-body">
1357 <div id="removeResult"></div>
1358 <fieldset class="rows">
1361 <label class="required" for="external_id">Item barcode: </label>
1362 <input type="text" id="rm_external_id" name="external_id" required="required">
1363 <span class="required">Required</span>
1368 <div class="modal-footer">
1369 <button type="submit" class="btn btn-default">Submit</button>
1370 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1378 [% IF ( Koha.Preference('CatalogConcerns') ) %]
1379 [% INCLUDE 'modals/add_catalog_concern.inc' %]
1382 [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]
1383 [% INCLUDE 'modals/display_ticket.inc' %]
1386 [% MACRO jsinclude BLOCK %]
1387 [% INCLUDE 'catalog-strings.inc' %]
1388 [% INCLUDE 'calendar.inc' %]
1389 [% INCLUDE 'select2.inc' %]
1390 [% INCLUDE 'js-date-format.inc' %]
1391 [% Asset.js("js/catalog.js") | $raw %]
1392 [% Asset.js("js/recalls.js") | $raw %]
1393 [% Asset.js("js/coce.js") | $raw %]
1394 [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1395 [% IF ( Koha.Preference('CatalogConcerns') ) %]
1397 /* Set a variable needed by add_catalog_concern.js */
1398 var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1400 [% Asset.js("js/modals/add_catalog_concern.js") | $raw %]
1402 [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]
1404 $(document).ready(function() {
1405 var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'concerns', 'table_concerns', 'json' ) | $raw %];
1407 var filtered = false;
1408 let additional_filters = {
1409 resolved_date: function(){
1411 return { "=": null };
1416 biblio_id: [% biblionumber | uri %]
1419 var tickets_url = '/api/v1/tickets';
1420 var tickets = $("#table_concerns").kohaTable({
1429 'emptyTable': '<div class="dialog message">' + _("Congratulations, there are no catalog concerns.") + '</div>',
1432 "render": function (data, type, row, meta) {
1433 if ( type == 'display' ) {
1434 if ( data != null ) {
1435 return data.escapeHtml();
1446 "data": "reported_date:reporter.firstname",
1447 "render": function(data, type, row, meta) {
1448 let reported = '<span class="date clearfix">' + $datetime(row.reported_date) + '</span>';
1449 reported += '<span class="reporter clearfix">' + $patron_to_html(row.reporter, {
1450 display_cardnumber: false,
1459 "data": "title:body",
1460 "render": function(data, type, row, meta) {
1461 let resolved = ( row.resolved_date ) ? true : false;
1462 let result = '<a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="' + resolved + '">' + row.title + '</a>';
1463 if (row.updates_count) {
1464 result += '<span class="pull-right"><a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '"><i class="fa fa-comment" aria-hidden="true"></i> ' + row.updates_count + '</a></span>';
1466 result += '<div id="detail_' + row.ticket_id + '" class="hidden">' + row.body + '</div>';
1473 "data": "resolved_date",
1474 "render": function(data, type, row, meta) {
1476 if (row.resolved_date) {
1477 result += _("Resolved by:") + ' <span>' + $patron_to_html(row.resolver, {
1478 display_cardnumber: false,
1481 result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>';
1483 result += _("Open");
1491 "data": function(row, type, val, meta) {
1492 let resolved = ( row.resolved_date ) ? true : false;
1493 let result = '<a class="btn btn-default btn-xs" role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="' + resolved + '"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>';
1496 "searchable": false,
1500 }, table_settings, 0, additional_filters);
1502 $('#hideResolved').on("click", function() {
1504 tickets.DataTable().draw();
1507 $('#showAll').on("click", function() {
1509 tickets.DataTable().draw();
1513 [% Asset.js("js/modals/display_ticket.js") | $raw %]
1516 var interface = "[% interface | html %]";
1517 var theme = "[% theme | html %]";
1518 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
1519 function verify_cover_images() {
1520 // Loop over each container in the template which contains covers
1521 $(".cover-slider").each(function(){
1522 var lightbox_descriptions = [];
1523 var first_shown = 0;
1524 $(this).find(".cover-image").each( function( index ){
1526 // Find the image in the container
1527 var img = div.find("img")[0];
1528 if( $(img).length > 0 ){
1529 var description = "";
1530 // All slides start hidden. If this is the first one, show it.
1531 if( first_shown == 0 ){
1535 // Check if Amazon image is present
1536 if ( div.attr("id") == "amazon-bookcoverimg" ) {
1539 if ((w == 1) || (h == 1)) {
1540 // Amazon returned single-pixel placeholder
1541 // Remove the container
1544 lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1546 } else if( div.attr("id") == "custom-coverimg" ){
1547 if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1548 // No image was loaded via the CustomCoverImages system preference
1549 // Remove the container
1552 lightbox_descriptions.push( _("Custom cover image") );
1554 } else if ( div.attr("id") == "syndetics-bookcoverimg" ){
1555 lightbox_descriptions.push(_("Syndetics cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1557 else if( div.hasClass("coce-coverimg" ) ){
1558 // Identify which service's image is being loaded by Coce
1559 var coce_description;
1560 if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1561 coce_description = _("Coce image from Amazon.com");
1562 } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1563 coce_description = _("Coce image from Google Books");
1564 } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1565 coce_description = _("Coce image from Open Library");
1567 div.find(".hint").html(coce_description);
1568 lightbox_descriptions.push(coce_description);
1569 } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1570 lightbox_descriptions.push(_("Local cover image (<a href='%s'>edit</a>)").format($(img).data('link')));
1572 lightbox_descriptions.push(_("Cover image source unknown"));
1577 // Lightbox for cover images
1578 Chocolat(this.querySelectorAll('.cover-image a'), {
1579 description: function(){
1580 return lightbox_descriptions[this.settings.currentImageIndex];
1586 $(".cover-slider").each(function(){
1587 var coverSlide = this;
1588 var coverImages = $(this).find(".cover-image");
1589 if( coverImages.length > 1 ){
1590 coverImages.each(function( index ){
1591 // If more that one image is present, add a navigation link
1592 // for activating the slide
1593 var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1595 // Set the first navigation link as active
1596 $(covernav).addClass("nav-active");
1598 $(covernav).html("<i class=\"fa fa-circle\"></i>");
1599 $(coverSlide).append( covernav );
1603 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
1604 && $(coverSlide).find(".cover-image:visible").length < 1 ){
1605 $(coverSlide).remove();
1607 $(coverSlide).addClass("cover-slides");
1608 var img = $(coverSlide).find(".cover-image:visible").find("img")[0];
1609 if( $(img).length > 0 && img.complete && img.naturalHeight > 0 ){
1610 $(".cover-slides").css({"background-image":"none"});
1615 $("#editions img").each(function(i){
1616 if ( this.src.indexOf('amazon.com') >= 0 ) {
1619 if ((w == 1) || (h == 1)) {
1620 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1621 } else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) {
1622 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1628 function removeLocalImage(imagenumber) {
1629 var thumbnail = $("#imagenumber-" + imagenumber );
1630 var copy = thumbnail.html();
1631 thumbnail.find("img").css("opacity", ".2");
1632 thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
1633 const client = APIClient.cover_image;
1634 client.cover_images.delete(imagenumber).then(
1636 if ( success.deleted == 1 ) {
1639 thumbnail.html( copy );
1640 alert(_("An error occurred on deleting this image"));
1642 if ( $('ul.thumbnails > li').length == 0 ) {
1643 showNoImageMessage();
1647 thumbnail.html( copy );
1648 alert(_("An error occurred on deleting this image"));
1649 console.warn("Something wrong happened: %s".format(error));
1654 function showNoImageMessage() {
1655 var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
1656 no_images_msg = '<p>' + no_images_msg + '</p>';
1657 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1658 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>");
1659 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
1661 $('#images').html(no_images_msg);
1664 [% IF StaffDetailItemSelection %]
1665 function itemSelectionBuildDeleteLink(div) {
1666 var itemnumbers = new Array();
1667 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1668 itemnumbers.push($(this).val());
1670 if (itemnumbers.length > 0) {
1671 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
1672 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1673 url += '&biblionumber=[% biblionumber | uri %]';
1674 url += '&src=CATALOGUING';
1675 $('a.itemselection_action_delete').attr('href', url);
1682 function itemSelectionBuildModifyLink(div) {
1683 var itemnumbers = new Array();
1684 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1685 itemnumbers.push($(this).val());
1687 if (itemnumbers.length > 0) {
1688 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
1689 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1690 url += '&biblionumber=[% biblionumber | uri %]';
1691 url += '&src=CATALOGUING';
1692 $('a.itemselection_action_modify').attr('href', url);
1699 function itemSelectionBuildActionLinks(tab) {
1700 var div = $("#" + tab);
1701 var delete_link_ok = itemSelectionBuildDeleteLink(div);
1702 var modify_link_ok = itemSelectionBuildModifyLink(div);
1703 if (modify_link_ok || delete_link_ok) {
1704 $('.itemselection_actions', div).show();
1706 $('.itemselection_actions', div).hide();
1710 $(document).ready(function() {
1711 $('table.items_table').each(function() {
1712 var div = $(this).parent().attr("id");
1713 itemSelectionBuildActionLinks(div);
1716 $("input[name='itemnumber'][type='checkbox']").change(function() {
1717 var div = $(this).parents('table').parent().parent().attr("id");
1718 itemSelectionBuildActionLinks(div);
1721 $(".SelectAll").on("click",function(e){
1723 var tab = $(this).data("tab");
1724 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
1725 itemSelectionBuildActionLinks(tab);
1728 $(".ClearAll").on("click",function(e){
1730 var tab = $(this).data("tab");
1731 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1732 itemSelectionBuildActionLinks(tab);
1737 $(document).ready(function() {
1738 // Pick details tab to display by default
1740 [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
1741 $(".nav-tabs a[href='#html5media']").tab("show");
1742 [% ELSIF ComponentParts && ComponentParts.size %]
1743 $(".nav-tabs a[href='#components']").tab("show");
1745 $(".nav-tabs a[href='#holdings']").tab("show");
1748 $(".nav-tabs a[href='#holdings']").tab("show");
1750 $('#search-form').focus();
1751 $('.thumbnails > li > .remove').click(function() {
1752 var result = confirm(_("Are you sure you want to delete this cover image?"));
1754 if ( result == true ) {
1755 var imagenumber = $(this).parent().attr('id').split('-')[1];
1756 removeLocalImage(imagenumber);
1761 [% IF ( IntranetCoce && CoceProviders ) %]
1762 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
1765 $("body").on("click",".previewMARC", function(e){
1767 var page = $(this).attr("href");
1768 $("#marcPreview .modal-body").load(page + " table");
1769 $('#marcPreview').modal({show:true});
1773 [% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' ) %]
1774 $("body").on("click",".previewElastic", function(e){
1776 var pageElastic = $(this).attr("href");
1777 $("#elasticPreview .modal-body").load(pageElastic, function( response, status, xhr ) {
1778 if( status == 'error' ){
1779 $("#elasticPreview .modal-body").html("<h1>"+_("An error has occurred!")+"</h1><h2><em>"+_("Error 404")+"</em></h2><ul><li>"+_("An internal link in the staff interface is broken and the page does not exist")+"</li></ul><h3>"+_("What's next?")+"</h3><ul style='margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;'><li>"+_("Use top menu bar to navigate to another part of Koha.")+"</li><li>"+_("To report a broken link or any other issue, please contact the Koha administrator.")+" <a href='mailto:[% Koha.Preference("KohaAdminEmailAddress") | uri %]'>"+_("Send email")+"</a></li></ul>");
1782 $('#elasticPreview').modal({show:true});
1786 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1787 novSelect.loadContentForQuery({
1788 ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1789 ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1792 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
1793 '[% Koha.Preference('NovelistSelectPassword') | html %]',
1795 if ( d.length > 0 ){ //If no content
1796 $(".NovelistSelect").show();
1800 $(".print-label").on("click", function(e){
1802 link = $(this).attr("href");
1803 openWindow(link,"Print spine label",400,400);
1805 $(".cover-slider").on("click",".cover-nav", function(e){
1807 var cover_slider = $(this).parent();
1808 // Adding click handler for cover image navigation links
1809 var num = $(this).data("num");
1810 $(cover_slider).find(".cover-nav").removeClass("nav-active");
1811 $(this).addClass("nav-active");
1812 $(cover_slider).find(".cover-image").hide();
1813 $(cover_slider).find(".cover-image").eq( num ).show();
1818 [% IF ( IntranetCoce && CoceProviders ) %]
1819 let counter_wait = 0;
1820 function wait_for_images(cb){
1826 loaded = KOHA.coce.done;
1829 if (!loaded && counter_wait < 50) {// Do not wait more than 5 seconds
1830 window.setTimeout(function(){wait_for_images(cb);}, 100);
1832 if (counter_wait >= 50 ) {
1833 console.log("Could not retrieve the images")
1839 $(window).load(function() {
1840 wait_for_images(verify_cover_images);
1843 $(window).load(function() {
1844 verify_cover_images();
1848 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1849 <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1851 [% INCLUDE 'datatables.inc' %]
1852 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1853 [% INCLUDE 'columns_settings.inc' %]
1854 [% INCLUDE 'js-date-format.inc' %]
1855 [% INCLUDE 'js-patron-format.inc' %]
1856 [% INCLUDE 'js-biblio-format.inc' %]
1857 [% Asset.js("js/browser.js") | $raw %]
1858 [% Asset.js("js/table_filters.js") | $raw %]
1859 [% Asset.js("js/place_booking_modal.js") | $raw %]
1862 browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1865 [% IF bundlesEnabled %]
1866 var bundle_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','bundle_tables','json') | $raw %];
1867 var bundle_lost_value = [% Koha.Preference('BundleLostValue') | html %];
1869 $(document).ready(function() {
1871 [% IF bundlesEnabled %] // Bundle handling
1872 function createChild ( row, itemnumber, duedate ) {
1875 var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>');
1876 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>');
1877 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>');
1879 // Disable management if there's a duedate
1881 bundle_toolbar.children('.btn').addClass("disabled");
1882 bundle_toolbar.attr("title", _("This bundle is checked out, it cannot be modified"));
1885 // This is the table we'll convert into a DataTable
1886 var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>');
1888 // Display it the child row
1889 row.child( bundle_toolbar.add(bundles_table), 'bundle' ).show();
1891 // Initialise as a DataTable
1892 var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?";
1893 var bundle_table = bundles_table.kohaTable({
1895 "url": bundle_table_url
1899 "return_claim.patron"
1901 "order": [[ 1, "asc" ]],
1903 "targets": [0,1,2,3],
1904 "render": function (data, type, row, meta) {
1905 if ( data && type == 'display' ) {
1906 return data.escapeHtml();
1913 "data": "biblio.title:biblio.subtitle:biblio.medium",
1914 "title": _("Title"),
1917 "render": function(data, type, row, meta) {
1918 return $biblio_to_html(row.biblio, { link: 1 });
1922 "data": "biblio.author",
1923 "title": _("Author"),
1928 "data": "callnumber",
1929 "title": _("Callnumber"),
1934 "data": "external_id",
1935 "title": _("Barcode"),
1940 "data": "lost_status:last_seen_date:return_claim.patron",
1941 "title": _("Status"),
1942 "searchable": false,
1944 "render": function(data, type, row, meta) {
1945 if ( row.lost_status == bundle_lost_value ) {
1946 let out = '<span class="lost">' + _("Last seen") + ': ' + $date(row.last_seen_date) + '</span>';
1947 if ( row.return_claim ) {
1948 out = out + '<span class="claims_return">' + _("Claims returned by") + ': ' + $patron_to_html( row.return_claim.patron, { display_cardnumber: false, url: true } ) + '</span>';
1952 else if ( row.lost_status !== 0 ) {
1953 return '<span class="lost">' + _("Lost") + ': ' + row.lost_status + '</span>';
1955 return '<span class="available">' + _("Present") + '</span>';
1959 "data": function( row, type, val, meta ) {
1962 result = '<button class="btn btn-default btn-xs remove disabled" role="button" data-itemnumber="'+row.item_id+'" title="%s"><i class="fa fa-minus" aria-hidden="true"></i> %s</button>\n'.format(_("This bundle is checked out, it cannot be modified"), _("Remove"));
1964 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';
1968 "title": _("Actions"),
1969 "searchable": false,
1974 }, bundle_settings, 1);
1975 $(".tbundle").on("click", ".remove:not(.disabled)", function(){
1976 var bundle_table = $(this).closest('table');
1977 var host_itemnumber = bundle_table.data('itemnumber');
1978 var component_itemnumber = $(this).data('itemnumber');
1979 var unlink_item_url = "/api/v1/items/" + host_itemnumber + "/bundled_items/" + component_itemnumber;
1982 url: unlink_item_url,
1983 success: function(){
1984 bundle_table.DataTable({ 'retrieve': true }).draw(false);
1993 var bundle_form_active;
1994 $("#addToBundleModal").on("shown.bs.modal", function(e){
1995 var button = $(e.relatedTarget);
1996 var item_id = button.data('item');
1997 $("#addResult").replaceWith('<div id="addResult"></div>');
1998 $("#addToBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items');
1999 $("#external_id").focus();
2001 bundle_form_active = item_id;
2004 function addToBundle (url, data) {
2005 /* Send the data using post with external_id */
2006 var posting = $.post({
2008 data: JSON.stringify(data),
2009 contentType: "application/json; charset=utf-8",
2013 const barcode = data.external_id;
2015 /* Report the results */
2016 posting.done(function(data) {
2017 $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">'+_("Success: Added '%s'").format(barcode)+'</div>');
2018 $('#external_id').val('').focus();
2021 posting.fail(function(data) {
2022 if ( data.status === 409 ) {
2023 var response = data.responseJSON;
2024 if ( response.error_code === 'already_bundled' ) {
2025 $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
2026 } else if (response.error_code === 'bundle_checkout_out') {
2027 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Bundle is currently checked out")+'</div>');
2028 } else if (response.error_code === 'checked_out') {
2029 const button = $('<button type="button">')
2030 .addClass('btn btn-xs')
2031 .text(_("Check in and add to bundle"))
2032 .on('click', function () {
2033 addToBundle(url, { external_id: barcode, force_checkin: true });
2037 .attr('class', 'alert alert-warning')
2038 .append(__x('Warning: Item {barcode} is checked out', { barcode }))
2039 .append(' ', button);
2040 } else if (response.error_code === 'failed_checkin') {
2043 .attr('class', 'alert alert-danger')
2044 .append(__x('Failure: Item {barcode} cannot be checked in', { barcode }))
2045 } else if (response.error_code === 'reserved') {
2046 const button = $('<button type="button">')
2047 .addClass('btn btn-xs')
2048 .text(_("Ignore holds and add to bundle"))
2049 .on('click', function () {
2050 addToBundle(url, { external_id: barcode, ignore_holds: true });
2054 .attr('class', 'alert alert-warning')
2055 .append(__x('Warning: Item {barcode} is on hold', { barcode }))
2056 .append(' ', button);
2058 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
2060 } else if ( data.status === 404 ) {
2061 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
2062 } else if ( data.status === 400 ) {
2063 var response = data.responseJSON;
2064 if ( response.error_code === "failed_nesting" ) {
2065 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' is a bundle and bundles cannot be nested").format(barcode)+'</div>');
2067 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details.")+'</div>');
2070 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details.")+'</div>');
2072 $('#external_id').val('').focus();
2076 $("#addToBundleForm").submit(function(event) {
2077 /* stop form from submitting normally */
2078 event.preventDefault();
2080 const url = this.action;
2081 const data = { external_id: this.elements.external_id.value };
2083 addToBundle(url, data);
2086 $("#addToBundleModal").on("hidden.bs.modal", function(e){
2087 if ( bundle_changed ) {
2088 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
2090 bundle_form_active = 0;
2094 $("#removeFromBundleModal").on("shown.bs.modal", function(e){
2095 var button = $(e.relatedTarget);
2096 var item_id = button.data('item');
2097 $("#removeResult").replaceWith('<div id="removeResult"></div>');
2098 $("#removeFromBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items/');
2099 $("#rm_external_id").focus();
2101 bundle_form_active = item_id;
2104 $("#removeFromBundleForm").submit(function(event) {
2106 /* stop form from submitting normally */
2107 event.preventDefault();
2109 /* get the action attribute from the <form action=""> element */
2110 var $form = $(this),
2111 url = $form.attr('action');
2113 var barcode = $('#rm_external_id').val();
2115 /* Fetch itemnumber using rm_external_id */
2116 var itemReq = $.get('/api/v1/items', { q: JSON.stringify({
2117 external_id: barcode
2118 }) }, null, "json");
2121 itemReq.done(function(data) {
2122 if (data.length === 1) {
2123 itemnumber = data[0].item_id;
2125 /* Remove link using fetch itemnumber */
2126 var deleteReq = $.ajax( url + itemnumber, {
2130 /* Report the results */
2131 deleteReq.done(function(data) {
2132 var barcode = $('#rm_external_id').val();
2133 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed '%s'").format(barcode)+'</div>');
2134 $('#rm_external_id').val('').focus();
2137 deleteReq.fail(function(data) {
2138 var barcode = $('#rm_external_id').val();
2139 if ( data.status === 409 ) {
2140 var response = data.responseJSON;
2141 if (response.error_code === 'bundle_checkout_out') {
2142 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Bundle is currently checked out")+'</div>');
2143 } else if ( response.key === "PRIMARY" ) {
2144 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
2146 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
2148 } else if ( data.status === 404 ) {
2149 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
2151 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
2153 $('#rm_external_id').val('').focus();
2156 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'</div>');
2159 itemReq.fail(function(data) {
2160 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found '%s'").format(barcode)+'</div>');
2161 $('#rm_external_id').val('').focus();
2166 $("#removeFromBundleModal").on("hidden.bs.modal", function(e){
2167 if ( bundle_changed ) {
2168 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
2170 bundle_form_active = 0;
2173 // End bundle handling
2176 var table_names = [ 'holdings_table', 'otherholdings_table' ];
2177 var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ];
2178 var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ];
2179 table_names.forEach( function( table_name, index ) {
2180 if ( !has_images[index] ) {
2181 table_settings[index].columns.splice(1,1);
2183 var dt_parameters = {
2187 "bKohaColumnsUseNames": true,
2188 "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2190 var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' );
2192 [% IF bundlesEnabled %]
2193 // Add event listener for opening and closing bundle details
2194 $('#' + table_name + ' tbody').on('click', 'button.details-control', function () {
2195 var button = $(this);
2196 var tr = button.closest('tr');
2197 var dTable = button.closest('table').DataTable({ 'retrieve': true });
2199 var itemnumber = tr.data('itemnumber');
2200 var duedate = tr.data('duedate');
2201 var row = dTable.row( tr );
2203 if ( row.child.isShown() ) {
2204 // This row is already open - close it
2206 tr.removeClass('shown');
2207 button.removeClass('active');
2211 createChild(row, itemnumber, duedate);
2212 tr.addClass('shown');
2213 button.addClass('active');
2219 [% IF Koha.Preference('AcquisitionDetails') %]
2220 var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
2221 var acquisitiondetails_table = KohaTable("orders", {
2222 "dom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2225 "order": [[ 4, "desc" ]],
2229 [% IF suggestions.count %]
2230 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
2232 { "orderable": false, "searchable": false, "targets": [ 'NoSort' ] },
2233 { "type": "anti-the", "targets": [ "anti-the" ] }
2235 "pagingType": "full"
2241 function columnsInit(table) {
2242 activate_filters(table.id, false);
2245 [% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %]
2246 $(document).ready(function() {
2247 var search_index = localStorage.getItem("cat_search_pulldown_selection");
2248 var search_value = localStorage.getItem("searchbox_value");
2249 if ( search_index ){ $('#cat-search-block select.advsearch').val(search_index)};
2250 if ( search_value ){ $('#cat-search-block #search-form').val(search_value)};
2254 [% IF Koha.Preference('EnableItemGroups') %]
2255 // Load item groups table
2256 var itemGroupsTable = $("#items-group-table").kohaTable({
2258 dom: '<"top pager"ilp>t<"bottom pager"ip>r',
2261 data: "display_order",
2262 title: _("Display order"),
2267 data: "description",
2268 title: _("Description"),
2273 data: function( oObj ) {
2274 [% IF CAN_user_editcatalogue_manage_item_groups %]
2275 return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
2276 <i class="fa-solid fa-pencil" aria-hidden="true"></i> ${_("Edit")}
2279 + `<button class='item-group-delete btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
2280 <i class='fa fa-trash-can'></i> ${('Delete')}
2291 ajax: { url: `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1` },
2294 // Create new item groups
2295 $('.item-group-create').on('click', function(){
2296 $('#modal-item-group-create-form-description').val("");
2297 $('#modal-item-group-create-submit').removeAttr('disabled');
2298 $('#modal-item-group-create').modal('show');
2301 $("#modal-item-group-create-form").validate({
2302 submitHandler: function(form) {
2304 url: `/api/v1/biblios/${biblionumber}/item_groups`,
2305 headers: { "x-koha-embed": "items" },
2306 success: function(item_groups){
2307 $('#modal-item-group-create-submit').attr('disabled', 'disabled');
2310 "url": `/api/v1/biblios/${biblionumber}/item_groups`,
2313 "Content-Type": "application/json"
2315 "data": JSON.stringify(
2317 "description": $("#modal-item-group-create-form-description").val(),
2318 "display_order": $("#modal-item-group-create-form-display_order").val(),
2324 .done(function (response) {
2325 $('#item-group-add-form-select').append($('<option>', {
2326 value: response.item_group_id,
2327 text: response.description
2330 $('#modal-item-group-create').modal('hide');
2331 if ( item_groups.length == 0 ) {
2332 // This bib has no previous item groups, reload the page
2333 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2335 // Has other item groups, just reload the table
2336 itemGroupsTable.api().ajax.reload();
2339 .fail(function(err) {
2340 var message = err.responseJSON.error;
2348 $('#modal-item-group-create').on('shown.bs.modal', function () {
2349 $('#modal-item-group-create-form-description').focus();
2352 // Edit existing item groups
2353 $('body').on( 'click', '.item-group-edit', function(){
2354 const item_group_id = $(this).data('item-group-id');
2355 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2356 $.get( url, function( data ) {
2357 $('#modal-item-group-edit-form-description').val( data.description );
2358 $('#modal-item-group-edit-form-display_order').val( data.display_order );
2359 $('#modal-item-group-edit-submit').data('item-group-id', item_group_id );
2360 $('#modal-item-group-edit-submit').removeAttr('disabled');
2361 $('#modal-item-group-edit').modal('show');
2365 $("#modal-item-group-edit-form").validate({
2366 submitHandler: function(form) {
2367 $('#modal-item-group-edit-submit').attr('disabled', 'disabled');
2369 const item_group_id = $('#modal-item-group-edit-submit').data('item-group-id');
2370 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2376 "Content-Type": "application/json"
2378 "data": JSON.stringify(
2380 "description": $("#modal-item-group-edit-form-description").val(),
2381 "display_order": $("#modal-item-group-edit-form-display_order").val(),
2387 .done(function (response) {
2388 $('#modal-item-group-edit').modal('hide');
2389 itemGroupsTable.api().ajax.reload();
2391 .fail(function(err) {
2392 var message = err.responseJSON.error;
2398 $('#modal-item-group-edit').on('shown.bs.modal', function () {
2399 $('#modal-item-group-edit-form-description').focus();
2402 // Delete existing item groups
2403 $('body').on( 'click', '.item-group-delete', function(){
2404 const item_group_id = $(this).data('item-group-id');
2405 $('#modal-item-group-delete-submit').data('item-group-id', item_group_id );
2406 $('#modal-item-group-delete-submit').removeAttr('disabled');
2407 $('#modal-item-group-delete').modal('show');
2409 $("#modal-item-group-delete-submit").on('click', function(){
2410 $('#modal-item-group-delete-submit').attr('disabled', 'disabled');
2411 const item_group_id = $("#modal-item-group-delete-submit").data('item-group-id');
2414 url: `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2415 headers: { "x-koha-embed": "items" },
2416 success: function(item_group_data){
2418 "url": `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2421 .done(function (response) {
2422 $('#modal-item-group-delete').modal('hide');
2423 $(`#item-group-add-form-select option[value='${item_group_id}']`).remove();
2424 if ( item_group_data.items === null ) {
2425 // No items for this item group, we can just refresh the table
2426 itemGroupsTable.api().ajax.reload();
2428 // This item group had items attached to it, we need to reload the page
2429 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2432 .fail(function(err) {
2433 var message = err.responseJSON.error;
2440 // Add item(s) to a item group
2441 $('.itemselection_action_item_group_set').on('click', function(){
2442 $('#modal-item-group-set').modal('show');
2445 $("#modal-item-group-set-form").validate({
2446 submitHandler: function(form) {
2447 $('#modal-item-group-set-submit').attr('disabled', 'disabled');
2449 const item_group_id = $('#item-group-add-form-select').val();
2451 let itemnumbers = new Array();
2452 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2453 const itemnumber = $(this).val();
2454 itemnumbers.push( itemnumber );
2456 if (itemnumbers.length > 0) {
2457 let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_item_group';
2458 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2459 url += '&biblionumber=[% biblionumber | uri %]';
2460 url += `&item_group_id=${item_group_id}`;
2462 window.location.replace(url);
2465 $('#modal-item-group-set').modal('hide');
2469 // Remove item(s) from an item group
2470 $('.itemselection_action_item_group_unset').on('click', function(){
2471 $('#modal-item-group-unset').modal('show');
2474 $("#modal-item-group-unset-submit").on('click', function(){
2475 $('#modal-item-group-unset-submit').attr('disabled', 'disabled');
2477 let itemnumbers = new Array();
2478 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2479 const itemnumber = $(this).val();
2480 itemnumbers.push( itemnumber );
2482 if (itemnumbers.length > 0) {
2483 let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_item_group';
2484 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2485 url += '&biblionumber=[% biblionumber | uri %]';
2487 window.location.replace(url);
2490 $('#modal-item-group-unset').modal('hide');
2495 const can_edit_items_from = [% To.json(can_edit_items_from) | $raw %];
2496 const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %];
2497 let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?";
2498 var items_table = $("#table_items").kohaTable({
2499 ajax: { url: table_url },
2500 order: [[ 0, "asc" ]],
2501 embed: ["+strings"],
2504 [% IF (StaffDetailItemSelection) %]
2509 render: function (data, type, row, meta) {
2510 if ( can_edit_items_from[row.holding_library_id] ){
2511 return '<input type="checkbox" value="%s" name="itemnumber" />'.format(row.item_id);
2518 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
2524 render: function (data, type, row, meta) {
2525 return ""; // FIXME Build cover images
2529 [% IF ( item_level_itypes ) %]
2531 data: "me.effective_item_type_id",
2535 render: function (data, type, row, meta) {
2537 [% UNLESS noItemTypeImages %]
2538 let image_location = item_type_image_locations[row.item_type_id];
2539 let item_type_description = row._strings.item_type_id.str;
2540 node += image_location
2541 ? '<img src="%s" alt="%s" title="%s" /> '.format(image_location, item_type_description, item_type_description)
2544 node += '<span class="itypedesc itypetext">%s</span>'.format(item_type_description);
2550 data: "me.holding_library_id",
2551 className: "location",
2554 render: function (data, type, row, meta) {
2555 return row._strings.holding_library_id.str;
2559 data: "me.home_library_id",
2560 className: "homebranch",
2563 render: function (data, type, row, meta) {
2564 return row._strings.home_library_id.str;
2566 // FIXME Display the shelving location
2568 [% IF ( itemdata_ccode ) %]
2570 data: "me.collection_code",
2573 render: function (data, type, row, meta) {
2574 return row._strings.collection_code.str;
2578 [% IF Koha.Preference('EnableItemGroups') %]
2581 className: "item_group",
2584 render: function (data, type, row, meta) {
2585 return "item.item_group.description";// FIXME item.item_group.description
2590 data: "me.callnumber",
2591 className: "itemcallnumber",
2594 render: function (data, type, row, meta) {
2595 return row.callnumber;
2602 className: "enumchron",
2605 render: function (data, type, row, meta) {
2606 return "volinfo"; // FIXME volinfo/enumchron/serial_issue_number
2612 className: "status",
2615 render: function (data, type, row, meta) {
2616 return "status"; // FIXME Display status
2620 data: "me.last_seen_date",
2621 className: "datelastseen",
2624 render: function (data, type, row, meta) {
2625 return $date(row.last_seen_date);
2629 data: "me.checkouts_count",
2630 className: "issues",
2633 render: function (data, type, row, meta) {
2634 return row.checkouts_count || 0;
2638 data: "me.renewals_count",
2639 className: "renewals",
2642 render: function (data, type, row, meta) {
2643 return row.renewals_count || 0;
2647 data: "me.acquisition_date",
2648 className: "dateaccessioned",
2651 render: function (data, type, row, meta) {
2652 return $date(row.acquisition_date);
2656 data: "me.last_checkout_date",
2657 className: "datelastborrowed",
2660 render: function (data, type, row, meta) {
2661 return $date(row.last_checkout_date);
2665 data: "me.external_id",
2669 render: function (data, type, row, meta) {
2670 return row.external_id; // FIXME Display link to moredetail
2673 [% IF itemdata_uri %]
2679 render: function (data, type, row, meta) {
2680 return row.uri; // FIXME Display link
2684 [% IF ( itemdata_copynumber ) %]
2686 data: "me.copy_number",
2687 className: "copynumber",
2690 render: function (data, type, row, meta) {
2691 return row.copy_number; // FIXME Display str version
2695 [% IF ( itemdata_stocknumber ) %]
2697 data: "me.inventory_number",
2698 className: "stocknumber",
2701 render: function (data, type, row, meta) {
2702 return row.inventory_number;
2708 data: "me.materials_notes",
2709 className: "materials",
2712 render: function (data, type, row, meta) {
2713 return row.materials_notes;
2717 [% IF ( itemdata_itemnotes ) %]
2719 data: "me.public_notes",
2720 className: "itemnotes",
2723 render: function (data, type, row, meta) {
2724 return row.public_notes; // FIXME Replace \n with br
2728 [% IF itemdata_nonpublicnotes %]
2730 data: "me.internal_notes",
2731 className: "nonpublicnote",
2734 render: function (data, type, row, meta) {
2735 return row.internal_notes;
2739 [% IF ( hostrecords ) %]
2744 render: function (data, type, row, meta) {
2745 return ""; // FIXME Display host title with link
2749 [% IF ( analyze ) %]
2754 render: function (data, type, row, meta) {
2755 return ""; // FIXME Display analytic count + link
2759 [% IF ( ShowCourseReserves ) %]
2764 render: function (data, type, row, meta) {
2765 return ""; // FIXME Display course reserves
2769 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
2774 render: function (data, type, row, meta) {
2775 return ""; // FIXME Print label
2779 [% IF CAN_user_editcatalogue_edit_items %]
2781 data: function( row, type, val, meta ) {
2782 let result = 'Edit + Delete'; // FIXME Add links
2785 className: "actions",
2793 [% CoverImagePlugins | $raw %]
2795 [% INCLUDE 'intranet-bottom.inc' %]