6 [% USE AuthorisedValues %]
10 [% USE TablesSettings %]
11 [% PROCESS 'i18n.inc' %]
13 [% IF Koha.Preference('AmazonAssocTag') %]
14 [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
16 [% AmazonAssocTag = '' %]
19 [% ShowCourseReserves = 0 | html %]
20 [% IF UseCourseReserves %]
21 [% FOREACH item IN itemloop %]
22 [% IF item.course_reserves %]
23 [% FOREACH r IN item.course_reserves %]
24 [% IF r.course.enabled == 'yes' %]
25 [% ShowCourseReserves = 1 | html %]
32 [% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %]
34 [% SET footerjs = 1 %]
35 [% INCLUDE 'doc-head-open.inc' %]
37 [% IF ( unknownbiblionumber ) %]
40 Details for [% INCLUDE 'biblio-title-head.inc' %]
41 [% END %] › Catalog › Koha
43 [% INCLUDE 'doc-head-close.inc' %]
44 [% Asset.css("lib/Chocolat/css/chocolat.css") | $raw %]
47 <body id="catalog_detail" class="catalog">
49 [% INCLUDE 'header.inc' %]
50 [% INCLUDE 'cat-search.inc' %]
52 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
55 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
58 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
61 [% IF ( unknownbiblionumber ) %]
63 <a href="#" aria-current="page">
69 [% INCLUDE 'biblio-title.inc' link = 1 %]
72 <a href="#" aria-current="page">
80 <div class="main container-fluid">
82 <div class="col-sm-10 col-sm-push-2">
86 [% IF ( unknownbiblionumber ) %]
87 <div class="dialog message">The record you requested does not exist ([% biblionumber | html %]).</div>
90 [% IntranetCoce = Koha.Preference('IntranetCoce') %]
91 [% CoceProviders = Koha.Preference('CoceProviders') %]
92 [% CoceHost = Koha.Preference('CoceHost') %]
93 [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
95 [% INCLUDE 'cat-toolbar.inc' %]
96 [% IF decoding_error %]
98 <span class="biberror">
99 There is an error with this bibliographic record, the view may be degraded.</span>
100 <span class="error"><br/> Error: [% decoding_error | html %]</span>
103 [% IF analytics_error %]
105 <span class="analytics_error">
106 There was an error searching for analytic records, please see the logs for details.</span>
110 <!-- COinS / OpenURL -->
111 <span class="Z3988" title="[% ocoins | html %]"></span>
114 [% IF ( AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
115 <div id="catalogue_detail_biblio" class="col-xs-9">
117 <div id="catalogue_detail_biblio" class="col-xs-12">
120 [% XSLTBloc | $raw %]
122 [% IF shelves.count %]
123 <span class="results_summary"><span class="label">Lists that include this title: </span>
124 [% FOREACH s IN shelves %]
125 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a>
126 [% IF ( loop.last ) %][% ELSE %]|[% END %]
130 [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %]
131 <span class="results_summary"><span class="label">Tags:</span>
132 [% FOREACH TagLoo IN TagLoop %]
133 [% IF ( CAN_user_tools_moderate_tags ) %]
134 <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |uri %]">[% TagLoo.term | html %]</a>
136 [% TagLoo.term | html %]
138 <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
142 <span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber | uri %]&viewas=html" title="MARC" class="previewMARC">Show</a></span>
143 [% IF !item_level_itypes || Koha.Preference("BiblioItemtypeInfo") %]
144 <span class="results_summary itemtype"><span class="label">Itemtype:</span>
145 [% IF ( !noItemTypeImages && imageurl ) %]
146 <img src="[% imageurl | html %]" alt="" />
148 [% IF ( description ) %]
149 [% description | html %]
151 [% itemtype | html %]
156 [% IF ( holdcount ) %]
157 <span class="results_summary">
158 <span class="label">Holds:</span>
159 <span class="number_box">
160 [% IF CAN_user_reserveforothers_place_holds %]
161 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber | uri %]">[% holdcount | html %]</a>
163 <span>[% holdcount | html %]</span>
169 [% IF illrequests.count %]
170 <span class="results_summary">
171 <span class="label">ILL requests:</span>
172 [% IF CAN_user_ill %]
173 [% FOREACH ill IN illrequests %]
174 <a href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% ill.illrequest_id | uri %]">Request [% ill.illrequest_id | html %]</a>[% IF ! loop.last %], [% END %]
177 [% FOREACH ill IN illrequests %]
178 <span>Request [% ill.illrequest_id | html %]</span>[% IF ! loop.last %], [% END %]
184 [% IF ( article_requests_count = Biblio.ArticleRequestsActiveCount( biblionumber ) ) %]
185 <span class="results_summary">
186 <span class="label">Article requests:</span>
187 <span class="number_box">
188 <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | uri %]">[% article_requests_count | html %]</a>
193 [% IF course_reserves %]
194 <span class="results_summary"><span class="label">Courses that have reserved this title: </span>
195 [% FOREACH c IN course_reserves %]
196 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% c.course_id | uri %]">[% c.course.course_name | html %]</a>
197 [% IF ( loop.last ) %][% ELSE %]|[% END %]
202 [% IF ( AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
204 <div class="col-xs-3 bookcoverimg">
205 <div id="biblio-cover-slider" class="cover-slider">
206 [% IF ( LocalCoverImages ) %]
207 [% IF localimages.count %]
208 [% FOREACH image IN localimages %]
209 <div class="cover-image local-coverimg">
210 <a href="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
211 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]" />
213 <div class="hint">Local cover image</div>
219 [% IF ( AmazonCoverImages && normalized_isbn) %]
220 <div class="cover-image" id="amazon-bookcoverimg">
221 <a href="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.LZZZZZZZ.jpg" title="Amazon cover image">
222 <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.MZZZZZZZ.jpg" alt="Amazon cover image" data-link="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"/>
224 <div class="hint">Image from Amazon.com</div>
228 [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
229 [% coce_id = normalized_ean || normalized_isbn %]
230 <div class="cover-image" id="coce-coverimg">
232 <a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a>
234 <span class="no-image">No cover image available</span>
236 <div class="hint">Image from Coce</div>
240 [% IF ( SyndeticsCovers ) %]
241 [% IF ( content_identifier_exists ) %]
242 <div class="cover-image" id="syndetics-bookcoverimg">
243 <a href="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | url %]/LC.GIF&client=[% Koha.Preference('SyndeticsClientCode') | url %]&type=xw10&upc=[% normalized_upc | url %]&oclc=[% normalized_oclc | url %]" title="Syndetics cover image">
244 <img src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | url %]/[% Koha.Preference('SyndeticsCoverImageSize') | url %].GIF&client=[% Koha.Preference('SyndeticsClientCode') | url %]&type=xw10&upc=[% normalized_upc | url %]&oclc=[% normalized_oclc | url %]" alt="" class="thumbnail" />
246 <div class="hint">Image from Syndetics</div>
249 <span class="no-image">No cover image available</span>
253 [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
254 [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
255 [% IF custom_cover_image_url %]
256 <div class="cover-image" id="custom-coverimg">
257 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]" title="Custom cover image">
258 <img id="custom-img" alt="Custom cover image" src="[% custom_cover_image_url | url %]" />
260 <div class="hint">Custom cover image</div>
264 </div> <!-- /.cover-slider -->
265 </div> <!-- /.bookcoverimg.col-xs-3 -->
267 </div> <!-- /.col-xs-* -->
268 [% END # /IF ( AmazonCoverImages, etc ) %]
271 <div id="bibliodetails" class="toptabs">
273 <ul class="nav nav-tabs" role="tablist">
274 [% IF (SeparateHoldings) %]
275 <li role="presentation">
276 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">[% Branches.GetLoggedInBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
278 <li role="presentation">
279 <a href="#otherholdings" aria-controls="otherholdings" role="tab" data-toggle="tab">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
282 <li role="presentation">
283 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">Holdings ([% itemloop.size() || 0 | html %])</a>
286 [% IF Koha.Preference('EnableItemGroups') %]
287 <li role="presentation">
288 <a href="#item_groups" aria-controls="item_groups" role="tab" data-toggle="tab">Item groups</a>
291 [% IF ( MARCNOTES || notes ) %]<li role="presentation"><a href="#description" aria-controls="description" role="tab" data-toggle="tab">Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</a></li>[% END %]
292 [% IF ComponentParts && ComponentParts.size %]<li id="components_tab" role="presentation"><a href="#components" aria-controls="components" role="tab" data-toggle="tab">Components ([% ComponentParts.size | html %])</a></li>[% END %]
293 [% IF ( subscriptionsnumber ) %]<li role="presentation"><a href="#subscriptions" aria-controls="subscriptions" role="tab" data-toggle="tab">Subscriptions</a></li>[% END %]
294 [% IF Koha.Preference('AcquisitionDetails') %]<li role="presentation"><a href="#acq_details" aria-controls="acq_details" role="tab" data-toggle="tab">Acquisition details</a></li>[% END %]
295 [% IF suggestions.count %]<li role="presentation"><a href="#suggestion_details" aria-controls="suggestion_details" role="tab" data-toggle="tab">Suggestion details</a></li>[% END %]
296 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li role="presentation"><a href="#editions" aria-controls="editions" role="tab" data-toggle="tab">Editions</a></li>[% END %][% END %]
297 [% IF ( LocalCoverImages ) %]
298 <li role="presentation">
299 <a href="#images" aria-controls="images" role="tab" data-toggle="tab">Images ([% localimages.count || 0 | html %])</a>
302 [% IF HTML5MediaEnabled && HTML5MediaSets.size %]
303 <li id="media_tab" role="presentation"><a href="#html5media" aria-controls="html5media" role="tab" data-toggle="tab">Play media</a></li>
305 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
306 <li class="NovelistSelect" style="display:none;" role="presentation"><a href="#NovelistSelect" aria-controls="NovelistSelect" role="tab" data-toggle="tab">NoveList Select</a></li>
308 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
309 <li role="presentation"><a href="#[% plugins_intranet_catalog_biblio_tab.id | uri %]" aria-controls="[% plugins_intranet_catalog_biblio_tab.id | uri %]" role="tab" data-toggle="tab">[% plugins_intranet_catalog_biblio_tab.title | html %]</a></li>
313 <div class="tab-content">
314 [% items_table_block_iter = 0 %]
315 [% BLOCK items_table %]
316 [% items_table_block_iter = items_table_block_iter + 1 %]
317 <div class="[% tab | html %]_table_table_controls">
318 [% IF (StaffDetailItemSelection) %]
319 | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a> |
320 <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
321 <span class="itemselection_actions">
323 [% IF CAN_user_tools_items_batchdel %]
324 <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
326 [% IF CAN_user_tools_items_batchmod %]
327 <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
329 [% IF CAN_user_editcatalogue_manage_item_groups && biblio.item_groups.count %]
330 <a class="itemselection_action_item_group_set" href="#"><i class="fa fa-book"></i> Add/move to item group</a>
331 <a class="itemselection_action_item_group_unset" href="#"><i class="fa fa-unlink"></i> Remove from item group</a>
336 <table class="items_table" id="[% tab | html %]_table">
339 [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
340 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
341 <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th>
343 [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
344 <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
345 <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
346 [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
347 [% IF Koha.Preference('EnableItemGroups') %]
348 <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
350 <th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th>
352 <th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th>
354 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
355 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen">Last seen</th>
356 <th id="[% tab | html %]_issues" data-colname="[% tab | html %]_issues">Checkouts</th>
357 <th id="[% tab | html %]_renewals" data-colname="[% tab | html %]_renewals">Renewals</th>
358 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned">Date accessioned</th>
359 <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed">Date last borrowed</th>
360 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
361 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
362 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
363 [% IF ( itemdata_stocknumber ) %]<th id="[% tab | html %]_stocknumber" data-colname="[% tab | html %]_stocknumber">Inventory number</th>[% END %]
364 [% IF materials %]<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>[% END %]
365 [% IF ( itemdata_itemnotes ) %]<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>[% END %]
366 [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>[% END %]
367 [% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
368 [% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
369 [% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
370 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
371 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort"> </th>[% END %]
375 [% FOREACH item IN items %]
377 [% IF (StaffDetailItemSelection) %]
378 <td style="text-align:center;vertical-align:middle">
379 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
382 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
384 <div class="bookcoverimg">
385 <div class="cover-slider">
386 [% FOREACH image IN item.cover_images %]
387 <div class="cover-image local-coverimg">
388 <a href="/cgi-bin/koha/catalogue/image.pl?itemnumber=[% image.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
389 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/catalogue/imageviewer.pl?itemnumber=[% item.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" />
398 [% IF ( item_level_itypes ) %]
400 [% IF !noItemTypeImages && item.imageurl %]
401 <img src="[% item.imageurl | html %]" alt="[% item.translated_description | html %]" title="[% item.translated_description | html %]" />
403 <span class="itypedesc">[% item.translated_description | html %]</span>
406 <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td>
407 <td class="homebranch">
408 <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
409 <span class="shelvingloc">
411 If permanent location is defined, show description or code and display current location in parentheses. If not, display current location.
412 Note that permanent location is a code, and location may be an authval.
414 [% IF item.permanent_location %]
415 [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
416 [% permloc_authval | html %]
417 [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %]
418 ([% item.location | html %])
421 [% item.location | html %]
425 [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
426 [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
427 <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
429 [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
430 <td class="enumchron" data-order="[% item.publisheddate | html %]">
432 <td class="enumchron">
434 [% IF ( itemdata_enumchron ) %]
435 [% IF item.enumchron && item.serialseq %]
436 <span class="enum">[% item.enumchron | html %]</span>
437 [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %]
438 <span class="sep"> -- </span>
439 <span class="serialseq">[% item.serialseq | html %]</span>
441 [% ELSIF item.enumchron %]
442 <span class="enum">[% item.enumchron | html %]</span>
443 [% ELSIF item.serialseq %]
444 <span class="serialseq">[% item.serialseq | html %]</span>
446 [% IF ( item.publisheddate ) %]
447 <span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
455 [% IF item.CheckedOutFor %]
456 [% IF item.onsite_checkout %]
457 <span>Currently in local use
459 <span class="datedue">Checked out
461 [% UNLESS ( item.NOTSAMEBRANCH ) %]
462 [% IF item.onsite_checkout %]
467 [% INCLUDE 'patron-title.inc' patron=item.CheckedOutFor hide_patron_infos_if_needed=1 %]
469 : due [% item.datedue | html %]
471 [% ELSIF ( item.transfertwhen ) %]
472 <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
475 [% IF ( item.itemlost ) %]
476 [% IF itemlostloop %]
477 [% FOREACH itemlostloo IN itemlostloop %]
478 [% IF itemlostloo.authorised_value == item.itemlost %]
479 <span class="lost">[% itemlostloo.lib | html %]</span>
483 <span class="lost">Unavailable (lost or missing)</span>
487 [% IF ( item.withdrawn ) %]
488 [% IF itemwithdrawnloop %]
489 [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
490 [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
491 <span class="wdn">[% itemwithdrawnloo.lib | html %]</span>
495 <span class="wdn">Withdrawn</span>
499 [% IF ( item.damaged ) %]
500 [% IF itemdamagedloop %]
501 [% FOREACH itemdamagedloo IN itemdamagedloop %]
502 [% IF itemdamagedloo.authorised_value == item.damaged %]
503 <span class="dmg">[% itemdamagedloo.lib | html %]</span>
507 <span class="dmg">Damaged</span>
511 [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
512 <span class="notforloan">Not for loan
513 [% IF ( item.notforloanvalue ) %]
514 <span class="reason">([% item.notforloanvalue | html %])</span>
519 [% SET hold = item.first_hold %]
521 [% IF hold.waitingdate %]
522 <span class="waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].</span>
523 [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
524 <span class="heldfor">Hold for:</span>
525 [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
528 <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span>
532 [% IF item.recalled %]
533 [% IF item.recall.waiting_date %]
534 <span>Waiting at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.waiting_date | $KohaDates %]</span>
536 [% patron_link = BLOCK %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.recall.patron_id | uri %]">[% item.recall.patron.firstname | html %] [% item.recall.patron.surname | html %] ([% item.recall.patron.cardnumber | html %])</a>[% END %]
537 <span>Item recalled by [% patron_link| $raw %] on [% item.recall.created_date | $KohaDates %]</span>
541 [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold || item.recalled ) %]
542 <span>Available</span>
545 [% IF ( item.restricted ) %]
546 <span class="restricted">([% item.restrictedvalue | html %])</span>
549 <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
550 <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
551 <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
552 <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
553 <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td>
554 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type | uri %]&itemnumber=[% item.itemnumber | uri %]&biblionumber=[% item.biblionumber | uri %]&bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
555 [% IF ( itemdata_uri ) %]
556 [% IF item.uri.split(' \| ').size > 1 %]
558 [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %]
563 <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a>
568 [% IF ( itemdata_copynumber ) %]
569 <td class="copynumber">[% item.copynumber | html %]</td>
571 [% IF ( itemdata_stocknumber ) %]
572 <td class="stocknumber">[% item.stocknumber | html %]</td>
575 <td class="materials"> [% item.materials | html %] </td>
577 [% IF ( itemdata_itemnotes ) %]
578 <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td>
580 [% IF itemdata_nonpublicnotes %]
581 <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
583 [% IF ( hostrecords ) %]
584 <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
588 [% IF ( item.countanalytics ) %]
589 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
594 <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
597 [% IF ShowCourseReserves %]
599 [% IF item.course_reserves %]
600 [% FOREACH r IN item.course_reserves %]
601 [% IF r.course.enabled == 'yes' %]
603 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
604 [% r.course.course_name | html %]
605 <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
606 [% IF r.course.section %] [% r.course.section | html %] [% END %]
607 [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
616 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
617 <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>
620 [% IF CAN_user_editcatalogue_edit_items %]
622 [% UNLESS item.cannot_be_edited %]
623 [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
624 <div class="btn-group">
625 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
626 <ul class="dropdown-menu pull-right">
627 <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>
631 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a>
641 [% END %][%# end of block items_table %]
643 [% IF Koha.Preference('EnableItemGroups') %]
644 <div role="tabpanel" class="tab-pane" id="item_groups">
645 [% IF CAN_user_editcatalogue_manage_item_groups %]
646 <div class="item_groups_table_table_controls">
647 <a href="#" class="item-group-create btn btn-default btn-xs"><i class="fa fa-plus"></i> New item group</a>
650 <table class="items-group-table" id="items-group-table">
653 <td>Display Order</td>
663 <div role="tabpanel" class="tab-pane" id="holdings">
665 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
666 <span class="results_summary NovelistSelect" style="display:none;">
667 <span class="label">Novelist Select: </span>
668 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
673 [% IF ( showncount ) %]
674 [% PROCESS items_table tab="holdings" items=itemloop %]
676 [% IF ( hiddencount ) %]
677 <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
679 [% IF ( debug_display ) %]
682 <tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron | html %]</td></tr>
683 <tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber | html %]</td></tr>
684 <tr><td>serial</td><td>[% serial | html %]</td></tr>
688 [% IF ( ALTERNATEHOLDINGS ) %]
689 [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
690 <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
693 <div id="noitems">No physical items for this record</div>
697 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
698 <span class="results_summary NovelistSelect" style="display:none;">
699 <span class="label">Novelist Select: </span>
700 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
705 [% IF (SeparateHoldings) %]
706 <div role="tabpanel" class="tab-pane" id="otherholdings">
707 [% IF (otheritemloop.size) %]
708 [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
710 <span class="nootheritems">No other items.</span>
715 [% IF ( MARCNOTES ) %]
717 <div role="tabpanel" class="tab-pane" id="description">
718 <div class="content_set">
720 [% FOREACH MARCNOTE IN MARCNOTES %]
722 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
723 <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
725 [% MARCNOTE.marcnote | html | html_line_break %]
734 [% IF ComponentParts && ComponentParts.size %]
735 <div role="tabpanel" class="tab-pane" id="components">
736 <div class="content_set">
738 [% FOR PART IN ComponentParts %]
746 [% IF ComponentParts.size == Koha.Preference('MaxComponentRecords')%]
747 <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>
749 </div> <!-- /.content_set -->
750 </div> <!-- /#components -->
754 [% IF ( subscriptionsnumber ) %]
755 <div role="tabpanel" class="tab-pane" id="subscriptions">
756 <div id="catalogue_detail_subscriptions">
757 <h2>This is a serial subscription</h2>
758 <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p>
759 [% FOREACH subscription IN subscriptions %]
760 [% IF subscription.branchcode %]
761 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
763 [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
764 [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]</p>[% END %]
765 [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
766 [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
767 [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
768 [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
769 [% IF ( subscription.latestserials ) %]
770 <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
774 <th>Date arrived</th>
775 <th>Date published</th>
779 [% FOREACH latestserial IN subscription.latestserials %]
781 <td>[% latestserial.serialseq | html %]</td>
782 <td data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
783 <td data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
785 [% IF ( latestserial.status1 ) %]<span>Expected</span>[% END %]
786 [% IF ( latestserial.status2 ) %]<span>Arrived</span>[% END %]
787 [% IF ( latestserial.status3 ) %]<span>Late</span>[% END %]
788 [% IF ( latestserial.status4 ) %]<span>Missing</span>[% END %]
789 [% IF ( latestserial.status41 ) %]<span>Missing (never received)</span>[% END %]
790 [% IF ( latestserial.status42 ) %]<span>Missing (sold out)</span>[% END %]
791 [% IF ( latestserial.status43 ) %]<span>Missing (damaged)</span>[% END %]
792 [% IF ( latestserial.status44 ) %]<span>Missing (lost)</span>[% END %]
793 [% IF ( latestserial.status5 ) %]<span>Not issued</span>[% END %]
794 [% IF ( latestserial.status6 ) %]<span>Delete</span>[% END %]
795 [% IF ( latestserial.status7 ) %]<span>Claimed</span>[% END %]
796 [% IF ( latestserial.status8 ) %]<span>Stopped</span>[% END %]
798 <td>[% latestserial.notes | html %]</td>
803 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]">Subscription details</a>
809 [% IF Koha.Preference('AcquisitionDetails') %]
810 <div role="tabpanel" class="tab-pane" id="acq_details">
811 [% IF orders.count %]
817 <th>Basket group</th>
819 <th>Order number</th>
820 <th>Creation date</th>
821 <th>Receive date</th>
824 <th title="Estimated cost tax incl. while pending, actual cost tax incl. once received">Price</th>
825 <th>Internal note</th>
826 <th>Subscription</th>
827 <th>Subscription call number</th>
831 [% FOR order IN orders %]
832 [% SET basket = order.basket %]
833 [% SET vendor = basket.bookseller %]
836 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
839 [% IF order.invoiceid %]
840 [% IF CAN_user_acquisition %]
841 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
842 title="Invoice detail page">
843 [% order.invoice.invoicenumber | html %]</a>
845 [% order.invoice.invoicenumber | html %]
850 [% IF basket.basketgroupid %]
851 [% SET basket_group = basket.basket_group %]
852 [% IF CAN_user_acquisition_group_manage %]
853 <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>
855 [% basket_group.name | html %] ([% basket_group.id | html %])
859 <td>[% IF CAN_user_acquisition_order_manage %]
860 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
862 [% basket.basketname | html %] ([% basket.basketno | html %])
864 <td>[% order.ordernumber | html %]</td>
865 <td data-order="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</td>
866 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</td>
868 [% SWITCH order.orderstatus %]
869 [% CASE 'new' %]<span>New</span>
870 [% CASE 'ordered' %]<span>Ordered</span>
871 [% CASE 'partial' %]<span>Partial</span>
872 [% CASE 'complete' %]<span>Complete</span>
873 [% CASE 'cancelled' %]<span>Cancelled</span>
876 <td>[% order.quantity | html %]</td>
877 <td>[% IF ( order.unitprice_tax_included > 0 ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %]
878 <td>[% order.order_internalnote | html %]</td>
880 [% IF order.subscriptionid %]
881 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
885 [% IF order.subscriptionid %]
886 [% order.subscription.callnumber | html %]
894 <span class="noorder">There is no order for this bibliographic record.</span>
899 [% IF suggestions.count %]
900 <div role="tabpanel" class="tab-pane" id="suggestion_details">
901 [% IF nb_archived_suggestions > 0 %]
902 <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw %]
904 <table id="suggestions" class="sorted">
907 <th class="NoSort"> </th>
908 <th class="anti-the">Suggestion</th>
909 <th>Suggested by - on</th>
910 <th>Managed by - on</th>
911 <th>Last modification by - on</th>
918 [% FOREACH suggestion IN suggestions %]
920 <td>[% suggestion.suggestionid | html %]</td>
922 <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show" title="suggestion" >
923 [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
925 [% IF ( suggestion.copyrightdate ) %]© [% suggestion.copyrightdate | html %] [% END %]
926 [% IF ( suggestion.volumedesc ) %]; Volume:<em>[% suggestion.volumedesc | html %]</em> [% END %]
927 [% 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 %]
930 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
931 [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
934 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
935 [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
938 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
939 [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
942 [% Branches.GetName( suggestion.branchcode ) | html %]
945 [% suggestion.fund.budget_name | html %]
948 [% IF suggestion.STATUS == 'ASKED' %]<span>Pending</span>
949 [% ELSIF suggestion.STATUS == 'ACCEPTED' %]<span>Accepted</span>
950 [% ELSIF suggestion.STATUS == 'ORDERED' %]<span>Ordered</span>
951 [% ELSIF suggestion.STATUS == 'REJECTED' %]<span>Rejected</span>
952 [% ELSIF suggestion.STATUS == 'CHECKED' %]<span>Checked</span>
953 [% ELSIF suggestion.STATUS == 'AVAILABLE' %]<span>Available</span>
954 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
955 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
956 [% ELSE %]<span>Status unknown</span>
958 [% IF suggestion.reason %]
959 <br />([% suggestion.reason | html %])
969 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
970 <div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4>
972 [% 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 %]
973 [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %]<td>[% IF ( noItemTypeImages ) %][% XISBN.description | html %][% ELSE %]<img src="[% XISBN.imageurl | html %]" alt="[% XISBN.description | html %]" title="[% XISBN.description | html %]">[% END %]</td>[% END %]
974 <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 %]
975 [% IF ( XISBN.publishercode ) %]
976 [% 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 %]
978 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
979 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
983 </table></div>[% END %]
986 [% IF ( LocalCoverImages ) %]
987 <div role="tabpanel" class="tab-pane" id="images">
988 [% IF localimages.count %]
989 <p>Click on an image to view it in the image viewer</p>
990 <ul class="thumbnails">
991 [% FOREACH image IN localimages %]
993 <li id="imagenumber-[% image.imagenumber | html %]" class="thumbnail">
994 <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]">
995 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" />
997 [% IF CAN_user_tools_upload_local_cover_images %]
998 <a href="#" class="remove"><i class="fa fa-trash"></i> Delete image</a>
1004 [% ELSE # - No image passed JavaScript takes care %]
1005 <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span>
1007 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1008 <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>
1014 [% IF ( HTML5MediaEnabled ) %]
1015 <div role="tabpanel" class="tab-pane" id="html5media">
1016 [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
1018 [% IF HTML5MediaSet.is_youtube %]
1019 <iframe id="player" width="640" height="360" src="[% HTML5MediaSet.srcblock | url %]"></iframe>
1021 <[% HTML5MediaParent | html %] controls preload=none>
1022 <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
1023 [[% HTML5MediaParent | html %] tag not supported by your browser.]
1024 </[% HTML5MediaParent | html %]>
1032 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
1033 <div role="tabpanel" class="tab-pane" id="NovelistSelect" class="novelistSelect">
1034 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
1038 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
1039 <div role="tabpanel" class="tab-pane" id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
1040 [% plugins_intranet_catalog_biblio_tab.content | $raw %]
1044 </div><!-- /tab-content -->
1045 </div><!-- /bibliodetails -->
1047 <div id="export" style="margin-top: 1em;">
1048 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
1050 <th>Save record</th> </tr>
1051 <tr><td> Select download format: <select name="format">
1052 <option value="mods">MODS (XML)</option>
1053 <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
1054 <option value="marcxml">MARCXML</option>
1055 <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1056 <option value="utf8">MARC (Unicode/UTF-8)</option> </select>
1057 <input type="submit" name="save" value="Download record" /></td>
1060 <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
1066 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
1067 <div class="modal-dialog modal-lg">
1068 <div class="modal-content">
1069 <div class="modal-header">
1070 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1071 <h3 id="marcPreviewLabel">MARC preview</h3>
1073 <div class="modal-body">
1074 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
1076 <div class="modal-footer">
1077 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1084 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1086 <div class="col-sm-2 col-sm-pull-10">
1088 [% INCLUDE 'biblio-view-menu.inc' %]
1090 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1091 </div> <!-- /.row -->
1095 <div class="modal fade" id="modal-item-group-create" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-create-label">
1096 <div class="modal-dialog">
1097 <div class="modal-content">
1098 <div class="modal-header">
1099 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1100 <h3 id="modal-item-group-create-label"><i class="fa fa-plus"></i> Create a new item group</h3>
1102 <form id="modal-item-group-create-form" class="validated">
1103 <div class="modal-body">
1106 <label for="item_group_description" class="required">Name: </label>
1107 <input name="description" id="modal-item-group-create-form-description" type="text" size="30" required="required" class="required" />
1108 <span class="required">Required</span>
1111 <label for="item_group_display_order" class="required">Display order: </label>
1112 <input name="display_order" id="modal-item-group-create-form-display_order" value="0" size="5" required="required" class="required" />
1113 <span class="required">Required</span>
1115 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1119 <div class="modal-footer">
1120 <button id="modal-item-group-create-submit" class="btn btn-default"><i class="fa fa-plus"></i> Submit</button>
1121 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1128 <div class="modal fade" id="modal-item-group-edit" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-edit-label">
1129 <div class="modal-dialog">
1130 <div class="modal-content">
1131 <div class="modal-header">
1132 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1133 <h3 id="modal-item-group-edit-label"><i class='fa fa-edit'></i> Edit item group</h3>
1135 <form id="modal-item-group-edit-form" class="validated">
1136 <div class="modal-body">
1139 <label for="item_group_description" class="required">Name: </label>
1140 <input name="description" id="modal-item-group-edit-form-description" type="text" size="30" required="required" class="required" />
1141 <span class="required">Required</span>
1144 <label for="item_group_display_order" class="required">Sort order: </label>
1145 <input name="display_order" id="modal-item-group-edit-form-display_order" size="5" />
1146 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1150 <div class="modal-footer">
1151 <button id="modal-item-group-edit-submit" class="btn btn-default"><i class='fa fa-edit'></i> Submit</button>
1152 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1159 <div class="modal fade" id="modal-item-group-delete" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-delete-label">
1160 <div class="modal-dialog">
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="modal-item-group-delete-label"><i class='fa fa-trash'></i> Delete item group</h3>
1166 <div class="modal-body">
1167 Are you sure you want to delete this item group?
1169 <div class="modal-footer">
1170 <button id="modal-item-group-delete-submit" class="btn btn-danger"><i class='fa fa-trash'></i> Delete</button>
1171 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1177 <div class="modal fade" id="modal-item-group-set" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-set-label">
1178 <div class="modal-dialog">
1179 <div class="modal-content">
1180 <div class="modal-header">
1181 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1182 <h3 id="modal-item-group-set-label"><i class='fa fa-book'></i> Set item group for items</h3>
1184 <form id="modal-item-group-set-form" class="validated">
1185 <div class="modal-body">
1188 <label for="item_group" class="required">Item group: </label>
1189 <select name="item_group" id="item-group-add-form-select">
1190 [% FOREACH ig IN biblio.item_groups %]
1191 <option value="[% ig.id | html %]">[% ig.description | html %]</option>
1194 <span class="required">Required</span>
1198 <div class="modal-footer">
1199 <button id="modal-item-group-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set item group</button>
1200 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1207 <div class="modal fade" id="modal-item-group-unset" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-unset-label">
1208 <div class="modal-dialog">
1209 <div class="modal-content">
1210 <div class="modal-header">
1211 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1212 <h3 id="modal-item-group-unset-label"><i class='fa fa-unlink'></i> Remove item from item group</h3>
1214 <div class="modal-body">
1215 Are you sure you want to remove these item(s) from their item group(s)?
1217 <div class="modal-footer">
1218 <button id="modal-item-group-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button>
1219 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1225 [% MACRO jsinclude BLOCK %]
1226 [% INCLUDE 'catalog-strings.inc' %]
1227 [% Asset.js("js/catalog.js") | $raw %]
1228 [% Asset.js("js/recalls.js") | $raw %]
1229 [% Asset.js("js/coce.js") | $raw %]
1230 [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1232 var interface = "[% interface | html %]";
1233 var theme = "[% theme | html %]";
1234 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
1235 function verify_cover_images() {
1236 // Loop over each container in the template which contains covers
1237 $(".cover-slider").each(function(){
1238 var lightbox_descriptions = [];
1239 $(this).find(".cover-image").each( function( index ){
1241 // Find the image in the container
1242 var img = div.find("img")[0];
1243 if( $(img).length > 0 ){
1244 var description = "";
1245 if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){
1246 // No image loaded in the container. Remove the slide
1249 // All slides start hidden. If this is the first one, show it.
1253 // Check if Amazon image is present
1254 if ( div.attr("id") == "amazon-bookcoverimg" ) {
1257 if ((w == 1) || (h == 1)) {
1258 // Amazon returned single-pixel placeholder
1259 // Remove the container
1262 lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1264 } else if( div.attr("id") == "custom-coverimg" ){
1265 if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1266 // No image was loaded via the CustomCoverImages system preference
1267 // Remove the container
1270 lightbox_descriptions.push("Custom cover image");
1272 } else if ( div.attr("id") == "syndetics-bookcoverimg" ){
1273 lightbox_descriptions.push(_("Syndetics cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1275 else if( div.attr("id") == "coce-coverimg" ){
1276 // Identify which service's image is being loaded by Coce
1277 var coce_description;
1278 if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1279 coce_description = ("Coce image from Amazon.com");
1280 } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1281 coce_description = _("Coce image from Google Books");
1282 } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1283 coce_description = _("Coce image from Open Library");
1285 div.find(".hint").html(coce_description);
1286 lightbox_descriptions.push(coce_description);
1287 } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1288 lightbox_descriptions.push(_("Local cover image (<a href='%s'>edit</a>)").format($(img).data('link')));
1290 lightbox_descriptions.push(_("Cover image source unknown"));
1296 // Lightbox for cover images
1297 Chocolat(this.querySelectorAll('.cover-image a'), {
1298 description: function(){
1299 return lightbox_descriptions[this.settings.currentImageIndex];
1305 $(".cover-slider").each(function(){
1306 var coverSlide = this;
1307 var coverImages = $(this).find(".cover-image");
1308 if( coverImages.length > 1 ){
1309 coverImages.each(function( index ){
1310 // If more that one image is present, add a navigation link
1311 // for activating the slide
1312 var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1314 // Set the first navigation link as active
1315 $(covernav).addClass("nav-active");
1317 $(covernav).html("<i class=\"fa fa-circle\"></i>");
1318 $(coverSlide).append( covernav );
1322 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
1323 && $(coverSlide).find(".cover-image:visible").length < 1 ){
1324 $(coverSlide).remove();
1326 $(coverSlide).addClass("cover-slides");
1330 $("#editions img").each(function(i){
1331 if ( this.src.indexOf('amazon.com') >= 0 ) {
1334 if ((w == 1) || (h == 1)) {
1335 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1336 } else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) {
1337 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1343 function removeLocalImage(imagenumber) {
1344 var thumbnail = $("#imagenumber-" + imagenumber );
1345 var copy = thumbnail.html();
1346 thumbnail.find("img").css("opacity", ".2");
1347 thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
1349 url: "/cgi-bin/koha/svc/cover_images?action=delete&imagenumber=" + imagenumber,
1350 success: function(data) {
1351 $(data).each( function(i) {
1352 if ( this.deleted == 1 ) {
1355 thumbnail.html( copy );
1356 alert(_("An error occurred on deleting this image"));
1358 if ( $('ul.thumbnails > li').length == 0 ) {
1359 showNoImageMessage();
1363 error: function(data) {
1364 thumbnail.html( copy );
1365 alert(_("An error occurred on deleting this image"));
1370 function showNoImageMessage() {
1371 var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
1372 no_images_msg = '<p>' + no_images_msg + '</p>';
1373 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1374 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>");
1375 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
1377 $('#images').html(no_images_msg);
1380 [% IF StaffDetailItemSelection %]
1381 function itemSelectionBuildDeleteLink(div) {
1382 var itemnumbers = new Array();
1383 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1384 itemnumbers.push($(this).val());
1386 if (itemnumbers.length > 0) {
1387 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
1388 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1389 url += '&biblionumber=[% biblionumber | uri %]';
1390 url += '&src=CATALOGUING';
1391 $('a.itemselection_action_delete').attr('href', url);
1398 function itemSelectionBuildModifyLink(div) {
1399 var itemnumbers = new Array();
1400 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1401 itemnumbers.push($(this).val());
1403 if (itemnumbers.length > 0) {
1404 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
1405 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1406 url += '&biblionumber=[% biblionumber | uri %]';
1407 url += '&src=CATALOGUING';
1408 $('a.itemselection_action_modify').attr('href', url);
1415 function itemSelectionBuildActionLinks(tab) {
1416 var div = $("#" + tab);
1417 var delete_link_ok = itemSelectionBuildDeleteLink(div);
1418 var modify_link_ok = itemSelectionBuildModifyLink(div);
1419 if (modify_link_ok || delete_link_ok) {
1420 $('.itemselection_actions', div).show();
1422 $('.itemselection_actions', div).hide();
1426 $(document).ready(function() {
1427 $('table.items_table').each(function() {
1428 var div = $(this).parent().attr("id");
1429 itemSelectionBuildActionLinks(div);
1432 $("input[name='itemnumber'][type='checkbox']").change(function() {
1433 var div = $(this).parents('table').parent().parent().attr("id");
1434 itemSelectionBuildActionLinks(div);
1437 $(".SelectAll").on("click",function(e){
1439 var tab = $(this).data("tab");
1440 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
1441 itemSelectionBuildActionLinks(tab);
1444 $(".ClearAll").on("click",function(e){
1446 var tab = $(this).data("tab");
1447 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1448 itemSelectionBuildActionLinks(tab);
1453 $(document).ready(function() {
1454 // Pick details tab to display by default
1456 [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
1457 $(".nav-tabs a[href='#html5media']").tab("show");
1458 [% ELSIF ComponentParts && ComponentParts.size %]
1459 $(".nav-tabs a[href='#components']").tab("show");
1461 $(".nav-tabs a[href='#holdings']").tab("show");
1464 $(".nav-tabs a[href='#holdings']").tab("show");
1466 $('#search-form').focus();
1467 $('.thumbnails > li > .remove').click(function() {
1468 var result = confirm(_("Are you sure you want to delete this cover image?"));
1470 if ( result == true ) {
1471 var imagenumber = $(this).parent().attr('id').split('-')[1];
1472 removeLocalImage(imagenumber);
1477 [% IF ( IntranetCoce && CoceProviders ) %]
1478 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
1481 $("body").on("click",".previewMARC", function(e){
1483 var page = $(this).attr("href");
1484 $("#marcPreview .modal-body").load(page + " table");
1485 $('#marcPreview').modal({show:true});
1487 $("#marcPreview").on("hidden.bs.modal", function(){
1488 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
1490 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1491 novSelect.loadContentForQuery({
1492 ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1493 ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1496 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
1497 '[% Koha.Preference('NovelistSelectPassword') | html %]',
1499 if ( d.length > 0 ){ //If no content
1500 $(".NovelistSelect").show();
1504 $(".print-label").on("click", function(e){
1506 link = $(this).attr("href");
1507 openWindow(link,"Print spine label",400,400);
1509 $(".cover-slider").on("click",".cover-nav", function(e){
1511 var cover_slider = $(this).parent();
1512 // Adding click handler for cover image navigation links
1513 var num = $(this).data("num");
1514 $(cover_slider).find(".cover-nav").removeClass("nav-active");
1515 $(this).addClass("nav-active");
1516 $(cover_slider).find(".cover-image").hide();
1517 $(cover_slider).find(".cover-image").eq( num ).show();
1521 $(window).load(function() {
1522 verify_cover_images();
1525 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1526 <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1528 [% INCLUDE 'datatables.inc' %]
1529 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1530 [% INCLUDE 'columns_settings.inc' %]
1531 [% Asset.js("js/browser.js") | $raw %]
1532 [% Asset.js("js/table_filters.js") | $raw %]
1535 browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1538 $(document).ready(function() {
1539 var table_names = [ 'holdings_table', 'otherholdings_table' ];
1540 var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ];
1541 var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ];
1542 table_names.forEach( function( table_name, index ) {
1543 if ( !has_images[index] ) {
1544 table_settings[index].columns.splice(1,1);
1546 var dt_parameters = {
1549 'bAutoWidth': false,
1550 "bKohaColumnsUseNames": true,
1551 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1553 var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' );
1556 [% IF Koha.Preference('AcquisitionDetails') %]
1557 var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
1558 var acquisitiondetails_table = KohaTable("orders", {
1559 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1561 'bAutoWidth': false,
1562 "aaSorting": [[ 4, "desc" ]],
1566 [% IF suggestions.count %]
1567 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
1569 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
1570 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
1572 "sPaginationType": "full"
1578 $(document).ready(function() {
1579 var search_index = localStorage.getItem("cat_search_pulldown_selection");
1580 var search_value = localStorage.getItem("searchbox_value");
1581 if ( search_index ){ $('#cat-search-block select.advsearch').val(search_index)};
1582 if ( search_value ){ $('#cat-search-block #search-form').val(search_value)};
1586 [% IF Koha.Preference('EnableItemGroups') %]
1587 // Load item groups table
1588 var itemGroupsTable = KohaTable("items-group-table", {
1589 "bAutoWidth": false,
1590 'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
1593 "mDataProp": function( oObj ) {
1594 return oObj.display_order;
1598 "mDataProp": function( oObj ) {
1599 return oObj.description;
1603 "mDataProp": function( oObj ) {
1604 [% IF CAN_user_editcatalogue_manage_item_groups %]
1605 return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1606 <i class='fa fa-edit'></i> ${_("Edit")}
1609 + `<button class='item-group-delete btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1610 <i class='fa fa-trash'></i> ${('Delete')}
1619 "bProcessing": true,
1620 "bServerSide": false,
1621 "sAjaxSource": `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1`,
1622 "sAjaxDataProp": "",
1623 "fnServerData": function ( sSource, aoData, fnCallback ) {
1624 $.getJSON( sSource, aoData, function (json) {
1630 // Create new item groups
1631 $('.item-group-create').on('click', function(){
1632 $('#modal-item-group-create-form-description').val("");
1633 $('#modal-item-group-create-submit').removeAttr('disabled');
1634 $('#modal-item-group-create').modal('show');
1637 $("#modal-item-group-create-form").validate({
1638 submitHandler: function(form) {
1640 url: `/api/v1/biblios/${biblionumber}/item_groups`,
1641 headers: { "x-koha-embed": "items" },
1642 success: function(item_groups){
1643 $('#modal-item-group-create-submit').attr('disabled', 'disabled');
1646 "url": `/api/v1/biblios/${biblionumber}/item_groups`,
1649 "Content-Type": "application/json"
1651 "data": JSON.stringify(
1653 "description": $("#modal-item-group-create-form-description").val(),
1654 "display_order": $("#modal-item-group-create-form-display_order").val(),
1660 .done(function (response) {
1661 $('#item-group-add-form-select').append($('<option>', {
1662 value: response.item_group_id,
1663 text: response.description
1666 $('#modal-item-group-create').modal('hide');
1667 if ( item_groups.length == 0 ) {
1668 // This bib has no previous item groups, reload the page
1669 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
1671 // Has other item groups, just reload the table
1672 itemGroupsTable.api().ajax.reload();
1675 .fail(function(err) {
1676 var message = err.responseJSON.error;
1684 $('#modal-item-group-create').on('shown.bs.modal', function () {
1685 $('#modal-item-group-create-form-description').focus();
1688 // Edit existing item groups
1689 $('body').on( 'click', '.item-group-edit', function(){
1690 const item_group_id = $(this).data('item-group-id');
1691 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
1692 $.get( url, function( data ) {
1693 $('#modal-item-group-edit-form-description').val( data.description );
1694 $('#modal-item-group-edit-form-display_order').val( data.display_order );
1695 $('#modal-item-group-edit-submit').data('item-group-id', item_group_id );
1696 $('#modal-item-group-edit-submit').removeAttr('disabled');
1697 $('#modal-item-group-edit').modal('show');
1701 $("#modal-item-group-edit-form").validate({
1702 submitHandler: function(form) {
1703 $('#modal-item-group-edit-submit').attr('disabled', 'disabled');
1705 const item_group_id = $('#modal-item-group-edit-submit').data('item-group-id');
1706 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
1712 "Content-Type": "application/json"
1714 "data": JSON.stringify(
1716 "description": $("#modal-item-group-edit-form-description").val(),
1717 "display_order": $("#modal-item-group-edit-form-display_order").val(),
1723 .done(function (response) {
1724 $('#modal-item-group-edit').modal('hide');
1725 itemGroupsTable.api().ajax.reload();
1727 .fail(function(err) {
1728 var message = err.responseJSON.error;
1734 $('#modal-item-group-edit').on('shown.bs.modal', function () {
1735 $('#modal-item-group-edit-form-description').focus();
1738 // Delete existing item groups
1739 $('body').on( 'click', '.item-group-delete', function(){
1740 const item_group_id = $(this).data('item-group-id');
1741 $('#modal-item-group-delete-submit').data('item-group-id', item_group_id );
1742 $('#modal-item-group-delete-submit').removeAttr('disabled');
1743 $('#modal-item-group-delete').modal('show');
1745 $("#modal-item-group-delete-submit").on('click', function(){
1746 $('#modal-item-group-delete-submit').attr('disabled', 'disabled');
1747 const item_group_id = $("#modal-item-group-delete-submit").data('item-group-id');
1750 url: `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
1751 headers: { "x-koha-embed": "items" },
1752 success: function(item_group_data){
1754 "url": `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
1757 .done(function (response) {
1758 $('#modal-item-group-delete').modal('hide');
1759 $(`#item-group-add-form-select option[value='${item_group_id}']`).remove();
1760 if ( item_group_data.items === null ) {
1761 // No items for this item group, we can just refresh the table
1762 itemGroupsTable.api().ajax.reload();
1764 // This item group had items attached to it, we need to reload the page
1765 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
1768 .fail(function(err) {
1769 var message = err.responseJSON.error;
1776 // Add item(s) to a item group
1777 $('.itemselection_action_item_group_set').on('click', function(){
1778 $('#modal-item-group-set').modal('show');
1781 $("#modal-item-group-set-form").validate({
1782 submitHandler: function(form) {
1783 $('#modal-item-group-set-submit').attr('disabled', 'disabled');
1785 const item_group_id = $('#item-group-add-form-select').val();
1787 let itemnumbers = new Array();
1788 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
1789 const itemnumber = $(this).val();
1790 itemnumbers.push( itemnumber );
1792 if (itemnumbers.length > 0) {
1793 let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_item_group';
1794 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1795 url += '&biblionumber=[% biblionumber | uri %]';
1796 url += `&item_group_id=${item_group_id}`;
1798 window.location.replace(url);
1801 $('#modal-item-group-set').modal('hide');
1805 // Remove item(s) from an item group
1806 $('.itemselection_action_item_group_unset').on('click', function(){
1807 $('#modal-item-group-unset').modal('show');
1810 $("#modal-item-group-unset-submit").on('click', function(){
1811 $('#modal-item-group-unset-submit').attr('disabled', 'disabled');
1813 let itemnumbers = new Array();
1814 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
1815 const itemnumber = $(this).val();
1816 itemnumbers.push( itemnumber );
1818 if (itemnumbers.length > 0) {
1819 let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_item_group';
1820 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1821 url += '&biblionumber=[% biblionumber | uri %]';
1823 window.location.replace(url);
1826 $('#modal-item-group-unset').modal('hide');
1832 [% INCLUDE 'intranet-bottom.inc' %]