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 [% WRAPPER 'header.inc' %]
50 [% INCLUDE 'cat-search.inc' %]
53 [% WRAPPER 'sub-header.inc' %]
54 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
57 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
60 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
63 [% IF ( unknownbiblionumber ) %]
65 <a href="#" aria-current="page">
71 [% INCLUDE 'biblio-title.inc' link = 1 %]
74 <a href="#" aria-current="page">
83 <div class="main container-fluid">
85 <div class="col-sm-10 col-sm-push-2">
89 [% IF ( unknownbiblionumber ) %]
90 <div class="dialog message">The record you requested does not exist ([% biblionumber | html %]).</div>
93 [% IntranetCoce = Koha.Preference('IntranetCoce') %]
94 [% CoceProviders = Koha.Preference('CoceProviders') %]
95 [% CoceHost = Koha.Preference('CoceHost') %]
96 [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
98 [% INCLUDE 'cat-toolbar.inc' %]
99 [% IF decoding_error %]
101 <span class="biberror">
102 There is an error with this bibliographic record, the view may be degraded.</span>
103 <span class="error"><br/> Error: [% decoding_error | html %]</span>
106 [% IF analytics_error %]
108 <span class="analytics_error">
109 There was an error searching for analytic records, please see the logs for details.</span>
113 <!-- COinS / OpenURL -->
114 <span class="Z3988" title="[% ocoins | html %]"></span>
117 [% IF ( AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
118 <div id="catalogue_detail_biblio" class="col-xs-9">
120 <div id="catalogue_detail_biblio" class="col-xs-12">
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 [% IF !item_level_itypes || Koha.Preference("BiblioItemtypeInfo") %]
148 <span class="results_summary itemtype"><span class="label">Itemtype:</span>
149 [% IF ( !noItemTypeImages && imageurl ) %]
150 <img src="[% imageurl | html %]" alt="" />
152 [% IF ( description ) %]
153 <span class="itypetext">[% description | html %]</span>
155 <span class="itypetext">[% itemtype | html %]</span>
160 [% IF ( holdcount ) %]
161 <span class="results_summary">
162 <span class="label">Holds:</span>
163 <span class="number_box">
164 [% IF CAN_user_reserveforothers_place_holds %]
165 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber | uri %]">[% holdcount | html %]</a>
167 <span>[% holdcount | html %]</span>
173 [% IF illrequests.count %]
174 <span class="results_summary">
175 <span class="label">ILL requests:</span>
176 [% IF CAN_user_ill %]
177 [% FOREACH ill IN illrequests %]
178 <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 %]
181 [% FOREACH ill IN illrequests %]
182 <span>Request [% ill.illrequest_id | html %]</span>[% IF ! loop.last %], [% END %]
188 [% IF ( article_requests_count = Biblio.ArticleRequestsActiveCount( biblionumber ) ) %]
189 <span class="results_summary">
190 <span class="label">Article requests:</span>
191 <span class="number_box">
192 <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | uri %]">[% article_requests_count | html %]</a>
197 [% IF course_reserves %]
198 <span class="results_summary"><span class="label">Courses that have reserved this title: </span>
199 [% FOREACH c IN course_reserves %]
200 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% c.course_id | uri %]">[% c.course.course_name | html %]</a>
201 [% IF ( loop.last ) %][% ELSE %]|[% END %]
205 </div> [%# .page-section %]
207 [% IF ( AmazonCoverImages || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
209 <div class="col-xs-3 bookcoverimg">
210 <div id="biblio-cover-slider" class="cover-slider">
211 [% IF ( LocalCoverImages ) %]
212 [% IF localimages.count %]
213 [% FOREACH image IN localimages %]
214 <div class="cover-image local-coverimg">
215 <a href="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
216 <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 %]" />
218 <div class="hint">Local cover image</div>
224 [% IF ( AmazonCoverImages && normalized_isbn) %]
225 <div class="cover-image" id="amazon-bookcoverimg">
226 <a href="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | uri %].01.LZZZZZZZ.jpg" title="Amazon cover image">
227 <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"/>
229 <div class="hint">Image from Amazon.com</div>
233 [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
234 [% coce_id = normalized_ean || normalized_isbn %]
235 <div class="cover-image coce-coverimg">
237 <a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a>
239 <span class="no-image">No cover image available</span>
241 <div class="hint">Image from Coce</div>
245 [% IF ( SyndeticsCovers ) %]
246 [% IF ( content_identifier_exists ) %]
247 <div class="cover-image" id="syndetics-bookcoverimg">
248 <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">
249 <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" />
251 <div class="hint">Image from Syndetics</div>
254 <span class="no-image">No cover image available</span>
258 [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
259 [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
260 [% IF custom_cover_image_url %]
261 <div class="cover-image" id="custom-coverimg">
262 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]" title="Custom cover image">
263 <img id="custom-img" alt="Custom cover image" src="[% custom_cover_image_url | url %]" />
265 <div class="hint">Custom cover image</div>
269 </div> <!-- /.cover-slider -->
270 </div> <!-- /.bookcoverimg.col-xs-3 -->
272 </div> <!-- /.col-xs-* -->
273 [% END # /IF ( AmazonCoverImages, etc ) %]
276 <div id="bibliodetails" class="toptabs">
278 <ul class="nav nav-tabs" role="tablist">
279 [% IF (SeparateHoldings) %]
280 <li role="presentation">
281 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">[% Branches.GetLoggedInBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
283 <li role="presentation">
284 <a href="#otherholdings" aria-controls="otherholdings" role="tab" data-toggle="tab">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
287 <li role="presentation">
288 <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">Holdings ([% itemloop.size() || 0 | html %])</a>
291 [% IF Koha.Preference('EnableItemGroups') %]
292 <li role="presentation">
293 <a href="#item_groups" aria-controls="item_groups" role="tab" data-toggle="tab">Item groups</a>
296 [% 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 %]
297 [% 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 %]
298 [% IF ( subscriptionsnumber ) %]<li role="presentation"><a href="#subscriptions" aria-controls="subscriptions" role="tab" data-toggle="tab">Subscriptions</a></li>[% END %]
299 [% 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 %]
300 [% IF suggestions.count %]<li role="presentation"><a href="#suggestion_details" aria-controls="suggestion_details" role="tab" data-toggle="tab">Suggestion details</a></li>[% END %]
301 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li role="presentation"><a href="#editions" aria-controls="editions" role="tab" data-toggle="tab">Editions</a></li>[% END %][% END %]
302 [% IF ( LocalCoverImages ) %]
303 <li role="presentation">
304 <a href="#images" aria-controls="images" role="tab" data-toggle="tab">Images ([% localimages.count || 0 | html %])</a>
307 [% IF HTML5MediaEnabled && HTML5MediaSets.size %]
308 <li id="media_tab" role="presentation"><a href="#html5media" aria-controls="html5media" role="tab" data-toggle="tab">Play media</a></li>
310 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
311 <li class="NovelistSelect" style="display:none;" role="presentation"><a href="#NovelistSelect" aria-controls="NovelistSelect" role="tab" data-toggle="tab">NoveList Select</a></li>
313 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
314 <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>
318 <div class="tab-content">
319 [% items_table_block_iter = 0 %]
320 [% BLOCK items_table %]
321 [% items_table_block_iter = items_table_block_iter + 1 %]
322 <div class="[% tab | html %]_table_table_controls">
323 [% IF (StaffDetailItemSelection) %]
324 | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a> |
325 <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
326 <span class="itemselection_actions">
328 [% IF CAN_user_tools_items_batchdel %]
329 <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
331 [% IF CAN_user_tools_items_batchmod %]
332 <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
334 [% IF CAN_user_editcatalogue_manage_item_groups && biblio.item_groups.count %]
335 <a class="itemselection_action_item_group_set" href="#"><i class="fa fa-book"></i> Add/move to item group</a>
336 <a class="itemselection_action_item_group_unset" href="#"><i class="fa fa-unlink"></i> Remove from item group</a>
341 <table class="items_table" id="[% tab | html %]_table">
344 [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
345 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
346 <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th>
348 [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
349 <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
350 <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
351 [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
352 [% IF Koha.Preference('EnableItemGroups') %]
353 <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
355 <th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th>
357 <th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th>
359 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
360 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen">Last seen</th>
361 <th id="[% tab | html %]_issues" data-colname="[% tab | html %]_issues">Checkouts</th>
362 <th id="[% tab | html %]_renewals" data-colname="[% tab | html %]_renewals">Renewals</th>
363 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned">Date accessioned</th>
364 <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed">Date last borrowed</th>
365 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
366 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
367 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
368 [% IF ( itemdata_stocknumber ) %]<th id="[% tab | html %]_stocknumber" data-colname="[% tab | html %]_stocknumber">Inventory number</th>[% END %]
369 [% IF materials %]<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>[% END %]
370 [% IF ( itemdata_itemnotes ) %]<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>[% END %]
371 [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>[% END %]
372 [% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
373 [% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
374 [% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
375 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
376 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport"> </th>[% END %]
380 [% FOREACH item IN items %]
381 <tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% item.datedue | html %]">
382 [% IF (StaffDetailItemSelection) %]
383 <td style="text-align:center;vertical-align:middle">
384 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
387 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
389 <div class="bookcoverimg">
390 <div class="cover-slider">
391 [% FOREACH image IN item.cover_images %]
392 <div class="cover-image local-coverimg">
393 <a href="/cgi-bin/koha/catalogue/image.pl?itemnumber=[% image.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
394 <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 %]" />
403 [% IF ( item_level_itypes ) %]
405 [% SET itemtype = item.itemtype %]
406 [% IF !noItemTypeImages && itemtype.image_location %]
407 <img src="[% itemtype.image_location | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" />
409 <span class="itypedesc itypetext">[% itemtype.translated_description | html %]</span>
412 <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
413 <td class="homebranch">
414 <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
415 <span class="shelvingloc">
417 If permanent location is defined, show description or code and display current location in parentheses. If not, display current location.
418 Note that permanent location is a code, and location may be an authval.
420 [% IF item.permanent_location %]
421 [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
422 [% permloc_authval | html %]
423 [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %]
424 ([% item.location | html %])
427 [% item.location | html %]
431 [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
432 [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
433 <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
435 [% SET serial = item.itemserial.serial %]
436 [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
437 <td class="enumchron" data-order="[% serial.publisheddate | html %]">
439 <td class="enumchron">
441 [% IF ( itemdata_enumchron ) %]
442 [% IF item.enumchron && serial.serialseq %]
443 <span class="enum">[% item.enumchron | html %]</span>
444 [% IF ( item.serialseq && item.enumchron != serial.serialseq ) %]
445 <span class="sep"> -- </span>
446 <span class="serialseq">[% serial.serialseq | html %]</span>
448 [% ELSIF item.enumchron %]
449 <span class="enum">[% item.enumchron | html %]</span>
450 [% ELSIF item.serialseq %]
451 <span class="serialseq">[% serial.serialseq | html %]</span>
453 [% IF serial.publisheddate %]
454 <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span>
462 [% IF item.checkout %]
463 [% IF item.checkout.onsite_checkout %]
464 <span>Currently in local use
466 <span class="datedue">Checked out
468 [% UNLESS ( item.not_same_branch) %]
469 [% IF item.checkout.onsite_checkout %]
474 [% INCLUDE 'patron-title.inc' patron=item.checkout.patron hide_patron_infos_if_needed=1 %]
476 : due [% item.checkout.date_due | $KohaDates as_due_date => 1 %]
478 [% ELSIF ( item.transfer ) %]
479 [% IF (item.transfer.datesent) %]
480 <span class="intransit">In transit from [% Branches.GetName( item.transfer.frombranch ) | html %] to [% Branches.GetName( item.transfer.tobranch ) | html %] since [% item.transfer.datesent | $KohaDates %]</span>
482 <span class="transitrequested">Transit pending from [% Branches.GetName( item.transfer.frombranch ) | html %] to [% Branches.GetName( item.transfer.tobranch ) | html %] since [% item.transfer.daterequested | $KohaDates %]</span>
487 [% IF ( item.itemlost ) %]
488 [% IF itemlostloop %]
489 [% FOREACH itemlostloo IN itemlostloop %]
490 [% IF itemlostloo.authorised_value == item.itemlost %]
491 <span class="lost">[% itemlostloo.lib | html %]</span>
495 <span class="lost">Unavailable (lost or missing)</span>
499 [% IF ( item.withdrawn ) %]
500 [% IF itemwithdrawnloop %]
501 [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
502 [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
503 <span class="wdn">[% itemwithdrawnloo.lib | html %]</span>
507 <span class="wdn">Withdrawn</span>
511 [% IF ( item.damaged ) %]
512 [% IF itemdamagedloop %]
513 [% FOREACH itemdamagedloo IN itemdamagedloop %]
514 [% IF itemdamagedloo.authorised_value == item.damaged %]
515 <span class="dmg">[% itemdamagedloo.lib | html %]</span>
519 <span class="dmg">Damaged</span>
523 [% IF ( item.notforloan || item.itemtype.notforloan ) %]
524 <span class="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 <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>
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 <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span>
545 [% SET recall = item.recall %]
547 [% IF recall.waiting_date %]
548 <span>Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</span>
550 [% 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 %]
551 <span>recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</span>
555 [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfer || hold || ( Koha.Preference('UseRecalls') && recall ) ) %]
556 <span>Available</span>
559 [% IF ( item.restricted ) %]
560 <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span>
563 [% IF ( item.bundle_host ) %]
564 <span class="bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</span>
568 <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
569 <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
570 <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
571 <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
572 <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td>
573 <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>
574 [% IF ( itemdata_uri ) %]
575 [% IF item.uri.split(' \| ').size > 1 %]
577 [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %]
582 <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a>
587 [% IF ( itemdata_copynumber ) %]
588 <td class="copynumber">[% item.copynumber | html %]</td>
590 [% IF ( itemdata_stocknumber ) %]
591 <td class="stocknumber">[% item.stocknumber | html %]</td>
594 <td class="materials"> [% item.materials | html %] </td>
596 [% IF ( itemdata_itemnotes ) %]
597 <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td>
599 [% IF itemdata_nonpublicnotes %]
600 <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
602 [% IF ( hostrecords ) %]
603 <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
607 [% IF ( item.countanalytics ) %]
608 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
613 <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
616 [% IF ShowCourseReserves %]
618 [% IF item.course_reserves %]
619 [% FOREACH r IN item.course_reserves %]
620 [% IF r.course.enabled == 'yes' %]
622 <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
623 [% r.course.course_name | html %]
624 <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
625 [% IF r.course.section %] [% r.course.section | html %] [% END %]
626 [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
635 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
636 <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>
639 [% IF CAN_user_editcatalogue_edit_items %]
641 [% UNLESS item.cannot_be_edited %]
642 [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
643 <div class="btn-group">
644 <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>
645 <ul class="dropdown-menu pull-right">
646 <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>
650 <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>
653 [% IF bundlesEnabled %]
654 <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>
663 [% END %][%# end of block items_table %]
665 [% IF Koha.Preference('EnableItemGroups') %]
666 <div role="tabpanel" class="tab-pane" id="item_groups">
667 [% IF CAN_user_editcatalogue_manage_item_groups %]
668 <div class="item_groups_table_table_controls">
669 <a href="#" class="item-group-create btn btn-default btn-xs"><i class="fa fa-plus"></i> New item group</a>
672 <table class="items-group-table" id="items-group-table">
675 <td>Display Order</td>
685 <div role="tabpanel" class="tab-pane" id="holdings">
687 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
688 <span class="results_summary NovelistSelect" style="display:none;">
689 <span class="label">Novelist Select: </span>
690 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
695 [% IF ( showncount ) %]
696 [% PROCESS items_table tab="holdings" items=itemloop %]
698 [% IF ( hiddencount ) %]
699 <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
701 [% IF ( debug_display ) %]
704 <tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron | html %]</td></tr>
705 <tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber | html %]</td></tr>
706 <tr><td>serial</td><td>[% serial | html %]</td></tr>
710 [% IF ( ALTERNATEHOLDINGS ) %]
711 [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
712 <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
715 <div id="noitems">No physical items for this record</div>
719 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
720 <span class="results_summary NovelistSelect" style="display:none;">
721 <span class="label">Novelist Select: </span>
722 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
727 [% IF (SeparateHoldings) %]
728 <div role="tabpanel" class="tab-pane" id="otherholdings">
729 [% IF (otheritemloop.size) %]
730 [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
732 <span class="nootheritems">No other items.</span>
737 [% IF ( MARCNOTES ) %]
739 <div role="tabpanel" class="tab-pane" id="description">
740 <div class="content_set">
742 [% FOREACH MARCNOTE IN MARCNOTES %]
744 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
745 <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
747 [% MARCNOTE.marcnote | html | html_line_break %]
756 [% IF ComponentParts && ComponentParts.size %]
757 <div role="tabpanel" class="tab-pane" id="components">
758 <div class="content_set">
760 [% FOR PART IN ComponentParts %]
768 [% IF ComponentParts.size == Koha.Preference('MaxComponentRecords')%]
769 <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>
771 </div> <!-- /.content_set -->
772 </div> <!-- /#components -->
776 [% IF ( subscriptionsnumber ) %]
777 <div role="tabpanel" class="tab-pane" id="subscriptions">
778 <div id="catalogue_detail_subscriptions">
779 <h2>This is a serial subscription</h2>
780 <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p>
781 [% FOREACH subscription IN subscriptions %]
782 [% IF subscription.branchcode %]
783 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
785 [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
786 [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]</p>[% END %]
787 [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
788 [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
789 [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
790 [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
791 [% IF ( subscription.latestserials ) %]
792 <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
796 <th>Date arrived</th>
797 <th>Date published</th>
801 [% FOREACH latestserial IN subscription.latestserials %]
803 <td>[% latestserial.serialseq | html %]</td>
804 <td data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
805 <td data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
807 [% IF ( latestserial.status1 ) %]<span>Expected</span>[% END %]
808 [% IF ( latestserial.status2 ) %]<span>Arrived</span>[% END %]
809 [% IF ( latestserial.status3 ) %]<span>Late</span>[% END %]
810 [% IF ( latestserial.status4 ) %]<span>Missing</span>[% END %]
811 [% IF ( latestserial.status41 ) %]<span>Missing (never received)</span>[% END %]
812 [% IF ( latestserial.status42 ) %]<span>Missing (sold out)</span>[% END %]
813 [% IF ( latestserial.status43 ) %]<span>Missing (damaged)</span>[% END %]
814 [% IF ( latestserial.status44 ) %]<span>Missing (lost)</span>[% END %]
815 [% IF ( latestserial.status5 ) %]<span>Not issued</span>[% END %]
816 [% IF ( latestserial.status6 ) %]<span>Delete</span>[% END %]
817 [% IF ( latestserial.status7 ) %]<span>Claimed</span>[% END %]
818 [% IF ( latestserial.status8 ) %]<span>Stopped</span>[% END %]
820 <td>[% latestserial.notes | html %]</td>
825 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]">Subscription details</a>
831 [% IF Koha.Preference('AcquisitionDetails') %]
832 <div role="tabpanel" class="tab-pane" id="acq_details">
833 [% IF orders.count %]
839 <th>Basket group</th>
841 <th>Order number</th>
842 <th>Creation date</th>
843 <th>Receive date</th>
846 <th title="Estimated cost tax incl. while pending, actual cost tax incl. once received">Price</th>
847 <th>Internal note</th>
848 <th>Subscription</th>
849 <th>Subscription call number</th>
853 [% FOR order IN orders %]
854 [% SET basket = order.basket %]
855 [% SET vendor = basket.bookseller %]
858 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
861 [% IF order.invoiceid %]
862 [% IF CAN_user_acquisition %]
863 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
864 title="Invoice detail page">
865 [% order.invoice.invoicenumber | html %]</a>
867 [% order.invoice.invoicenumber | html %]
872 [% IF basket.basketgroupid %]
873 [% SET basket_group = basket.basket_group %]
874 [% IF CAN_user_acquisition_group_manage %]
875 <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>
877 [% basket_group.name | html %] ([% basket_group.id | html %])
881 <td>[% IF CAN_user_acquisition_order_manage %]
882 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
884 [% basket.basketname | html %] ([% basket.basketno | html %])
886 <td>[% order.ordernumber | html %]</td>
887 <td data-order="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</td>
888 <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</td>
890 [% SWITCH order.orderstatus %]
891 [% CASE 'new' %]<span>New</span>
892 [% CASE 'ordered' %]<span>Ordered</span>
893 [% CASE 'partial' %]<span>Partial</span>
894 [% CASE 'complete' %]<span>Complete</span>
895 [% CASE 'cancelled' %]<span>Cancelled</span>
898 <td>[% order.quantity | html %]</td>
899 <td>[% IF ( order.unitprice_tax_included > 0 ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %]
900 <td>[% order.order_internalnote | html %]</td>
902 [% IF order.subscriptionid %]
903 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
907 [% IF order.subscriptionid %]
908 [% order.subscription.callnumber | html %]
916 <span class="noorder">There is no order for this bibliographic record.</span>
921 [% IF suggestions.count %]
922 <div role="tabpanel" class="tab-pane" id="suggestion_details">
923 [% IF nb_archived_suggestions > 0 %]
924 <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw %]
926 <table id="suggestions" class="sorted">
929 <th class="NoSort"> </th>
930 <th class="anti-the">Suggestion</th>
931 <th>Suggested by - on</th>
932 <th>Managed by - on</th>
933 <th>Last modification by - on</th>
940 [% FOREACH suggestion IN suggestions %]
942 <td>[% suggestion.suggestionid | html %]</td>
944 <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show" title="suggestion" >
945 [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
947 [% IF ( suggestion.copyrightdate ) %]© [% suggestion.copyrightdate | html %] [% END %]
948 [% IF ( suggestion.volumedesc ) %]; Volume:<em>[% suggestion.volumedesc | html %]</em> [% END %]
949 [% 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 %]
952 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
953 [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
956 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
957 [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
960 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
961 [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
964 [% Branches.GetName( suggestion.branchcode ) | html %]
967 [% suggestion.fund.budget_name | html %]
970 [% IF suggestion.STATUS == 'ASKED' %]<span>Pending</span>
971 [% ELSIF suggestion.STATUS == 'ACCEPTED' %]<span>Accepted</span>
972 [% ELSIF suggestion.STATUS == 'ORDERED' %]<span>Ordered</span>
973 [% ELSIF suggestion.STATUS == 'REJECTED' %]<span>Rejected</span>
974 [% ELSIF suggestion.STATUS == 'CHECKED' %]<span>Checked</span>
975 [% ELSIF suggestion.STATUS == 'AVAILABLE' %]<span>Available</span>
976 [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
977 [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
978 [% ELSE %]<span>Status unknown</span>
980 [% IF suggestion.reason %]
981 <br />([% suggestion.reason | html %])
991 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
992 <div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4>
994 [% 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 %]
995 [% 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 %]
996 <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 %]
997 [% IF ( XISBN.publishercode ) %]
998 [% 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 %]
1000 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
1001 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
1005 </table></div>[% END %]
1008 [% IF ( LocalCoverImages ) %]
1009 <div role="tabpanel" class="tab-pane" id="images">
1010 [% IF localimages.count %]
1011 <p>Click on an image to view it in the image viewer</p>
1012 <ul class="thumbnails">
1013 [% FOREACH image IN localimages %]
1015 <li id="imagenumber-[% image.imagenumber | html %]" class="thumbnail">
1016 <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&imagenumber=[% image.imagenumber | uri %]">
1017 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" />
1019 [% IF CAN_user_tools_upload_local_cover_images %]
1020 <a href="#" class="remove"><i class="fa fa-trash"></i> Delete image</a>
1026 [% ELSE # - No image passed JavaScript takes care %]
1027 <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span>
1029 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1030 <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>
1036 [% IF ( HTML5MediaEnabled ) %]
1037 <div role="tabpanel" class="tab-pane" id="html5media">
1038 [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
1040 [% IF HTML5MediaSet.is_youtube %]
1041 <iframe id="player" width="640" height="360" src="[% HTML5MediaSet.srcblock | url %]"></iframe>
1043 <[% HTML5MediaParent | html %] controls preload=none>
1044 <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
1045 [[% HTML5MediaParent | html %] tag not supported by your browser.]
1046 </[% HTML5MediaParent | html %]>
1054 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
1055 <div role="tabpanel" class="tab-pane" id="NovelistSelect" class="novelistSelect">
1056 <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
1060 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
1061 <div role="tabpanel" class="tab-pane" id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
1062 [% plugins_intranet_catalog_biblio_tab.content | $raw %]
1066 </div><!-- /tab-content -->
1067 </div><!-- /bibliodetails -->
1069 <div id="export" style="margin-top: 1em;">
1070 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
1072 <th>Save record</th> </tr>
1073 <tr><td> Select download format: <select name="format">
1074 <option value="mods">MODS (XML)</option>
1075 <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
1076 <option value="marcxml">MARCXML</option>
1077 <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1078 <option value="utf8">MARC (Unicode/UTF-8)</option> </select>
1079 <input type="submit" name="save" class="btn btn-primary" value="Download record" /></td>
1082 <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
1088 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
1089 <div class="modal-dialog modal-lg">
1090 <div class="modal-content">
1091 <div class="modal-header">
1092 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1093 <h3 id="marcPreviewLabel">MARC preview</h3>
1095 <div class="modal-body">
1096 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
1098 <div class="modal-footer">
1099 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1106 </div> <!-- /.col-sm-10.col-sm-push-2 -->
1108 <div class="col-sm-2 col-sm-pull-10">
1110 [% INCLUDE 'biblio-view-menu.inc' %]
1112 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1113 </div> <!-- /.row -->
1117 <div class="modal fade" id="modal-item-group-create" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-create-label">
1118 <div class="modal-dialog">
1119 <div class="modal-content">
1120 <div class="modal-header">
1121 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1122 <h3 id="modal-item-group-create-label"><i class="fa fa-plus"></i> Create a new item group</h3>
1124 <form id="modal-item-group-create-form" class="validated">
1125 <div class="modal-body">
1128 <label for="item_group_description" class="required">Name: </label>
1129 <input name="description" id="modal-item-group-create-form-description" type="text" size="30" required="required" class="required" />
1130 <span class="required">Required</span>
1133 <label for="item_group_display_order" class="required">Display order: </label>
1134 <input name="display_order" id="modal-item-group-create-form-display_order" value="0" size="5" required="required" class="required" />
1135 <span class="required">Required</span>
1137 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1141 <div class="modal-footer">
1142 <button id="modal-item-group-create-submit" class="btn btn-default"><i class="fa fa-plus"></i> Submit</button>
1143 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1150 <div class="modal fade" id="modal-item-group-edit" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-edit-label">
1151 <div class="modal-dialog">
1152 <div class="modal-content">
1153 <div class="modal-header">
1154 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1155 <h3 id="modal-item-group-edit-label"><i class='fa fa-edit'></i> Edit item group</h3>
1157 <form id="modal-item-group-edit-form" class="validated">
1158 <div class="modal-body">
1161 <label for="item_group_description" class="required">Name: </label>
1162 <input name="description" id="modal-item-group-edit-form-description" type="text" size="30" required="required" class="required" />
1163 <span class="required">Required</span>
1166 <label for="item_group_display_order" class="required">Sort order: </label>
1167 <input name="display_order" id="modal-item-group-edit-form-display_order" size="5" />
1168 <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1172 <div class="modal-footer">
1173 <button id="modal-item-group-edit-submit" class="btn btn-default"><i class='fa fa-edit'></i> Submit</button>
1174 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1181 <div class="modal fade" id="modal-item-group-delete" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-delete-label">
1182 <div class="modal-dialog">
1183 <div class="modal-content">
1184 <div class="modal-header">
1185 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1186 <h3 id="modal-item-group-delete-label"><i class='fa fa-trash'></i> Delete item group</h3>
1188 <div class="modal-body">
1189 Are you sure you want to delete this item group?
1191 <div class="modal-footer">
1192 <button id="modal-item-group-delete-submit" class="btn btn-danger"><i class='fa fa-trash'></i> Delete</button>
1193 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1199 <div class="modal fade" id="modal-item-group-set" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-set-label">
1200 <div class="modal-dialog">
1201 <div class="modal-content">
1202 <div class="modal-header">
1203 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1204 <h3 id="modal-item-group-set-label"><i class='fa fa-book'></i> Set item group for items</h3>
1206 <form id="modal-item-group-set-form" class="validated">
1207 <div class="modal-body">
1210 <label for="item_group" class="required">Item group: </label>
1211 <select name="item_group" id="item-group-add-form-select">
1212 [% FOREACH ig IN biblio.item_groups %]
1213 <option value="[% ig.id | html %]">[% ig.description | html %]</option>
1216 <span class="required">Required</span>
1220 <div class="modal-footer">
1221 <button id="modal-item-group-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set item group</button>
1222 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1229 <div class="modal fade" id="modal-item-group-unset" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-unset-label">
1230 <div class="modal-dialog">
1231 <div class="modal-content">
1232 <div class="modal-header">
1233 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1234 <h3 id="modal-item-group-unset-label"><i class='fa fa-unlink'></i> Remove item from item group</h3>
1236 <div class="modal-body">
1237 Are you sure you want to remove these item(s) from their item group(s)?
1239 <div class="modal-footer">
1240 <button id="modal-item-group-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button>
1241 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1247 [% IF bundlesEnabled %]
1248 <div class="modal" id="addToBundleModal" tabindex="-1" role="dialog" aria-labelledby="addToBundleLabel">
1249 <form id="addToBundleForm" action="">
1250 <div class="modal-dialog" role="document">
1251 <div class="modal-content">
1252 <div class="modal-header">
1253 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1254 <h3 id="addToBundleLabel">Add to bundle</h3>
1256 <div class="modal-body">
1257 <div id="addResult"></div>
1258 <fieldset class="rows">
1261 <label class="required" for="external_id">Item barcode: </label>
1262 <input type="text" id="external_id" name="external_id" required="required">
1263 <span class="required">Required</span>
1268 <div class="modal-footer">
1269 <button type="submit" class="btn btn-default">Submit</button>
1270 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1277 <div class="modal" id="removeFromBundleModal" tabindex="-1" role="dialog" aria-labelledby="removeFromBundleLabel">
1278 <form id="removeFromBundleForm" action="">
1279 <div class="modal-dialog" role="document">
1280 <div class="modal-content">
1281 <div class="modal-header">
1282 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1283 <h3 id="removeFromBundleLabel">Remove from bundle</h3>
1285 <div class="modal-body">
1286 <div id="removeResult"></div>
1287 <fieldset class="rows">
1290 <label class="required" for="external_id">Item barcode: </label>
1291 <input type="text" id="rm_external_id" name="external_id" required="required">
1292 <span class="required">Required</span>
1297 <div class="modal-footer">
1298 <button type="submit" class="btn btn-default">Submit</button>
1299 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1307 [% MACRO jsinclude BLOCK %]
1308 [% INCLUDE 'catalog-strings.inc' %]
1309 [% Asset.js("js/catalog.js") | $raw %]
1310 [% Asset.js("js/recalls.js") | $raw %]
1311 [% Asset.js("js/coce.js") | $raw %]
1312 [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1314 var interface = "[% interface | html %]";
1315 var theme = "[% theme | html %]";
1316 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
1317 function verify_cover_images() {
1318 // Loop over each container in the template which contains covers
1319 $(".cover-slider").each(function(){
1320 var lightbox_descriptions = [];
1321 $(this).find(".cover-image").each( function( index ){
1323 // Find the image in the container
1324 var img = div.find("img")[0];
1325 if( $(img).length > 0 ){
1326 var description = "";
1327 if( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ){
1328 // No image loaded in the container. Remove the slide
1331 // All slides start hidden. If this is the first one, show it.
1335 // Check if Amazon image is present
1336 if ( div.attr("id") == "amazon-bookcoverimg" ) {
1339 if ((w == 1) || (h == 1)) {
1340 // Amazon returned single-pixel placeholder
1341 // Remove the container
1344 lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1346 } else if( div.attr("id") == "custom-coverimg" ){
1347 if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1348 // No image was loaded via the CustomCoverImages system preference
1349 // Remove the container
1352 lightbox_descriptions.push("Custom cover image");
1354 } else if ( div.attr("id") == "syndetics-bookcoverimg" ){
1355 lightbox_descriptions.push(_("Syndetics cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1357 else if( div.hasClass("coce-coverimg" ) ){
1358 // Identify which service's image is being loaded by Coce
1359 var coce_description;
1360 if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1361 coce_description = ("Coce image from Amazon.com");
1362 } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1363 coce_description = _("Coce image from Google Books");
1364 } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1365 coce_description = _("Coce image from Open Library");
1367 div.find(".hint").html(coce_description);
1368 lightbox_descriptions.push(coce_description);
1369 } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1370 lightbox_descriptions.push(_("Local cover image (<a href='%s'>edit</a>)").format($(img).data('link')));
1372 lightbox_descriptions.push(_("Cover image source unknown"));
1378 // Lightbox for cover images
1379 Chocolat(this.querySelectorAll('.cover-image a'), {
1380 description: function(){
1381 return lightbox_descriptions[this.settings.currentImageIndex];
1387 $(".cover-slider").each(function(){
1388 var coverSlide = this;
1389 var coverImages = $(this).find(".cover-image");
1390 if( coverImages.length > 1 ){
1391 coverImages.each(function( index ){
1392 // If more that one image is present, add a navigation link
1393 // for activating the slide
1394 var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1396 // Set the first navigation link as active
1397 $(covernav).addClass("nav-active");
1399 $(covernav).html("<i class=\"fa fa-circle\"></i>");
1400 $(coverSlide).append( covernav );
1404 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
1405 && $(coverSlide).find(".cover-image:visible").length < 1 ){
1406 $(coverSlide).remove();
1408 $(coverSlide).addClass("cover-slides");
1412 $("#editions img").each(function(i){
1413 if ( this.src.indexOf('amazon.com') >= 0 ) {
1416 if ((w == 1) || (h == 1)) {
1417 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1418 } else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) {
1419 this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1425 function removeLocalImage(imagenumber) {
1426 var thumbnail = $("#imagenumber-" + imagenumber );
1427 var copy = thumbnail.html();
1428 thumbnail.find("img").css("opacity", ".2");
1429 thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
1431 url: "/cgi-bin/koha/svc/cover_images?action=delete&imagenumber=" + imagenumber,
1432 success: function(data) {
1433 $(data).each( function(i) {
1434 if ( this.deleted == 1 ) {
1437 thumbnail.html( copy );
1438 alert(_("An error occurred on deleting this image"));
1440 if ( $('ul.thumbnails > li').length == 0 ) {
1441 showNoImageMessage();
1445 error: function(data) {
1446 thumbnail.html( copy );
1447 alert(_("An error occurred on deleting this image"));
1452 function showNoImageMessage() {
1453 var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
1454 no_images_msg = '<p>' + no_images_msg + '</p>';
1455 [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1456 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>");
1457 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
1459 $('#images').html(no_images_msg);
1462 [% IF StaffDetailItemSelection %]
1463 function itemSelectionBuildDeleteLink(div) {
1464 var itemnumbers = new Array();
1465 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1466 itemnumbers.push($(this).val());
1468 if (itemnumbers.length > 0) {
1469 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
1470 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1471 url += '&biblionumber=[% biblionumber | uri %]';
1472 url += '&src=CATALOGUING';
1473 $('a.itemselection_action_delete').attr('href', url);
1480 function itemSelectionBuildModifyLink(div) {
1481 var itemnumbers = new Array();
1482 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1483 itemnumbers.push($(this).val());
1485 if (itemnumbers.length > 0) {
1486 var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
1487 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1488 url += '&biblionumber=[% biblionumber | uri %]';
1489 url += '&src=CATALOGUING';
1490 $('a.itemselection_action_modify').attr('href', url);
1497 function itemSelectionBuildActionLinks(tab) {
1498 var div = $("#" + tab);
1499 var delete_link_ok = itemSelectionBuildDeleteLink(div);
1500 var modify_link_ok = itemSelectionBuildModifyLink(div);
1501 if (modify_link_ok || delete_link_ok) {
1502 $('.itemselection_actions', div).show();
1504 $('.itemselection_actions', div).hide();
1508 $(document).ready(function() {
1509 $('table.items_table').each(function() {
1510 var div = $(this).parent().attr("id");
1511 itemSelectionBuildActionLinks(div);
1514 $("input[name='itemnumber'][type='checkbox']").change(function() {
1515 var div = $(this).parents('table').parent().parent().attr("id");
1516 itemSelectionBuildActionLinks(div);
1519 $(".SelectAll").on("click",function(e){
1521 var tab = $(this).data("tab");
1522 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
1523 itemSelectionBuildActionLinks(tab);
1526 $(".ClearAll").on("click",function(e){
1528 var tab = $(this).data("tab");
1529 $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1530 itemSelectionBuildActionLinks(tab);
1535 $(document).ready(function() {
1536 // Pick details tab to display by default
1538 [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
1539 $(".nav-tabs a[href='#html5media']").tab("show");
1540 [% ELSIF ComponentParts && ComponentParts.size %]
1541 $(".nav-tabs a[href='#components']").tab("show");
1543 $(".nav-tabs a[href='#holdings']").tab("show");
1546 $(".nav-tabs a[href='#holdings']").tab("show");
1548 $('#search-form').focus();
1549 $('.thumbnails > li > .remove').click(function() {
1550 var result = confirm(_("Are you sure you want to delete this cover image?"));
1552 if ( result == true ) {
1553 var imagenumber = $(this).parent().attr('id').split('-')[1];
1554 removeLocalImage(imagenumber);
1559 [% IF ( IntranetCoce && CoceProviders ) %]
1560 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
1563 $("body").on("click",".previewMARC", function(e){
1565 var page = $(this).attr("href");
1566 $("#marcPreview .modal-body").load(page + " table");
1567 $('#marcPreview').modal({show:true});
1569 $("#marcPreview").on("hidden.bs.modal", function(){
1570 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
1572 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1573 novSelect.loadContentForQuery({
1574 ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1575 ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1578 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
1579 '[% Koha.Preference('NovelistSelectPassword') | html %]',
1581 if ( d.length > 0 ){ //If no content
1582 $(".NovelistSelect").show();
1586 $(".print-label").on("click", function(e){
1588 link = $(this).attr("href");
1589 openWindow(link,"Print spine label",400,400);
1591 $(".cover-slider").on("click",".cover-nav", function(e){
1593 var cover_slider = $(this).parent();
1594 // Adding click handler for cover image navigation links
1595 var num = $(this).data("num");
1596 $(cover_slider).find(".cover-nav").removeClass("nav-active");
1597 $(this).addClass("nav-active");
1598 $(cover_slider).find(".cover-image").hide();
1599 $(cover_slider).find(".cover-image").eq( num ).show();
1603 $(window).load(function() {
1604 verify_cover_images();
1607 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1608 <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1610 [% INCLUDE 'datatables.inc' %]
1611 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1612 [% INCLUDE 'columns_settings.inc' %]
1613 [% INCLUDE 'js-date-format.inc' %]
1614 [% INCLUDE 'js-patron-format.inc' %]
1615 [% INCLUDE 'js-biblio-format.inc' %]
1616 [% Asset.js("js/browser.js") | $raw %]
1617 [% Asset.js("js/table_filters.js") | $raw %]
1620 browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1623 [% IF bundlesEnabled %]
1624 var bundle_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','bundle_tables','json') | $raw %];
1625 var bundle_lost_value = [% Koha.Preference('BundleLostValue') | html %];
1627 $(document).ready(function() {
1629 [% IF bundlesEnabled %] // Bundle handling
1630 function createChild ( row, itemnumber, duedate ) {
1633 var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>');
1634 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>');
1635 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>');
1637 // Disable management if there's a duedate
1639 bundle_toolbar.children('.btn').addClass("disabled");
1642 // This is the table we'll convert into a DataTable
1643 var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>');
1645 // Display it the child row
1646 row.child( bundle_toolbar.add(bundles_table), 'bundle' ).show();
1648 // Initialise as a DataTable
1649 var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?";
1650 var bundle_table = bundles_table.kohaTable({
1652 "url": bundle_table_url
1654 "header_filter": false,
1657 "return_claim.patron"
1659 "order": [[ 1, "asc" ]],
1661 "targets": [0,1,2,3],
1662 "render": function (data, type, row, meta) {
1663 if ( data && type == 'display' ) {
1664 return data.escapeHtml();
1671 "data": "biblio.title:biblio.subtitle:biblio.medium",
1672 "title": _("Title"),
1675 "render": function(data, type, row, meta) {
1676 return $biblio_to_html(row.biblio, { link: 1 });
1680 "data": "biblio.author",
1681 "title": _("Author"),
1686 "data": "callnumber",
1687 "title": _("Callnumber"),
1692 "data": "external_id",
1693 "title": _("Barcode"),
1698 "data": "lost_status:last_seen_date:return_claim.patron",
1699 "title": _("Status"),
1700 "searchable": false,
1702 "render": function(data, type, row, meta) {
1703 if ( row.lost_status == bundle_lost_value ) {
1704 let out = '<span class="lost">' + _("Last seen") + ': ' + $date(row.last_seen_date) + '</span>';
1705 if ( row.return_claim ) {
1706 out = out + '<span class="claims_return">' + _("Claims returned by") + ': ' + $patron_to_html( row.return_claim.patron, { display_cardnumber: false, url: true } ) + '</span>';
1710 else if ( row.lost_status !== 0 ) {
1711 return '<span class="lost">' + _("Lost") + ': ' + row.lost_status + '</span>';
1713 return '<span class="available">' + _("Present") + '</span>';
1717 "data": function( row, type, val, meta ) {
1720 result = '<button class="btn btn-default btn-xs remove disabled" role="button" data-itemnumber="'+row.item_id+'"><i class="fa fa-minus" aria-hidden="true"></i> '+_("Remove")+'</button>\n';
1722 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';
1726 "title": _("Actions"),
1727 "searchable": false,
1732 }, bundle_settings, 1);
1733 $(".tbundle").on("click", ".remove:not(.disabled)", function(){
1734 var bundle_table = $(this).closest('table');
1735 var host_itemnumber = bundle_table.data('itemnumber');
1736 var component_itemnumber = $(this).data('itemnumber');
1737 var unlink_item_url = "/api/v1/items/" + host_itemnumber + "/bundled_items/" + component_itemnumber;
1740 url: unlink_item_url,
1741 success: function(){
1742 bundle_table.DataTable({ 'retrieve': true }).draw(false);
1751 var bundle_form_active;
1752 $("#addToBundleModal").on("shown.bs.modal", function(e){
1753 var button = $(e.relatedTarget);
1754 var item_id = button.data('item');
1755 $("#addResult").replaceWith('<div id="addResult"></div>');
1756 $("#addToBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items');
1757 $("#external_id").focus();
1759 bundle_form_active = item_id;
1762 $("#addToBundleForm").submit(function(event) {
1764 /* stop form from submitting normally */
1765 event.preventDefault();
1767 /* get the action attribute from the <form action=""> element */
1768 var $form = $(this),
1769 url = $form.attr('action');
1771 /* Send the data using post with external_id */
1772 var posting = $.post({
1774 data: JSON.stringify({ external_id: $('#external_id').val()}),
1775 contentType: "application/json; charset=utf-8",
1779 /* Report the results */
1780 posting.done(function(data) {
1781 var barcode = $('#external_id').val();
1782 $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">'+_("Success: Added '%s'").format(barcode)+'</div>');
1783 $('#external_id').val('').focus();
1786 posting.fail(function(data) {
1787 var barcode = $('#external_id').val();
1788 if ( data.status === 409 ) {
1789 var response = data.responseJSON;
1790 if ( response.key === "PRIMARY" ) {
1791 $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1793 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
1795 } else if ( data.status === 404 ) {
1796 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
1798 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
1800 $('#external_id').val('').focus();
1804 $("#addToBundleModal").on("hidden.bs.modal", function(e){
1805 if ( bundle_changed ) {
1806 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
1808 bundle_form_active = 0;
1812 $("#removeFromBundleModal").on("shown.bs.modal", function(e){
1813 var button = $(e.relatedTarget);
1814 var item_id = button.data('item');
1815 $("#removeResult").replaceWith('<div id="removeResult"></div>');
1816 $("#removeFromBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items/');
1817 $("#rm_external_id").focus();
1819 bundle_form_active = item_id;
1822 $("#removeFromBundleForm").submit(function(event) {
1824 /* stop form from submitting normally */
1825 event.preventDefault();
1827 /* get the action attribute from the <form action=""> element */
1828 var $form = $(this),
1829 url = $form.attr('action');
1831 var barcode = $('#rm_external_id').val();
1833 /* Fetch itemnumber using rm_external_id */
1834 var itemReq = $.get('/api/v1/items', { q: JSON.stringify({
1835 external_id: barcode
1836 }) }, null, "json");
1839 itemReq.done(function(data) {
1840 if (data.length === 1) {
1841 itemnumber = data[0].item_id;
1843 /* Remove link using fetch itemnumber */
1844 var deleteReq = $.ajax( url + itemnumber, {
1848 /* Report the results */
1849 deleteReq.done(function(data) {
1850 var barcode = $('#rm_external_id').val();
1851 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed '%s'").format(barcode)+'</div>');
1852 $('#rm_external_id').val('').focus();
1855 deleteReq.fail(function(data) {
1856 var barcode = $('#rm_external_id').val();
1857 if ( data.status === 409 ) {
1858 var response = data.responseJSON;
1859 if ( response.key === "PRIMARY" ) {
1860 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1862 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
1864 } else if ( data.status === 404 ) {
1865 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
1867 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
1869 $('#rm_external_id').val('').focus();
1872 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'</div>');
1875 itemReq.fail(function(data) {
1876 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found '%s'").format(barcode)+'</div>');
1877 $('#rm_external_id').val('').focus();
1882 $("#removeFromBundleModal").on("hidden.bs.modal", function(e){
1883 if ( bundle_changed ) {
1884 $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
1886 bundle_form_active = 0;
1889 // End bundle handling
1892 var table_names = [ 'holdings_table', 'otherholdings_table' ];
1893 var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ];
1894 var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ];
1895 table_names.forEach( function( table_name, index ) {
1896 if ( !has_images[index] ) {
1897 table_settings[index].columns.splice(1,1);
1899 var dt_parameters = {
1902 'bAutoWidth': false,
1903 "bKohaColumnsUseNames": true,
1904 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1906 var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' );
1908 [% IF bundlesEnabled %]
1909 // Add event listener for opening and closing bundle details
1910 $('#' + table_name + ' tbody').on('click', 'button.details-control', function () {
1911 var button = $(this);
1912 var tr = button.closest('tr');
1913 var dTable = button.closest('table').DataTable({ 'retrieve': true });
1915 var itemnumber = tr.data('itemnumber');
1916 var duedate = tr.data('duedate');
1917 var row = dTable.row( tr );
1919 if ( row.child.isShown() ) {
1920 // This row is already open - close it
1922 tr.removeClass('shown');
1923 button.removeClass('active');
1927 createChild(row, itemnumber, duedate);
1928 tr.addClass('shown');
1929 button.addClass('active');
1935 [% IF Koha.Preference('AcquisitionDetails') %]
1936 var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
1937 var acquisitiondetails_table = KohaTable("orders", {
1938 "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1940 'bAutoWidth': false,
1941 "aaSorting": [[ 4, "desc" ]],
1945 [% IF suggestions.count %]
1946 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
1948 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
1949 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
1951 "sPaginationType": "full"
1957 [% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %]
1958 $(document).ready(function() {
1959 var search_index = localStorage.getItem("cat_search_pulldown_selection");
1960 var search_value = localStorage.getItem("searchbox_value");
1961 if ( search_index ){ $('#cat-search-block select.advsearch').val(search_index)};
1962 if ( search_value ){ $('#cat-search-block #search-form').val(search_value)};
1966 [% IF Koha.Preference('EnableItemGroups') %]
1967 // Load item groups table
1968 var itemGroupsTable = KohaTable("items-group-table", {
1969 "bAutoWidth": false,
1970 'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
1973 "mDataProp": function( oObj ) {
1974 return oObj.display_order;
1978 "mDataProp": function( oObj ) {
1979 return oObj.description;
1983 "mDataProp": function( oObj ) {
1984 [% IF CAN_user_editcatalogue_manage_item_groups %]
1985 return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1986 <i class='fa fa-edit'></i> ${_("Edit")}
1989 + `<button class='item-group-delete btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
1990 <i class='fa fa-trash'></i> ${('Delete')}
1999 "bProcessing": true,
2000 "bServerSide": false,
2001 "sAjaxSource": `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1`,
2002 "sAjaxDataProp": "",
2003 "fnServerData": function ( sSource, aoData, fnCallback ) {
2004 $.getJSON( sSource, aoData, function (json) {
2010 // Create new item groups
2011 $('.item-group-create').on('click', function(){
2012 $('#modal-item-group-create-form-description').val("");
2013 $('#modal-item-group-create-submit').removeAttr('disabled');
2014 $('#modal-item-group-create').modal('show');
2017 $("#modal-item-group-create-form").validate({
2018 submitHandler: function(form) {
2020 url: `/api/v1/biblios/${biblionumber}/item_groups`,
2021 headers: { "x-koha-embed": "items" },
2022 success: function(item_groups){
2023 $('#modal-item-group-create-submit').attr('disabled', 'disabled');
2026 "url": `/api/v1/biblios/${biblionumber}/item_groups`,
2029 "Content-Type": "application/json"
2031 "data": JSON.stringify(
2033 "description": $("#modal-item-group-create-form-description").val(),
2034 "display_order": $("#modal-item-group-create-form-display_order").val(),
2040 .done(function (response) {
2041 $('#item-group-add-form-select').append($('<option>', {
2042 value: response.item_group_id,
2043 text: response.description
2046 $('#modal-item-group-create').modal('hide');
2047 if ( item_groups.length == 0 ) {
2048 // This bib has no previous item groups, reload the page
2049 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2051 // Has other item groups, just reload the table
2052 itemGroupsTable.api().ajax.reload();
2055 .fail(function(err) {
2056 var message = err.responseJSON.error;
2064 $('#modal-item-group-create').on('shown.bs.modal', function () {
2065 $('#modal-item-group-create-form-description').focus();
2068 // Edit existing item groups
2069 $('body').on( 'click', '.item-group-edit', function(){
2070 const item_group_id = $(this).data('item-group-id');
2071 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2072 $.get( url, function( data ) {
2073 $('#modal-item-group-edit-form-description').val( data.description );
2074 $('#modal-item-group-edit-form-display_order').val( data.display_order );
2075 $('#modal-item-group-edit-submit').data('item-group-id', item_group_id );
2076 $('#modal-item-group-edit-submit').removeAttr('disabled');
2077 $('#modal-item-group-edit').modal('show');
2081 $("#modal-item-group-edit-form").validate({
2082 submitHandler: function(form) {
2083 $('#modal-item-group-edit-submit').attr('disabled', 'disabled');
2085 const item_group_id = $('#modal-item-group-edit-submit').data('item-group-id');
2086 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2092 "Content-Type": "application/json"
2094 "data": JSON.stringify(
2096 "description": $("#modal-item-group-edit-form-description").val(),
2097 "display_order": $("#modal-item-group-edit-form-display_order").val(),
2103 .done(function (response) {
2104 $('#modal-item-group-edit').modal('hide');
2105 itemGroupsTable.api().ajax.reload();
2107 .fail(function(err) {
2108 var message = err.responseJSON.error;
2114 $('#modal-item-group-edit').on('shown.bs.modal', function () {
2115 $('#modal-item-group-edit-form-description').focus();
2118 // Delete existing item groups
2119 $('body').on( 'click', '.item-group-delete', function(){
2120 const item_group_id = $(this).data('item-group-id');
2121 $('#modal-item-group-delete-submit').data('item-group-id', item_group_id );
2122 $('#modal-item-group-delete-submit').removeAttr('disabled');
2123 $('#modal-item-group-delete').modal('show');
2125 $("#modal-item-group-delete-submit").on('click', function(){
2126 $('#modal-item-group-delete-submit').attr('disabled', 'disabled');
2127 const item_group_id = $("#modal-item-group-delete-submit").data('item-group-id');
2130 url: `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2131 headers: { "x-koha-embed": "items" },
2132 success: function(item_group_data){
2134 "url": `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2137 .done(function (response) {
2138 $('#modal-item-group-delete').modal('hide');
2139 $(`#item-group-add-form-select option[value='${item_group_id}']`).remove();
2140 if ( item_group_data.items === null ) {
2141 // No items for this item group, we can just refresh the table
2142 itemGroupsTable.api().ajax.reload();
2144 // This item group had items attached to it, we need to reload the page
2145 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2148 .fail(function(err) {
2149 var message = err.responseJSON.error;
2156 // Add item(s) to a item group
2157 $('.itemselection_action_item_group_set').on('click', function(){
2158 $('#modal-item-group-set').modal('show');
2161 $("#modal-item-group-set-form").validate({
2162 submitHandler: function(form) {
2163 $('#modal-item-group-set-submit').attr('disabled', 'disabled');
2165 const item_group_id = $('#item-group-add-form-select').val();
2167 let itemnumbers = new Array();
2168 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2169 const itemnumber = $(this).val();
2170 itemnumbers.push( itemnumber );
2172 if (itemnumbers.length > 0) {
2173 let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_item_group';
2174 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2175 url += '&biblionumber=[% biblionumber | uri %]';
2176 url += `&item_group_id=${item_group_id}`;
2178 window.location.replace(url);
2181 $('#modal-item-group-set').modal('hide');
2185 // Remove item(s) from an item group
2186 $('.itemselection_action_item_group_unset').on('click', function(){
2187 $('#modal-item-group-unset').modal('show');
2190 $("#modal-item-group-unset-submit").on('click', function(){
2191 $('#modal-item-group-unset-submit').attr('disabled', 'disabled');
2193 let itemnumbers = new Array();
2194 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2195 const itemnumber = $(this).val();
2196 itemnumbers.push( itemnumber );
2198 if (itemnumbers.length > 0) {
2199 let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_item_group';
2200 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2201 url += '&biblionumber=[% biblionumber | uri %]';
2203 window.location.replace(url);
2206 $('#modal-item-group-unset').modal('hide');
2212 [% INCLUDE 'intranet-bottom.inc' %]