Bug 33040: Add "Date published (text)" to serials tab on record view (detail.pl)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / detail.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE KohaPlugins %]
6 [% USE AuthorisedValues %]
7 [% USE Branches %]
8 [% USE Biblio %]
9 [% USE Price %]
10 [% USE TablesSettings %]
11 [% PROCESS 'i18n.inc' %]
12
13 [% IF Koha.Preference('AmazonAssocTag') %]
14     [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
15 [% ELSE %]
16     [% AmazonAssocTag = '' %]
17 [% END %]
18
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 %]
26                [% END %]
27            [% END %]
28         [% END %]
29     [% END %]
30 [% END %]
31
32 [% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab({ biblio => biblio, biblio_id => biblionumber }) %]
33
34 [% SET footerjs = 1 %]
35 [% INCLUDE 'doc-head-open.inc' %]
36 <title>
37   [% IF ( unknownbiblionumber ) %]
38     Unknown record
39   [% ELSE %]
40     Details for [% INCLUDE 'biblio-title-head.inc' %]
41   [% END %] &rsaquo; Catalog &rsaquo; Koha
42 </title>
43 [% INCLUDE 'doc-head-close.inc' %]
44 [% Asset.css("lib/Chocolat/css/chocolat.css") | $raw %]
45 </head>
46
47 <body id="catalog_detail" class="catalog">
48
49 [% WRAPPER 'header.inc' %]
50     [% INCLUDE 'cat-search.inc' %]
51 [% END %]
52
53 [% WRAPPER 'sub-header.inc' %]
54 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
55     <ol>
56         <li>
57             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
58         </li>
59         <li>
60             <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
61         </li>
62
63         [% IF ( unknownbiblionumber ) %]
64             <li>
65                 <a href="#" aria-current="page">
66                     Unknown record
67                 </a>
68             </li>
69         [% ELSE %]
70             <li>
71                 [% INCLUDE 'biblio-title.inc' link = 1 %]
72             </li>
73             <li>
74                 <a href="#" aria-current="page">
75                     Details
76                 </a>
77             </li>
78         [% END %]
79     </ol>
80 </nav>
81 [% END %]
82
83 <div class="main container-fluid">
84     <div class="row">
85         <div class="col-sm-10 col-sm-push-2">
86             <main>
87                 <div class="row">
88
89 [% IF ( unknownbiblionumber ) %]
90   <div class="dialog message">The record you requested does not exist ([% biblionumber | html %]).</div>
91 [% ELSE %]
92
93 [% IntranetCoce    = Koha.Preference('IntranetCoce') %]
94 [% CoceProviders   = Koha.Preference('CoceProviders') %]
95 [% CoceHost        = Koha.Preference('CoceHost') %]
96 [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %]
97
98 [% INCLUDE 'cat-toolbar.inc' %]
99     [% IF decoding_error %]
100         <div>
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>
104         </div>
105     [% END %]
106     [% IF analytics_error %]
107         <div>
108            <span class="analytics_error">
109             There was an error searching for analytic records, please see the logs for details.</span>
110         </div>
111     [% END %]
112     [% IF ( ocoins ) %]
113         <!-- COinS / OpenURL -->
114         <span class="Z3988" title="[% ocoins | html %]"></span>
115     [% END %]
116
117     [% IF ( AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
118         <div id="catalogue_detail_biblio" class="col-xs-9">
119     [% ELSE %]
120         <div id="catalogue_detail_biblio" class="col-xs-12">
121     [% END %]
122         <div class="page-section">
123
124         [% XSLTBloc | $raw %]
125
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&amp;shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a>
130                 [% IF ( loop.last ) %][% ELSE %]|[% END %]
131             [% END %]
132             </span>
133         [% 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>
139                         [% ELSE %]
140                         [% TagLoo.term | html %]
141                         [% END %]
142                         <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
143                     [% END %]
144                     </span>
145         [% 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 %]&amp;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="" />
151           [% END %]
152           [% IF ( description ) %]
153               <span class="itypetext">[% description | html %]</span>
154           [% ELSE %]
155               <span class="itypetext">[% itemtype | html %]</span>
156           [% END %]
157           </span>
158         [% END %]
159
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>
166                     [% ELSE %]
167                         <span>[% holdcount | html %]</span>
168                     [% END %]
169                 </span>
170             </span>
171         [% END %]
172
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 %]
179                     [% END %]
180                 [% ELSE %]
181                     [% FOREACH ill IN illrequests %]
182                         <span>Request [% ill.illrequest_id | html %]</span>[% IF ! loop.last %], [% END %]
183                     [% END %]
184                 [% END %]
185             </span>
186         [% END %]
187
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>
193                 </span>
194             </span>
195         [% END %]
196
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 %]
202             [% END %]
203             </span>
204         [% END %]
205         </div> [%# .page-section %]
206
207         [% IF ( AmazonCoverImages  || LocalCoverImages || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
208         </div>
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&amp;imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]" />
217                                     </a>
218                                     <div class="hint">Local cover image</div>
219                                 </div>
220                             [% END %]
221                         [% END %]
222                     [% END %]
223
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"/>
228                             </a>
229                             <div class="hint">Image from Amazon.com</div>
230                         </div>
231                     [% END %]
232
233                     [% IF ( IntranetCoce && CoceProviders && normalized_isbn ) %]
234                         [% coce_id = normalized_ean || normalized_isbn %]
235                         <div class="cover-image coce-coverimg">
236                             [% IF ( coce_id ) %]
237                                 <a title="Image from Coce" class="[% coce_id | html %]" id="coce-thumbnail-preview"></a>
238                             [% ELSE %]
239                                 <span class="no-image">No cover image available</span>
240                             [% END %]
241                             <div class="hint">Image from Coce</div>
242                         </div>
243                     [% END %]
244
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&amp;client=[% Koha.Preference('SyndeticsClientCode') | url %]&amp;type=xw10&amp;upc=[% normalized_upc | url %]&amp;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&amp;client=[% Koha.Preference('SyndeticsClientCode') | url %]&amp;type=xw10&amp;upc=[% normalized_upc | url %]&amp;oclc=[% normalized_oclc | url %]" alt="" class="thumbnail" />
250                             </a>
251                             <div class="hint">Image from Syndetics</div>
252                         </div>
253                             [% ELSE %]
254                                 <span class="no-image">No cover image available</span>
255                             [% END %]
256                     [% END %]
257
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 %]" />
264                                 </a>
265                                 <div class="hint">Custom cover image</div>
266                             </div>
267                         [% END %]
268                     [% END %]
269                 </div> <!-- /.cover-slider -->
270             </div> <!-- /.bookcoverimg.col-xs-3 -->
271         [% ELSE %]
272         </div> <!-- /.col-xs-* -->
273         [% END # /IF ( AmazonCoverImages, etc ) %]
274 </div>
275
276 <div id="bibliodetails" class="toptabs">
277
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>
282         </li>
283         <li role="presentation">
284             <a href="#otherholdings"  aria-controls="otherholdings" role="tab" data-toggle="tab">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
285         </li>
286     [% ELSE %]
287         <li role="presentation">
288             <a href="#holdings" aria-controls="holdings" role="tab" data-toggle="tab">Holdings ([% itemloop.size() || 0 | html %])</a>
289         </li>
290     [% END %]
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>
294         </li>
295     [% END %]
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 ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]<li role="presentation"><a href="#concerns" aria-controls="concerns" role="tab" data-toggle="tab">Concerns ([% biblio.tickets.count | html %])</a></li>[% END %]
303 [% IF ( LocalCoverImages ) %]
304     <li role="presentation">
305         <a href="#images"  aria-controls="images" role="tab" data-toggle="tab">Images ([% localimages.count || 0 | html %])</a>
306     </li>
307 [% END %]
308 [% IF HTML5MediaEnabled && HTML5MediaSets.size %]
309     <li id="media_tab" role="presentation"><a href="#html5media"  aria-controls="html5media" role="tab" data-toggle="tab">Play media</a></li>
310 [% END %]
311 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
312     <li class="NovelistSelect" style="display:none;" role="presentation"><a href="#NovelistSelect"  aria-controls="NovelistSelect" role="tab" data-toggle="tab">NoveList Select</a></li>
313 [% END %]
314 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
315     <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>
316 [% END %]
317 </ul>
318
319 <div class="tab-content">
320 [% items_table_block_iter = 0 %]
321 [% BLOCK items_table %]
322     [% items_table_block_iter = items_table_block_iter + 1 %]
323     <div class="[% tab | html %]_table_table_controls">
324         [% IF (StaffDetailItemSelection) %]
325             | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a> |
326             <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
327             <span class="itemselection_actions">
328               | Actions:
329               [% IF CAN_user_tools_items_batchdel %]
330                 <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
331               [% END %]
332               [% IF CAN_user_tools_items_batchmod %]
333                 <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
334               [% END %]
335               [% IF CAN_user_editcatalogue_manage_item_groups && biblio.item_groups.count %]
336                 <a class="itemselection_action_item_group_set" href="#"><i class="fa fa-book"></i> Add/move to item group</a>
337                 <a class="itemselection_action_item_group_unset" href="#"><i class="fa fa-unlink"></i> Remove from item group</a>
338               [% END %]
339             </span>
340         [% END %]
341     </div>
342     <table class="items_table" id="[% tab | html %]_table">
343         <thead>
344             <tr>
345                 [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
346                 [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
347                     <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th>
348                 [% END %]
349                 [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
350                 <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
351                 <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
352                 [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
353                 [% IF Koha.Preference('EnableItemGroups') %]
354                     <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
355                 [% END %]
356                 <th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th>
357                 [% IF volinfo %]
358                     <th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th>
359                 [% END %]
360                 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
361                 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen">Last seen</th>
362                 <th id="[% tab | html %]_issues" data-colname="[% tab | html %]_issues">Checkouts</th>
363                 <th id="[% tab | html %]_renewals" data-colname="[% tab | html %]_renewals">Renewals</th>
364                 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned">Date accessioned</th>
365                 <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed">Date last borrowed</th>
366                 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
367                 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
368                 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
369                 [% IF ( itemdata_stocknumber ) %]<th id="[% tab | html %]_stocknumber" data-colname="[% tab | html %]_stocknumber">Inventory number</th>[% END %]
370                 [% IF materials %]<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>[% END %]
371                 [% IF ( itemdata_itemnotes ) %]<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>[% END %]
372                 [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>[% END %]
373                 [% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
374                 [% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
375                 [% IF ( ShowCourseReserves ) %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
376                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
377                 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th id="[% tab | html %]_actions" data-colname="[% tab | html %]_actions"class="NoSort noExport">&nbsp;</th>[% END %]
378             </tr>
379         </thead>
380         <tbody>
381             [% FOREACH item IN items %]
382                 <tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% item.datedue | html %]">
383                 [% IF (StaffDetailItemSelection) %]
384                     <td style="text-align:center;vertical-align:middle">
385                         [% IF item.can_be_edited %]
386                             <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
387                         [% END %]
388                     </td>
389                 [% END %]
390                     [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
391                         <td class="cover">
392                             <div class="bookcoverimg">
393                                 <div class="cover-slider">
394                                     [% FOREACH image IN item.cover_images %]
395                                         <div class="cover-image local-coverimg">
396                                             <a href="/cgi-bin/koha/catalogue/image.pl?itemnumber=[% image.itemnumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]" title="Local cover image">
397                                                 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/catalogue/imageviewer.pl?itemnumber=[% item.itemnumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]" />
398                                             </a>
399                                         </div>
400                                     [% END %]
401                                 </div>
402                             </div>
403                         </td>
404                     [% END %]
405
406                     [% IF ( item_level_itypes ) %]
407                         <td class="itype">
408                             [% SET itemtype = item.itemtype %]
409                             [% IF !noItemTypeImages && itemtype.image_location('intranet') %]
410                                 <img src="[% itemtype.image_location('intranet') | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" />
411                             [% END %]
412                             <span class="itypedesc itypetext">[% itemtype.translated_description | html %]</span>
413                         </td>
414                     [% END %]
415                     <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
416                     <td class="homebranch">
417                         <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span>
418                         <span class="shelvingloc">
419 <!--
420 If permanent location is defined, show description or code and display current location in parentheses. If not, display current location.
421 Note that permanent location is a code, and location may be an authval.
422 -->
423                             [% IF item.permanent_location %]
424                                 [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %]
425                                 [% permloc_authval | html %]
426                                 [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %]
427                                     ([% item.location | html %])
428                                 [% END %]
429                             [% ELSE %]
430                                 [% item.location | html %]
431                             [% END %]
432                         </span>
433                     </td>
434                     [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
435                     [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %]
436                     <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
437                     [% IF ( volinfo ) %]
438                         [% SET serial = item.itemserial.serial %]
439                         [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %]
440                             <td class="enumchron" data-order="[% serial.publisheddate | html %]">
441                         [% ELSE %]
442                             <td class="enumchron">
443                         [% END %]
444                             [% IF ( itemdata_enumchron ) %]
445                                 [% IF item.enumchron && serial.serialseq %]
446                                     <span class="enum">[% item.enumchron | html %]</span>
447                                     [% IF ( item.serialseq && item.enumchron != serial.serialseq ) %]
448                                         <span class="sep"> -- </span>
449                                         <span class="serialseq">[% serial.serialseq | html %]</span>
450                                     [% END %]
451                                 [% ELSIF item.enumchron %]
452                                     <span class="enum">[% item.enumchron | html %]</span>
453                                 [% ELSIF item.serialseq %]
454                                     <span class="serialseq">[% serial.serialseq | html %]</span>
455                                 [% END %]
456                                 [% IF serial.publisheddate %]
457                                     <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span>
458                                 [% END %]
459                             [% END %]
460                             </span>
461                         </td>
462                     [% END %]
463                     <td class="status">
464
465                         [% IF item.checkout %]
466                           [% IF item.checkout.onsite_checkout %]
467                             <span>Currently in local use
468                           [% ELSE %]
469                             <span class="datedue">Checked out
470                           [% END %]
471                                 [% UNLESS ( item.not_same_branch) %]
472                                   [% IF item.checkout.onsite_checkout %]
473                                     by
474                                   [% ELSE %]
475                                     to
476                                   [% END %]
477                                   [% INCLUDE 'patron-title.inc' patron=item.checkout.patron hide_patron_infos_if_needed=1 %]
478                                 [% END %]
479                                 : due [% item.checkout.date_due | $KohaDates as_due_date => 1 %]
480                             </span>
481                         [% ELSIF ( item.transfer ) %]
482                             [% IF (item.transfer.datesent) %]
483                                 <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>
484                             [% ELSE %]
485                                 <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>
486
487                             [% END %]
488                         [% END %]
489
490                         [% IF ( item.itemlost ) %]
491                             [% IF itemlostloop %]
492                                 [% FOREACH itemlostloo IN itemlostloop %]
493                                     [% IF itemlostloo.authorised_value == item.itemlost %]
494                                         <span class="lost">[% itemlostloo.lib | html %]</span>
495                                     [% END %]
496                                 [% END %]
497                             [% ELSE %]
498                                 <span class="lost">Unavailable (lost or missing)</span>
499                             [% END %]
500                         [% END %]
501
502                         [% IF ( item.withdrawn ) %]
503                             [% IF itemwithdrawnloop %]
504                                 [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
505                                     [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
506                                         <span class="wdn">[% itemwithdrawnloo.lib | html %]</span>
507                                     [% END %]
508                                 [% END %]
509                             [% ELSE %]
510                                 <span class="wdn">Withdrawn</span>
511                             [% END %]
512                         [% END %]
513
514                         [% IF ( item.damaged ) %]
515                             [% IF itemdamagedloop %]
516                                 [% FOREACH itemdamagedloo IN itemdamagedloop %]
517                                     [% IF itemdamagedloo.authorised_value == item.damaged %]
518                                         <span class="dmg">[% itemdamagedloo.lib | html %]</span>
519                                     [% END %]
520                                 [% END %]
521                             [% ELSE %]
522                                 <span class="dmg">Damaged</span>
523                             [% END %]
524                         [% END %]
525
526                         [% IF ( item.notforloan || item.itemtype.notforloan ) %]
527                             <span class="notforloan">Not for loan
528                             [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
529                             [% IF not_for_loan_description %]
530                                 <span class="reason">([% not_for_loan_description | html %])</span>
531                             [% END %]
532                             </span>
533                         [% END %]
534
535                         [% SET hold = item.first_hold %]
536                         [% IF hold %]
537                             [% IF hold.waitingdate %]
538                                 <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>
539                                 [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
540                                     <span class="heldfor">Hold for:</span>
541                                     [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
542                                 [% END %]
543                             [% ELSE %]
544                                 <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span>
545                             [% END %]
546                         [% END %]
547
548                         [% SET recall = item.recall %]
549                         [% IF recall %]
550                             [% IF recall.waiting_date %]
551                                 <span>Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</span>
552                             [% ELSE %]
553                                 [% 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 %]
554                                 <span>recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</span>
555                             [% END %]
556                         [% END %]
557
558                         [% UNLESS ( item.notforloan || item.itemtype.notforloan || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfer || hold || ( Koha.Preference('UseRecalls') && recall ) ) %]
559                             <span>Available</span>
560                         [% END %]
561
562                         [% IF ( item.restricted ) %]
563                             <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span>
564                         [% END %]
565
566                         [% IF ( item.bundle_host ) %]
567                             <span class="bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</span>
568                         [% END %]
569
570                     </td>
571                     <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
572                     <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
573                     <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
574                     <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
575                     <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td>
576                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
577                     [% IF ( itemdata_uri ) %]
578                         [% IF item.uri.split(' \| ').size > 1 %]
579                             <td class="uri">
580                                 [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %]
581                             </td>
582                         [% ELSE %]
583                             <td class="uri">
584                                 [% IF item.uri %]
585                                     <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a>
586                                 [% END %]
587                             </td>
588                         [% END %]
589                     [% END %]
590                     [% IF ( itemdata_copynumber ) %]
591                         <td class="copynumber">[% item.copynumber | html %]</td>
592                     [% END %]
593                     [% IF ( itemdata_stocknumber ) %]
594                         <td class="stocknumber">[% item.stocknumber | html %]</td>
595                     [% END %]
596                     [% IF materials %]
597                         <td class="materials"> [% item.materials | html %] </td>
598                     [% END %]
599                     [% IF ( itemdata_itemnotes ) %]
600                         <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td>
601                     [% END %]
602                     [% IF itemdata_nonpublicnotes %]
603                         <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
604                     [% END %]
605                     [% IF ( hostrecords ) %]
606                         <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
607                     [% END %]
608                     [% IF ( analyze ) %]
609                         <td>
610                             [% IF ( item.countanalytics ) %]
611                                 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
612                             [% END %]
613                         </td>
614                     [% END %]
615                     [% IF ( analyze ) %]
616                         <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&amp;hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
617                     [% END %]
618
619                 [% IF ShowCourseReserves %]
620                     <td>
621                         [% IF item.course_reserves %]
622                             [% FOREACH r IN item.course_reserves %]
623                                 [% IF r.course.enabled == 'yes' %]
624                                     <p>
625                                       <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
626                                          [% r.course.course_name | html %]
627                                          <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
628                                          [% IF r.course.section %] [% r.course.section | html %] [% END %]
629                                          [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
630                                       </a>
631                                    </p>
632                                [% END %]
633                            [% END %]
634                        [% END %]
635                     </td>
636                 [% END %]
637
638                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
639                     <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>
640                 [% END %]
641
642                 [% IF CAN_user_editcatalogue_edit_items %]
643                     <td class="actions">
644                         [% IF item.can_be_edited %]
645                             [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
646                                 <div class="btn-group">
647                                     <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>
648                                     <ul class="dropdown-menu pull-right">
649                                         <li><a href="/cgi-bin/koha/tools/upload-cover-image.pl?itemnumber=[% item.itemnumber | uri %]&amp;filetype=image"><i class="fa fa-upload"></i> Upload image</a></li>
650                                     </ul>
651                                 </div>
652                             [% ELSE %]
653                                 <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>
654                             [% END %]
655                         [% END %]
656                         [% IF bundlesEnabled %]
657                             <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>
658                         [% END %]
659                     </td>
660                 [% END %]
661                 </tr>
662             [% END %]
663         </tbody>
664     </table>
665
666 [% END %][%# end of block items_table %]
667
668 [% IF Koha.Preference('EnableItemGroups') %]
669     <div role="tabpanel" class="tab-pane" id="item_groups">
670         [% IF CAN_user_editcatalogue_manage_item_groups %]
671             <div class="item_groups_table_table_controls">
672                 <a href="#" class="item-group-create btn btn-default btn-xs"><i class="fa fa-plus"></i> New item group</a>
673             </div>
674         [% END %]
675         <table class="items-group-table" id="items-group-table">
676             <thead>
677                 <tr>
678                     <td>Display order</td>
679                     <td>Description</td>
680                     <td>&nbsp;</td>
681                 </tr>
682             </thead>
683         </table>
684     </div>
685 [% END %]
686
687
688 <div role="tabpanel" class="tab-pane" id="holdings">
689
690 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
691     <span class="results_summary NovelistSelect" style="display:none;">
692         <span class="label">Novelist Select: </span>
693         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
694     </span>
695 [% END %]
696
697 [% IF ( count ) %]
698     [% IF ( showncount ) %]
699         [% PROCESS items_table tab="holdings" items=itemloop %]
700         [% END %]
701                 [% IF ( hiddencount ) %]
702                    <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&amp;showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
703                 [% END %]               
704                 [% IF ( debug_display ) %]
705                 <br /><br />
706                 <table>
707                         <tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron | html %]</td></tr>
708                         <tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber | html %]</td></tr>
709                         <tr><td>serial</td><td>[% serial | html %]</td></tr>
710                 </table>
711                 [% END %]
712 [% ELSE %]
713     [% IF ( ALTERNATEHOLDINGS ) %]
714     [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
715         <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
716     [% END %]
717     [% ELSE %]
718     <div id="noitems">No physical items for this record</div>
719     [% END %]
720 [% END %]
721
722 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
723     <span class="results_summary NovelistSelect" style="display:none;">
724         <span class="label">Novelist Select: </span>
725         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
726     </span>
727 [% END %]
728     </div>
729
730 [% IF (SeparateHoldings) %]
731     <div role="tabpanel" class="tab-pane" id="otherholdings">
732         [% IF (otheritemloop.size) %]
733             [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
734         [% ELSE %]
735             <span class="nootheritems">No other items.</span>
736         [% END %]
737     </div>
738 [% END %]
739
740 [% IF ( MARCNOTES ) %]
741
742 <div role="tabpanel" class="tab-pane" id="description">
743 <div class="content_set">
744
745     [% FOREACH MARCNOTE IN MARCNOTES %]
746         <p>
747         [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
748             <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
749         [% ELSE %]
750             [% MARCNOTE.marcnote | html | html_line_break %]
751         [% END %]
752         </p>
753 [% END %]
754 </div>
755 </div>
756
757 [% END %]
758
759 [% IF ComponentParts && ComponentParts.size %]
760 <div role="tabpanel" class="tab-pane" id="components">
761     <div class="content_set">
762         <table>
763             [% FOR PART IN ComponentParts %]
764             <tr>
765                 <td>
766                     [% PART | $raw %]
767                 </td>
768             </tr>
769             [% END %]
770         </table>
771         [% IF ComponentParts.size == Koha.Preference('MaxComponentRecords')%]
772         <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>
773         [% END %]
774     </div> <!-- /.content_set -->
775 </div> <!-- /#components -->
776
777 [% END %]
778
779 [% IF ( subscriptionsnumber ) %]
780 <div role="tabpanel" class="tab-pane" id="subscriptions">
781 <div id="catalogue_detail_subscriptions">
782     <h2>This is a serial subscription</h2>
783     <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p> 
784     [% FOREACH subscription IN subscriptions %]
785             [% IF subscription.branchcode %]
786                 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
787             [% END %]
788             [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
789             [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]</p>[% END %]
790             [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
791             [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
792             [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
793             [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
794             [% IF ( subscription.latestserials ) %]
795             <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
796             <table>
797                 <tr>
798                     <th>Issue #</th>
799                     <th>Date arrived</th>
800                     <th>Date published</th>
801                     <th>Date published (text)</th>
802                     <th>Status</th>
803                     <th>Note</th>
804                 </tr>
805             [% FOREACH latestserial IN subscription.latestserials %]
806                 <tr>
807                     <td>[% latestserial.serialseq | html %]</td>
808                     <td data-order="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</td>
809                     <td data-order="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</td>
810                     <td>[% latestserial.publisheddatetext | html %]</td>
811                     <td>
812                       [% IF ( latestserial.status1 ) %]<span>Expected</span>[% END %]
813                       [% IF ( latestserial.status2 ) %]<span>Arrived</span>[% END %]
814                       [% IF ( latestserial.status3 ) %]<span>Late</span>[% END %]
815                       [% IF ( latestserial.status4 ) %]<span>Missing</span>[% END %]
816                       [% IF ( latestserial.status41 ) %]<span>Missing (never received)</span>[% END %]
817                       [% IF ( latestserial.status42 ) %]<span>Missing (sold out)</span>[% END %]
818                       [% IF ( latestserial.status43 ) %]<span>Missing (damaged)</span>[% END %]
819                       [% IF ( latestserial.status44 ) %]<span>Missing (lost)</span>[% END %]
820                       [% IF ( latestserial.status5 ) %]<span>Not issued</span>[% END %]
821                       [% IF ( latestserial.status6 ) %]<span>Delete</span>[% END %]
822                       [% IF ( latestserial.status7 ) %]<span>Claimed</span>[% END %]
823                       [% IF ( latestserial.status8 ) %]<span>Stopped</span>[% END %]
824                     </td>
825                     <td>[% latestserial.notes | html %]</td>
826                 </tr>
827             [% END %]
828             </table>
829             [% END %]
830             <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]">Subscription details</a>
831     [% END %]
832 </div>
833 </div>
834 [% END %]
835
836 [% IF Koha.Preference('AcquisitionDetails') %]
837 <div role="tabpanel" class="tab-pane" id="acq_details">
838   [% IF orders.count %]
839     <table id="orders">
840       <thead>
841         <tr>
842           <th>Vendor</th>
843           <th>Invoice</th>
844           <th>Basket group</th>
845           <th>Basket</th>
846           <th>Order number</th>
847           <th>Creation date</th>
848           <th>Receive date</th>
849           <th>Status</th>
850           <th>Quantity</th>
851           <th title="Estimated cost tax incl. while pending, actual cost tax incl. once received">Price</th>
852           <th>Internal note</th>
853           <th>Subscription</th>
854           <th>Subscription call number</th>
855         </tr>
856       </thead>
857       <tbody>
858       [% FOR order IN orders %]
859         [% SET basket = order.basket %]
860         [% SET vendor = basket.bookseller %]
861           <tr>
862             <td>
863                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
864             </td>
865             <td>
866             [% IF order.invoiceid %]
867                 [% IF CAN_user_acquisition %]
868                     <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
869                        title="Invoice detail page">
870                        [% order.invoice.invoicenumber | html %]</a>
871                 [% ELSE %]
872                     [% order.invoice.invoicenumber | html %]
873                 [% END %]
874             [% END %]
875             </td>
876             <td>
877             [% IF basket.basketgroupid %]
878                 [% SET basket_group = basket.basket_group %]
879                 [% IF CAN_user_acquisition_group_manage %]
880                     <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>
881                 [% ELSE %]
882                     [% basket_group.name | html %] ([% basket_group.id | html %])
883                 [% END %]
884             [% END %]
885             </td>
886             <td>[% IF CAN_user_acquisition_order_manage %]
887                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
888             [% ELSE %]
889                 [% basket.basketname | html %] ([% basket.basketno | html %])
890             [% END %]</td>
891             <td>[% order.ordernumber | html %]</td>
892             <td data-order="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</td>
893             <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</td>
894             <td>
895               [% SWITCH order.orderstatus %]
896                 [% CASE 'new' %]<span>New</span>
897                 [% CASE 'ordered' %]<span>Ordered</span>
898                 [% CASE 'partial' %]<span>Partial</span>
899                 [% CASE 'complete' %]<span>Complete</span>
900                 [% CASE 'cancelled' %]<span>Cancelled</span>
901               [% END %]
902             </td>
903             <td>[% order.quantity | html %]</td>
904             <td>[% IF ( order.unitprice_tax_included > 0 ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %]
905             <td>[% order.order_internalnote | html %]</td>
906             <td>
907                 [% IF order.subscriptionid %]
908                     <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
909                 [% END %]
910             </td>
911             <td>
912                 [% IF order.subscriptionid %]
913                     [% order.subscription.callnumber | html %]
914                 [% END %]
915             </td>
916           </tr>
917       [% END %]
918       </tbody>
919     </table>
920   [% ELSE %]
921     <span class="noorder">There is no order for this bibliographic record.</span>
922   [% END %]
923 </div>
924 [% END %]
925
926 [% IF suggestions.count %]
927     <div role="tabpanel" class="tab-pane" id="suggestion_details">
928         [% IF nb_archived_suggestions > 0 %]
929             <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw  %]
930         [% END %]
931         <table id="suggestions" class="sorted">
932             <thead>
933                 <tr>
934                     <th class="NoSort">&nbsp;</th>
935                     <th class="anti-the">Suggestion</th>
936                     <th>Suggested by - on</th>
937                     <th>Managed by - on</th>
938                     <th>Last modification by - on</th>
939                     <th>Library</th>
940                     <th>Fund</th>
941                     <th>Status</th>
942                 </tr>
943             </thead>
944             <tbody>
945             [% FOREACH suggestion IN suggestions %]
946                 <tr>
947                     <td>[% suggestion.suggestionid | html %]</td>
948                     <td>
949                         <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&amp;op=show" title="suggestion" >
950                             [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a>
951                         <br />
952                         [% IF ( suggestion.copyrightdate ) %]&copy; [% suggestion.copyrightdate | html %] [% END %]
953                         [% IF ( suggestion.volumedesc ) %]; Volume:<em>[% suggestion.volumedesc | html %]</em> [% END %]
954                         [% 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 %]
955                     </td>
956                     <td>
957                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a>
958                         [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %]
959                     </td>
960                     <td>
961                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a>
962                         [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %]
963                     </td>
964                     <td>
965                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a>
966                         [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %]
967                     </td>
968                     <td>
969                         [% Branches.GetName( suggestion.branchcode ) | html %]
970                     </td>
971                     <td>
972                         [% suggestion.fund.budget_name | html %]
973                     </td>
974                     <td>
975                         [% IF    suggestion.STATUS == 'ASKED'     %]<span>Pending</span>
976                         [% ELSIF suggestion.STATUS == 'ACCEPTED'  %]<span>Accepted</span>
977                         [% ELSIF suggestion.STATUS == 'ORDERED'   %]<span>Ordered</span>
978                         [% ELSIF suggestion.STATUS == 'REJECTED'  %]<span>Rejected</span>
979                         [% ELSIF suggestion.STATUS == 'CHECKED'   %]<span>Checked</span>
980                         [% ELSIF suggestion.STATUS == 'AVAILABLE' %]<span>Available</span>
981                         [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %]
982                             [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %]
983                         [% ELSE %]<span>Status unknown</span>
984                         [% END %]
985                         [% IF suggestion.reason %]
986                             <br />([% suggestion.reason | html %])
987                         [% END %]
988                     </td>
989                 </tr>
990                 [% END %]
991             </tbody>
992         </table>
993     </div>
994 [% END %]
995
996 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
997 <div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4>
998 <table>
999 [% 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 %]
1000 [% 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 %]
1001 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber | uri %]">[% XISBN.title | html %]</a> <span>by</span> [% XISBN.author | html %] &copy;[% XISBN.copyrightdate | html %]
1002   [% IF ( XISBN.publishercode ) %]
1003 [% 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 %]
1004     [% END %]
1005                 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
1006                 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
1007 </td>
1008
1009 [% END %]
1010 </table></div>[% END %]
1011 [% END %]
1012
1013 [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]
1014 <div role="tabpanel" class="tab-pane" id="concerns">
1015     <fieldset class="action" style="cursor:pointer;">
1016         <a id="hideResolved"><i class="fa fa-minus-square"></i> Hide resolved</a>
1017         | <a id="showAll"><i class="fa fa-bars"></i> Show all</a>
1018     </fieldset>
1019
1020     <table id="table_concerns" width="100%">
1021         <thead>
1022             <tr>
1023                 <th>Reported</th>
1024                 <th>Details</th>
1025                 <th>Status</th>
1026                 <th data-class-name="actions noExport">Actions</th>
1027             </tr>
1028         </thead>
1029     </table>
1030 </div>
1031 [% END %]
1032
1033 [% IF ( LocalCoverImages ) %]
1034     <div role="tabpanel" class="tab-pane" id="images">
1035         [% IF localimages.count %]
1036             <p>Click on an image to view it in the image viewer</p>
1037             <ul class="thumbnails">
1038                 [% FOREACH image IN localimages %]
1039                     [% IF image %]
1040                         <li id="imagenumber-[% image.imagenumber | html %]" class="thumbnail">
1041                             <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&amp;imagenumber=[% image.imagenumber | uri %]">
1042                                 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image.imagenumber | uri %]" />
1043                             </a>
1044                             [% IF CAN_user_tools_upload_local_cover_images %]
1045                                 <a href="#" class="remove"><i class="fa fa-trash"></i> Delete image</a>
1046                             [% END %]
1047                         </li>
1048                     [% END %]
1049                 [% END %]
1050             </ul>
1051         [% ELSE # - No image passed JavaScript takes care %]
1052             <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span>
1053         [% END %]
1054         [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1055             <p>Upload an image file: <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber | uri %]&amp;filetype=image"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a>
1056             </p>
1057         [% END %]
1058     </div>
1059 [% END %]
1060
1061 [% IF ( HTML5MediaEnabled ) %]
1062 <div role="tabpanel" class="tab-pane" id="html5media">
1063           [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
1064             <p>
1065                 [% IF HTML5MediaSet.is_youtube %]
1066                     <iframe id="player" width="640" height="360" src="[% HTML5MediaSet.srcblock | url %]"></iframe>
1067                 [% ELSE %]
1068                   <[% HTML5MediaParent | html %] controls preload=none>
1069                     <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
1070                     [[% HTML5MediaParent | html %] tag not supported by your browser.]
1071                   </[% HTML5MediaParent | html %]>
1072                 [% END %]
1073             </p>
1074           [% END %]
1075 </div>
1076 [% END %]
1077
1078
1079 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
1080     <div role="tabpanel" class="tab-pane" id="NovelistSelect" class="novelistSelect">
1081         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
1082     </div>
1083 [% END %]
1084
1085 [% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
1086     <div role="tabpanel" class="tab-pane" id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
1087         [% plugins_intranet_catalog_biblio_tab.content | $raw %]
1088     </div>
1089 [% END %]
1090
1091 </div><!-- /tab-content -->
1092 </div><!-- /bibliodetails -->
1093
1094 <div id="export" style="margin-top: 1em;">
1095 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
1096 <table>  <tr>
1097       <th>Save record</th>   </tr>
1098     <tr><td> Select download format:    <select name="format">
1099         <option value="mods">MODS (XML)</option>
1100         <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
1101         <option value="marcxml">MARCXML</option>
1102         <option value="marc8">MARC (non-Unicode/MARC-8)</option>
1103         <option value="utf8">MARC (Unicode/UTF-8)</option>    </select>
1104         <input type="submit" name="save" class="btn btn-primary" value="Download record" /></td>
1105   </tr>
1106   <tr><td>
1107     <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
1108   </td></tr>
1109 </table>
1110 </form>
1111 </div>
1112
1113 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
1114     <div class="modal-dialog modal-lg">
1115     <div class="modal-content">
1116     <div class="modal-header">
1117         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1118         <h3 id="marcPreviewLabel">MARC preview</h3>
1119     </div>
1120     <div class="modal-body">
1121         <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
1122     </div>
1123     <div class="modal-footer">
1124         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1125     </div>
1126     </div>
1127     </div>
1128 </div>
1129
1130             </main>
1131         </div> <!-- /.col-sm-10.col-sm-push-2 -->
1132
1133         <div class="col-sm-2 col-sm-pull-10">
1134             <aside>
1135                 [% INCLUDE 'biblio-view-menu.inc' %]
1136             </aside>
1137         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1138      </div> <!-- /.row -->
1139
1140 [% END %]
1141
1142 <div class="modal fade" id="modal-item-group-create" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-create-label">
1143     <div class="modal-dialog">
1144         <div class="modal-content">
1145             <div class="modal-header">
1146                 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1147                 <h3 id="modal-item-group-create-label"><i class="fa fa-plus"></i> Create a new item group</h3>
1148             </div>
1149             <form id="modal-item-group-create-form" class="validated">
1150                 <div class="modal-body">
1151                     <fieldset>
1152                         <p>
1153                             <label for="item_group_description" class="required">Name: </label>
1154                             <input name="description" id="modal-item-group-create-form-description" type="text" size="30" required="required" class="required" />
1155                             <span class="required">Required</span>
1156                         </p>
1157                         <p>
1158                             <label for="item_group_display_order" class="required">Display order: </label>
1159                             <input name="display_order" id="modal-item-group-create-form-display_order" value="0" size="5" required="required" class="required" />
1160                             <span class="required">Required</span>
1161                             <br/>
1162                             <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1163                         </p>
1164                     </fieldset>
1165                 </div>
1166                 <div class="modal-footer">
1167                     <button id="modal-item-group-create-submit" class="btn btn-default"><i class="fa fa-plus"></i> Submit</button>
1168                     <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1169                 </div>
1170             </form>
1171         </div>
1172     </div>
1173 </div>
1174
1175 <div class="modal fade" id="modal-item-group-edit" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-edit-label">
1176     <div class="modal-dialog">
1177         <div class="modal-content">
1178             <div class="modal-header">
1179                 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1180                 <h3 id="modal-item-group-edit-label"><i class='fa fa-edit'></i> Edit item group</h3>
1181             </div>
1182             <form id="modal-item-group-edit-form" class="validated">
1183                 <div class="modal-body">
1184                     <fieldset>
1185                         <p>
1186                             <label for="item_group_description" class="required">Name: </label>
1187                             <input name="description" id="modal-item-group-edit-form-description" type="text" size="30" required="required" class="required" />
1188                             <span class="required">Required</span>
1189                         </p>
1190                         <p>
1191                             <label for="item_group_display_order" class="required">Sort order: </label>
1192                             <input name="display_order" id="modal-item-group-edit-form-display_order" size="5" />
1193                             <span class="hint">Numbers only, item groups will be displayed in counting order</span>
1194                         </p>
1195                     </fieldset>
1196                 </div>
1197                 <div class="modal-footer">
1198                     <button id="modal-item-group-edit-submit" class="btn btn-default"><i class='fa fa-edit'></i> Submit</button>
1199                     <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1200                 </div>
1201             </form>
1202         </div>
1203     </div>
1204 </div>
1205
1206 <div class="modal fade" id="modal-item-group-delete" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-delete-label">
1207     <div class="modal-dialog">
1208         <div class="modal-content">
1209             <div class="modal-header">
1210                 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1211                 <h3 id="modal-item-group-delete-label"><i class='fa fa-trash'></i> Delete item group</h3>
1212             </div>
1213             <div class="modal-body">
1214                 Are you sure you want to delete this item group?
1215             </div>
1216             <div class="modal-footer">
1217                 <button id="modal-item-group-delete-submit" class="btn btn-danger"><i class='fa fa-trash'></i> Delete</button>
1218                 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1219             </div>
1220         </div>
1221     </div>
1222 </div>
1223
1224 <div class="modal fade" id="modal-item-group-set" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-set-label">
1225     <div class="modal-dialog">
1226         <div class="modal-content">
1227             <div class="modal-header">
1228                 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1229                 <h3 id="modal-item-group-set-label"><i class='fa fa-book'></i> Set item group for items</h3>
1230             </div>
1231             <form id="modal-item-group-set-form" class="validated">
1232                 <div class="modal-body">
1233                     <fieldset>
1234                         <p>
1235                             <label for="item_group" class="required">Item group: </label>
1236                             <select name="item_group" id="item-group-add-form-select">
1237                                 [% FOREACH ig IN biblio.item_groups %]
1238                                     <option value="[% ig.id | html %]">[% ig.description | html %]</option>
1239                                 [% END %]
1240                             </select>
1241                             <span class="required">Required</span>
1242                         </p>
1243                     </fieldset>
1244                 </div>
1245                 <div class="modal-footer">
1246                     <button id="modal-item-group-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set item group</button>
1247                     <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1248                 </div>
1249             </form>
1250         </div>
1251     </div>
1252 </div>
1253
1254 <div class="modal fade" id="modal-item-group-unset" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-unset-label">
1255     <div class="modal-dialog">
1256         <div class="modal-content">
1257             <div class="modal-header">
1258                 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1259                 <h3 id="modal-item-group-unset-label"><i class='fa fa-unlink'></i> Remove item from item group</h3>
1260             </div>
1261             <div class="modal-body">
1262                 Are you sure you want to remove these item(s) from their item group(s)?
1263             </div>
1264             <div class="modal-footer">
1265                 <button id="modal-item-group-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button>
1266                 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
1267             </div>
1268         </div>
1269     </div>
1270 </div>
1271
1272     [% IF bundlesEnabled %]
1273     <div class="modal" id="addToBundleModal" tabindex="-1" role="dialog" aria-labelledby="addToBundleLabel">
1274         <form id="addToBundleForm" action="">
1275             <div class="modal-dialog" role="document">
1276                 <div class="modal-content">
1277                     <div class="modal-header">
1278                         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1279                         <h3 id="addToBundleLabel">Add to bundle</h3>
1280                     </div>
1281                     <div class="modal-body">
1282                         <div id="addResult"></div>
1283                         <fieldset class="rows">
1284                             <ol>
1285                                 <li>
1286                                     <label class="required" for="external_id">Item barcode: </label>
1287                                     <input type="text" id="external_id" name="external_id" required="required">
1288                                     <span class="required">Required</span>
1289                                 </li>
1290                             </ol>
1291                         </fieldset>
1292                     </div>
1293                     <div class="modal-footer">
1294                         <button type="submit" class="btn btn-default">Submit</button>
1295                         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1296                     </div>
1297                 </div>
1298             </div>
1299         </form>
1300     </div>
1301
1302     <div class="modal" id="removeFromBundleModal" tabindex="-1" role="dialog" aria-labelledby="removeFromBundleLabel">
1303         <form id="removeFromBundleForm" action="">
1304             <div class="modal-dialog" role="document">
1305                 <div class="modal-content">
1306                     <div class="modal-header">
1307                         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
1308                         <h3 id="removeFromBundleLabel">Remove from bundle</h3>
1309                     </div>
1310                     <div class="modal-body">
1311                         <div id="removeResult"></div>
1312                         <fieldset class="rows">
1313                             <ol>
1314                                 <li>
1315                                     <label class="required" for="external_id">Item barcode: </label>
1316                                     <input type="text" id="rm_external_id" name="external_id" required="required">
1317                                     <span class="required">Required</span>
1318                                 </li>
1319                             </ol>
1320                         </fieldset>
1321                     </div>
1322                     <div class="modal-footer">
1323                         <button type="submit" class="btn btn-default">Submit</button>
1324                         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
1325                     </div>
1326                 </div>
1327             </div>
1328         </form>
1329     </div>
1330     [% END %]
1331
1332     [% IF ( Koha.Preference('CatalogConcerns') ) %]
1333     [% INCLUDE 'modals/add_catalog_concern.inc' %]
1334     [% END %]
1335
1336     [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]
1337     [% INCLUDE 'modals/display_ticket.inc' %]
1338     [% END %]
1339
1340 [% MACRO jsinclude BLOCK %]
1341     [% INCLUDE 'catalog-strings.inc' %]
1342     [% Asset.js("js/catalog.js") | $raw %]
1343     [% Asset.js("js/recalls.js") | $raw %]
1344     [% Asset.js("js/coce.js") | $raw %]
1345     [% Asset.js("lib/Chocolat/js/chocolat.js") | $raw %]
1346     [% IF ( Koha.Preference('CatalogConcerns') ) %]
1347         <script>
1348             /* Set a variable needed by add_catalog_concern.js */
1349             var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1350         </script>
1351         [% Asset.js("js/modals/add_catalog_concern.js") | $raw %]
1352      [% END %]
1353      [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]
1354          <script>
1355             $(document).ready(function() {
1356                 var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'concerns', 'table_concerns', 'json' ) | $raw %];
1357
1358                 var filtered = false;
1359                 let additional_filters = {
1360                     resolved_date: function(){
1361                         if ( filtered ) {
1362                             return { "=": null };
1363                         } else {
1364                             return;
1365                         }
1366                     },
1367                     biblio_id: [% biblionumber | uri %]
1368                 };
1369
1370                 var tickets_url = '/api/v1/tickets';
1371                 var tickets = $("#table_concerns").kohaTable({
1372                     "ajax": {
1373                         "url": tickets_url
1374                     },
1375                     "embed": [
1376                         "reporter",
1377                         "resolver",
1378                         "updates+count",
1379                     ],
1380                     'emptyTable': '<div class="dialog message">' + _("Congratulations, there are no catalog concerns.") + '</div>',
1381                     "columnDefs": [ {
1382                         "targets": [0,1,2],
1383                         "render": function (data, type, row, meta) {
1384                             if ( type == 'display' ) {
1385                                 if ( data != null ) {
1386                                     return data.escapeHtml();
1387                                 }
1388                                 else {
1389                                     return "";
1390                                 }
1391                             }
1392                             return data;
1393                         }
1394                     } ],
1395                     "columns": [
1396                         {
1397                             "data": "reported_date:reporter.firstname",
1398                             "render": function(data, type, row, meta) {
1399                                 let reported = '<span class="date clearfix">' + $datetime(row.reported_date) + '</span>';
1400                                 reported += '<span class="reporter clearfix">' + $patron_to_html(row.reporter, {
1401                                     display_cardnumber: false,
1402                                     url: true
1403                                 }) + '</span>';
1404                                 return reported;
1405                             },
1406                             "searchable": true,
1407                             "orderable": true
1408                         },
1409                         {
1410                             "data": "title:body",
1411                             "render": function(data, type, row, meta) {
1412                                 let resolved = ( row.resolved_date ) ? true : false;
1413                                 let result = '<a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="' + resolved + '">' + row.title + '</a>';
1414                                 if (row.updates_count) {
1415                                     result += '<span class="pull-right"><a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '"><i class="fa fa-comment" aria-hidden="true"></i> ' + row.updates_count + '</a></span>';
1416                                 }
1417                                 result += '<div id="detail_' + row.ticket_id + '" class="hidden">' + row.body + '</div>';
1418                                 return result;
1419                             },
1420                             "searchable": true,
1421                             "orderable": true
1422                         },
1423                         {
1424                             "data": "resolved_date",
1425                             "render": function(data, type, row, meta) {
1426                                 let result = '';
1427                                 if (row.resolved_date) {
1428                                     result += _("Resolved by:") + ' <span>' + $patron_to_html(row.resolver, {
1429                                         display_cardnumber: false,
1430                                         url: true
1431                                     }) + '</span>';
1432                                     result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>';
1433                                 } else {
1434                                     result += _("Open");
1435                                 }
1436                                 return result;
1437                             },
1438                             "searchable": true,
1439                             "orderable": true
1440                         },
1441                         {
1442                             "data": function(row, type, val, meta) {
1443                                 let resolved = ( row.resolved_date ) ? true : false;
1444                                 let result = '<a class="btn btn-default btn-xs" role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="' + resolved + '"><i class="fa fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>';
1445                                 return result;
1446                             },
1447                             "searchable": false,
1448                             "orderable": false
1449                         },
1450                     ]
1451                 }, table_settings, 0, additional_filters);
1452
1453                 $('#hideResolved').on("click", function() {
1454                     filtered = true;
1455                     tickets.DataTable().draw();
1456                 });
1457
1458                 $('#showAll').on("click", function() {
1459                     filtered = false;
1460                     tickets.DataTable().draw();
1461                 });
1462             });
1463         </script>
1464         [% Asset.js("js/modals/display_ticket.js") | $raw %]
1465     [% END %]
1466     <script>
1467         var interface = "[% interface | html %]";
1468         var theme = "[% theme | html %]";
1469         // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
1470         function verify_cover_images() {
1471             // Loop over each container in the template which contains covers
1472             $(".cover-slider").each(function(){
1473                 var lightbox_descriptions = [];
1474                 var first_shown = 0;
1475                 $(this).find(".cover-image").each( function( index ){
1476                 var div = $(this);
1477                 // Find the image in the container
1478                 var img = div.find("img")[0];
1479                 if( $(img).length > 0 ){
1480                     var description = "";
1481                         // All slides start hidden. If this is the first one, show it.
1482                         if( first_shown == 0 ){
1483                             div.show();
1484                             first_shown = 1;
1485                         }
1486                         // Check if Amazon image is present
1487                         if ( div.attr("id") == "amazon-bookcoverimg"  ) {
1488                             w = img.width;
1489                             h = img.height;
1490                             if ((w == 1) || (h == 1)) {
1491                                 // Amazon returned single-pixel placeholder
1492                                 // Remove the container
1493                                 div.remove();
1494                             } else {
1495                                 lightbox_descriptions.push(_("Amazon cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1496                             }
1497                         } else if( div.attr("id") == "custom-coverimg" ){
1498                             if ( (img.complete != null) && (!img.complete) || img.naturalHeight == 0 ) {
1499                                 // No image was loaded via the CustomCoverImages system preference
1500                                 // Remove the container
1501                                 div.remove();
1502                             } else {
1503                                 lightbox_descriptions.push("Custom cover image");
1504                             }
1505                         } else if ( div.attr("id") == "syndetics-bookcoverimg" ){
1506                                 lightbox_descriptions.push(_("Syndetics cover image (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1507                         }
1508                         else if( div.hasClass("coce-coverimg" ) ){
1509                             // Identify which service's image is being loaded by Coce
1510                             var coce_description;
1511                             if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
1512                                 coce_description = ("Coce image from Amazon.com");
1513                             } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
1514                                 coce_description = _("Coce image from Google Books");
1515                             } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
1516                                 coce_description = _("Coce image from Open Library");
1517                             }
1518                             div.find(".hint").html(coce_description);
1519                             lightbox_descriptions.push(coce_description);
1520                         } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1521                             lightbox_descriptions.push(_("Local cover image (<a href='%s'>edit</a>)").format($(img).data('link')));
1522                         } else {
1523                             lightbox_descriptions.push(_("Cover image source unknown"));
1524                         }
1525                     }
1526                 });
1527
1528                 // Lightbox for cover images
1529                 Chocolat(this.querySelectorAll('.cover-image a'), {
1530                     description: function(){
1531                         return lightbox_descriptions[this.settings.currentImageIndex];
1532                     }
1533                 });
1534
1535             });
1536
1537             $(".cover-slider").each(function(){
1538                 var coverSlide = this;
1539                 var coverImages = $(this).find(".cover-image");
1540                 if( coverImages.length > 1 ){
1541                     coverImages.each(function( index ){
1542                         // If more that one image is present, add a navigation link
1543                         // for activating the slide
1544                         var covernav = $("<a href=\"#\" data-num=\"" + index + "\" class=\"cover-nav\"></a>");
1545                         if( index == 0 ){
1546                             // Set the first navigation link as active
1547                             $(covernav).addClass("nav-active");
1548                         }
1549                         $(covernav).html("<i class=\"fa fa-circle\"></i>");
1550                         $(coverSlide).append( covernav );
1551                     });
1552                 }
1553
1554                 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
1555                     && $(coverSlide).find(".cover-image:visible").length < 1 ){
1556                     $(coverSlide).remove();
1557                 } else {
1558                     $(coverSlide).addClass("cover-slides");
1559                     var img = $(coverSlide).find(".cover-image:visible").find("img")[0];
1560                     if( $(img).length > 0 && img.complete && img.naturalHeight > 0 ){
1561                         $(".cover-slides").css({"background-image":"none"});
1562                     }
1563                 }
1564             });
1565
1566             $("#editions img").each(function(i){
1567                 if ( this.src.indexOf('amazon.com') >= 0 ) {
1568                     w = this.width;
1569                     h = this.height;
1570                     if ((w == 1) || (h == 1)) {
1571                         this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1572                     } else if ( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ) {
1573                         this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
1574                     }
1575                 }
1576             });
1577         }
1578
1579         function removeLocalImage(imagenumber) {
1580             var thumbnail = $("#imagenumber-" + imagenumber );
1581             var copy = thumbnail.html();
1582             thumbnail.find("img").css("opacity", ".2");
1583             thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
1584             $.ajax({
1585                 url: "/cgi-bin/koha/svc/cover_images?action=delete&imagenumber=" + imagenumber,
1586                 success: function(data) {
1587                     $(data).each( function(i) {
1588                         if ( this.deleted == 1 ) {
1589                             thumbnail.remove();
1590                         } else {
1591                             thumbnail.html( copy );
1592                             alert(_("An error occurred on deleting this image"));
1593                         }
1594                         if ( $('ul.thumbnails > li').length == 0 ) {
1595                             showNoImageMessage();
1596                         }
1597                     });
1598                 },
1599                 error: function(data) {
1600                     thumbnail.html( copy );
1601                     alert(_("An error occurred on deleting this image"));
1602                 }
1603             });
1604         }
1605
1606         function showNoImageMessage() {
1607             var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
1608             no_images_msg = '<p>' + no_images_msg + '</p>';
1609             [% IF ( CAN_user_tools_upload_local_cover_images ) %]
1610                 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 + "&amp;filetype=image'><i class='fa fa-upload' aria-hidden='true'></i> ","</a>");
1611                 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
1612             [% END %]
1613             $('#images').html(no_images_msg);
1614         }
1615
1616         [% IF StaffDetailItemSelection %]
1617             function itemSelectionBuildDeleteLink(div) {
1618                 var itemnumbers = new Array();
1619                 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1620                     itemnumbers.push($(this).val());
1621                 });
1622                 if (itemnumbers.length > 0) {
1623                     var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
1624                     url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1625                     url += '&biblionumber=[% biblionumber | uri %]';
1626                     url += '&src=CATALOGUING';
1627                     $('a.itemselection_action_delete').attr('href', url);
1628                 } else {
1629                     return false;
1630                 }
1631                 return true
1632             }
1633
1634             function itemSelectionBuildModifyLink(div) {
1635                 var itemnumbers = new Array();
1636                 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
1637                     itemnumbers.push($(this).val());
1638                 });
1639                 if (itemnumbers.length > 0) {
1640                     var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
1641                     url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
1642                     url += '&biblionumber=[% biblionumber | uri %]';
1643                     url += '&src=CATALOGUING';
1644                     $('a.itemselection_action_modify').attr('href', url);
1645                 } else {
1646                     return false;
1647                 }
1648                 return true;
1649             }
1650
1651             function itemSelectionBuildActionLinks(tab) {
1652                 var div = $("#" + tab);
1653                 var delete_link_ok = itemSelectionBuildDeleteLink(div);
1654                 var modify_link_ok = itemSelectionBuildModifyLink(div);
1655                 if (modify_link_ok || delete_link_ok) {
1656                     $('.itemselection_actions', div).show();
1657                 } else {
1658                     $('.itemselection_actions', div).hide();
1659                 }
1660             }
1661
1662             $(document).ready(function() {
1663                 $('table.items_table').each(function() {
1664                     var div = $(this).parent().attr("id");
1665                     itemSelectionBuildActionLinks(div);
1666                 });
1667
1668                 $("input[name='itemnumber'][type='checkbox']").change(function() {
1669                     var div = $(this).parents('table').parent().parent().attr("id");
1670                     itemSelectionBuildActionLinks(div);
1671                 });
1672
1673                 $(".SelectAll").on("click",function(e){
1674                     e.preventDefault();
1675                     var tab = $(this).data("tab");
1676                     $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
1677                     itemSelectionBuildActionLinks(tab);
1678                 });
1679
1680                 $(".ClearAll").on("click",function(e){
1681                     e.preventDefault();
1682                     var tab = $(this).data("tab");
1683                     $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1684                     itemSelectionBuildActionLinks(tab);
1685                 });
1686             });
1687         [% END %]
1688
1689         $(document).ready(function() {
1690             // Pick details tab to display by default
1691             [% IF count == 0 %]
1692                 [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
1693                     $(".nav-tabs a[href='#html5media']").tab("show");
1694                 [% ELSIF ComponentParts && ComponentParts.size %]
1695                     $(".nav-tabs a[href='#components']").tab("show");
1696                 [% ELSE %]
1697                     $(".nav-tabs a[href='#holdings']").tab("show");
1698                 [% END %]
1699             [% ELSE %]
1700                 $(".nav-tabs a[href='#holdings']").tab("show");
1701             [% END %]
1702             $('#search-form').focus();
1703             $('.thumbnails > li > .remove').click(function() {
1704                 var result = confirm(_("Are you sure you want to delete this cover image?"));
1705
1706                 if ( result == true ) {
1707                     var imagenumber = $(this).parent().attr('id').split('-')[1];
1708                     removeLocalImage(imagenumber);
1709                 }
1710
1711                 return false;
1712             });
1713             [% IF ( IntranetCoce && CoceProviders ) %]
1714                 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
1715             [% END %]
1716
1717             $("body").on("click",".previewMARC", function(e){
1718                 e.preventDefault();
1719                 var page = $(this).attr("href");
1720                 $("#marcPreview .modal-body").load(page + " table");
1721                 $('#marcPreview').modal({show:true});
1722             });
1723             $("#marcPreview").on("hidden.bs.modal", function(){
1724                 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
1725             });
1726             [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1727                 novSelect.loadContentForQuery({
1728                     ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1729                     ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
1730                     version : '2.1'
1731                 },
1732                 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
1733                 '[% Koha.Preference('NovelistSelectPassword') | html %]',
1734                 function(d){
1735                     if ( d.length > 0 ){ //If no content
1736                         $(".NovelistSelect").show();
1737                     }
1738                  });
1739              [% END %]
1740              $(".print-label").on("click", function(e){
1741                 e.preventDefault();
1742                 link = $(this).attr("href");
1743                 openWindow(link,"Print spine label",400,400);
1744              });
1745              $(".cover-slider").on("click",".cover-nav", function(e){
1746                  e.preventDefault();
1747                 var cover_slider = $(this).parent();
1748                 // Adding click handler for cover image navigation links
1749                 var num = $(this).data("num");
1750                 $(cover_slider).find(".cover-nav").removeClass("nav-active");
1751                 $(this).addClass("nav-active");
1752                 $(cover_slider).find(".cover-image").hide();
1753                 $(cover_slider).find(".cover-image").eq( num ).show();
1754              });
1755         });
1756
1757
1758         [% IF ( IntranetCoce && CoceProviders ) %]
1759             let counter_wait = 0;
1760             function wait_for_images(cb){
1761
1762                 var loaded = 1;
1763                 counter_wait++;
1764
1765                 if ( loaded ) {
1766                     loaded = KOHA.coce.done;
1767                 }
1768
1769                 if (!loaded && counter_wait < 50) {// Do not wait more than 5 seconds
1770                     window.setTimeout(function(){wait_for_images(cb);}, 100);
1771                 } else {
1772                     if (counter_wait >= 50 ) {
1773                         console.log("Could not retrieve the images")
1774                     }
1775                     cb();
1776                 }
1777             }
1778
1779             $(window).load(function() {
1780                 wait_for_images(verify_cover_images);
1781             });
1782         [% ELSE %]
1783             $(window).load(function() {
1784                 verify_cover_images();
1785             });
1786         [% END %]
1787     </script>
1788     [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
1789         <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
1790     [% END %]
1791     [% INCLUDE 'datatables.inc' %]
1792     [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1793     [% INCLUDE 'columns_settings.inc' %]
1794     [% INCLUDE 'js-date-format.inc' %]
1795     [% INCLUDE 'js-patron-format.inc' %]
1796     [% INCLUDE 'js-biblio-format.inc' %]
1797     [% Asset.js("js/browser.js") | $raw %]
1798     [% Asset.js("js/table_filters.js") | $raw %]
1799     <script>
1800         var browser;
1801         browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1802         browser.show();
1803
1804         [% IF bundlesEnabled %]
1805         var bundle_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','bundle_tables','json') | $raw %];
1806         var bundle_lost_value = [% Koha.Preference('BundleLostValue') | html %];
1807         [% END %]
1808         $(document).ready(function() {
1809
1810             [% IF bundlesEnabled %] // Bundle handling
1811             function createChild ( row, itemnumber, duedate ) {
1812
1813                 // Toolbar
1814                 var bundle_toolbar = $('<div id="toolbar" class="btn-toolbar"></div>');
1815                 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>');
1816                 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>');
1817
1818                 // Disable management if there's a duedate
1819                 if(duedate) {
1820                     bundle_toolbar.children('.btn').addClass("disabled");
1821                 }
1822
1823                 // This is the table we'll convert into a DataTable
1824                 var bundles_table = $('<table class="display tbundle" data-itemnumber="'+itemnumber+'" id="bundle_table_'+itemnumber+'" width="100%"/>');
1825
1826                 // Display it the child row
1827                 row.child( bundle_toolbar.add(bundles_table), 'bundle' ).show();
1828
1829                 // Initialise as a DataTable
1830                 var bundle_table_url = "/api/v1/items/" + itemnumber + "/bundled_items?";
1831                 var bundle_table = bundles_table.kohaTable({
1832                     "ajax": {
1833                         "url": bundle_table_url
1834                     },
1835                     "embed": [
1836                         "biblio",
1837                         "return_claim.patron"
1838                     ],
1839                     "order": [[ 1, "asc" ]],
1840                     "columnDefs": [ {
1841                         "targets": [0,1,2,3],
1842                         "render": function (data, type, row, meta) {
1843                             if ( data && type == 'display' ) {
1844                                 return data.escapeHtml();
1845                             }
1846                             return data;
1847                         }
1848                     } ],
1849                     "columns": [
1850                         {
1851                             "data": "biblio.title:biblio.subtitle:biblio.medium",
1852                             "title": _("Title"),
1853                             "searchable": true,
1854                             "orderable": true,
1855                             "render": function(data, type, row, meta) {
1856                                 return $biblio_to_html(row.biblio, { link: 1 });
1857                             }
1858                         },
1859                         {
1860                             "data": "biblio.author",
1861                             "title": _("Author"),
1862                             "searchable": true,
1863                             "orderable": true,
1864                         },
1865                         {
1866                             "data": "callnumber",
1867                             "title": _("Callnumber"),
1868                             "searchable": true,
1869                             "orderable": true,
1870                         },
1871                         {
1872                             "data": "external_id",
1873                             "title": _("Barcode"),
1874                             "searchable": true,
1875                             "orderable": true,
1876                         },
1877                         {
1878                             "data": "lost_status:last_seen_date:return_claim.patron",
1879                             "title": _("Status"),
1880                             "searchable": false,
1881                             "orderable": true,
1882                             "render": function(data, type, row, meta) {
1883                                 if ( row.lost_status == bundle_lost_value ) {
1884                                     let out = '<span class="lost">' + _("Last seen") + ': ' + $date(row.last_seen_date) + '</span>';
1885                                     if ( row.return_claim ) {
1886                                         out = out + '<span class="claims_return">' + _("Claims returned by") + ': ' + $patron_to_html( row.return_claim.patron, { display_cardnumber: false, url: true } ) + '</span>';
1887                                     }
1888                                     return out;
1889                                 }
1890                                 else if ( row.lost_status !== 0 ) {
1891                                     return '<span class="lost">' + _("Lost") + ': ' + row.lost_status + '</span>';
1892                                 }
1893                                 return '<span class="available">' + _("Present") + '</span>';
1894                             }
1895                         },
1896                         {
1897                             "data": function( row, type, val, meta ) {
1898                                 var result;
1899                                 if (duedate) {
1900                                     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';
1901                                 } else {
1902                                     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';
1903                                 }
1904                                 return result;
1905                             },
1906                             "title": _("Actions"),
1907                             "searchable": false,
1908                             "orderable": false,
1909                             "class": "noExport"
1910                         }
1911                     ]
1912                 }, bundle_settings, 1);
1913                 $(".tbundle").on("click", ".remove:not(.disabled)", function(){
1914                     var bundle_table = $(this).closest('table');
1915                     var host_itemnumber = bundle_table.data('itemnumber');
1916                     var component_itemnumber = $(this).data('itemnumber');
1917                     var unlink_item_url = "/api/v1/items/" + host_itemnumber + "/bundled_items/" + component_itemnumber;
1918                     $.ajax({
1919                         type: "DELETE",
1920                         url: unlink_item_url,
1921                         success: function(){
1922                             bundle_table.DataTable({ 'retrieve': true }).draw(false);
1923                         }
1924                     });
1925                 });
1926
1927                 return;
1928             }
1929
1930             var bundle_changed;
1931             var bundle_form_active;
1932             $("#addToBundleModal").on("shown.bs.modal", function(e){
1933                 var button = $(e.relatedTarget);
1934                 var item_id = button.data('item');
1935                 $("#addResult").replaceWith('<div id="addResult"></div>');
1936                 $("#addToBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items');
1937                 $("#external_id").focus();
1938                 bundle_changed = 0;
1939                 bundle_form_active = item_id;
1940             });
1941
1942             function addToBundle (url, data) {
1943                   /* Send the data using post with external_id */
1944                   var posting = $.post({
1945                       url: url,
1946                       data: JSON.stringify(data),
1947                       contentType: "application/json; charset=utf-8",
1948                       dataType: "json"
1949                   });
1950
1951                   const barcode = data.external_id;
1952
1953                   /* Report the results */
1954                   posting.done(function(data) {
1955                       $('#addResult').replaceWith('<div id="addResult" class="alert alert-success">'+_("Success: Added '%s'").format(barcode)+'</div>');
1956                       $('#external_id').val('').focus();
1957                       bundle_changed = 1;
1958                   });
1959                   posting.fail(function(data) {
1960                       if ( data.status === 409 ) {
1961                           var response = data.responseJSON;
1962                           if ( response.error_code === 'already_bundled' ) {
1963                               $('#addResult').replaceWith('<div id="addResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
1964                           } else if (response.error_code === 'checked_out') {
1965                               const button = $('<button type="button">')
1966                                 .addClass('btn btn-xs')
1967                                 .text(__("Check in and add to bundle"))
1968                                 .on('click', function () {
1969                                     addToBundle(url, { external_id: barcode, force_checkin: true });
1970                                 });
1971                               $('#addResult')
1972                                 .empty()
1973                                 .attr('class', 'alert alert-warning')
1974                                 .append(__x('Warning: Item {barcode} is checked out', { barcode }))
1975                                 .append(' ', button);
1976                           } else if (response.error_code === 'failed_checkin') {
1977                               $('#addResult')
1978                                 .empty()
1979                                 .attr('class', 'alert alert-danger')
1980                                 .append(__x('Failure: Item {barcode} cannot be checked in', { barcode }))
1981                           } else if (response.error_code === 'reserved') {
1982                               const button = $('<button type="button">')
1983                                 .addClass('btn btn-xs')
1984                                 .text(__("Ignore holds and add to bundle"))
1985                                 .on('click', function () {
1986                                     addToBundle(url, { external_id: barcode, ignore_holds: true });
1987                                 });
1988                               $('#addResult')
1989                                 .empty()
1990                                 .attr('class', 'alert alert-warning')
1991                                 .append(__x('Warning: Item {barcode} is reserved', { barcode }))
1992                                 .append(' ', button);
1993                           } else {
1994                               $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
1995                           }
1996                       } else if ( data.status === 404 ) {
1997                           $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
1998                       } else if ( data.status === 400 ) {
1999                           var response = data.responseJSON;
2000                           if ( response.error_code === "failed_nesting" ) {
2001                               $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' is a bundle and bundles cannot be nested").format(barcode)+'</div>');
2002                           } else {
2003                               $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
2004                           }
2005                       } else {
2006                           $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
2007                       }
2008                       $('#external_id').val('').focus();
2009                   });
2010             }
2011
2012             $("#addToBundleForm").submit(function(event) {
2013                   /* stop form from submitting normally */
2014                   event.preventDefault();
2015
2016                   const url = this.action;
2017                   const data = { external_id: this.elements.external_id.value };
2018
2019                   addToBundle(url, data);
2020             });
2021
2022             $("#addToBundleModal").on("hidden.bs.modal", function(e){
2023                 if ( bundle_changed ) {
2024                     $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
2025                 }
2026                 bundle_form_active = 0;
2027                 bundle_changed = 0;
2028             });
2029
2030             $("#removeFromBundleModal").on("shown.bs.modal", function(e){
2031                 var button = $(e.relatedTarget);
2032                 var item_id = button.data('item');
2033                 $("#removeResult").replaceWith('<div id="removeResult"></div>');
2034                 $("#removeFromBundleForm").attr('action', '/api/v1/items/' + item_id + '/bundled_items/');
2035                 $("#rm_external_id").focus();
2036                 bundle_changed = 0;
2037                 bundle_form_active = item_id;
2038             });
2039
2040             $("#removeFromBundleForm").submit(function(event) {
2041
2042                 /* stop form from submitting normally */
2043                 event.preventDefault();
2044
2045                 /* get the action attribute from the <form action=""> element */
2046                 var $form = $(this),
2047                 url = $form.attr('action');
2048
2049                 var barcode = $('#rm_external_id').val();
2050
2051                 /* Fetch itemnumber using rm_external_id */
2052                 var itemReq = $.get('/api/v1/items', { q: JSON.stringify({
2053                     external_id: barcode
2054                 }) }, null, "json");
2055
2056                 var itemnumber;
2057                 itemReq.done(function(data) {
2058                     if (data.length === 1) {
2059                         itemnumber = data[0].item_id;
2060
2061                         /* Remove link using fetch itemnumber */
2062                         var deleteReq = $.ajax( url + itemnumber, {
2063                             type : 'DELETE'
2064                         });
2065
2066                         /* Report the results */
2067                         deleteReq.done(function(data) {
2068                             var barcode = $('#rm_external_id').val();
2069                             $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-success">'+_("Success: Removed '%s'").format(barcode)+'</div>');
2070                             $('#rm_external_id').val('').focus();
2071                             bundle_changed = 1;
2072                         });
2073                         deleteReq.fail(function(data) {
2074                             var barcode = $('#rm_external_id').val();
2075                             if ( data.status === 409 ) {
2076                                 var response = data.responseJSON;
2077                                 if ( response.key === "PRIMARY" ) {
2078                                     $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-warning">'+_("Warning: Item '%s' already attached").format(barcode)+'</div>');
2079                                 } else {
2080                                     $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'</div>');
2081                                 }
2082                             } else if ( data.status === 404 ) {
2083                                 $('#addResult').replaceWith('<div id="addResult" class="alert alert-danger">'+_("Failure: Item '%s' not found").format(barcode)+'</div>');
2084                             } else {
2085                                 $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failure: Check the logs for details")+'</div>');
2086                             }
2087                             $('#rm_external_id').val('').focus();
2088                         });
2089                     } else {
2090                         $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'</div>');
2091                     }
2092                 });
2093                 itemReq.fail(function(data) {
2094                      $('#removeResult').replaceWith('<div id="removeResult" class="alert alert-danger">'+_("Failed: Item not found '%s'").format(barcode)+'</div>');
2095                     $('#rm_external_id').val('').focus();
2096
2097                 });
2098             });
2099
2100             $("#removeFromBundleModal").on("hidden.bs.modal", function(e){
2101                 if ( bundle_changed ) {
2102                     $('#bundle_table_'+bundle_form_active).DataTable({ 'retrieve': true }).ajax.reload();
2103                 }
2104                 bundle_form_active = 0;
2105                 bundle_changed = 0;
2106             });
2107             // End bundle handling
2108             [% END %]
2109
2110             var table_names = [ 'holdings_table', 'otherholdings_table' ];
2111             var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json')  | $raw %] ];
2112             var has_images = [ "[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]" ];
2113             table_names.forEach( function( table_name, index ) {
2114                 if ( !has_images[index] ) {
2115                     table_settings[index].columns.splice(1,1);
2116                 }
2117                 var dt_parameters = {
2118                     'sDom': 't',
2119                     'bPaginate': false,
2120                     'bAutoWidth': false,
2121                     "bKohaColumnsUseNames": true,
2122                     "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2123                 };
2124                 var table = KohaTable( table_name, dt_parameters, table_settings[index], 'with_filters' );
2125
2126                 [% IF bundlesEnabled %]
2127                 // Add event listener for opening and closing bundle details
2128                 $('#' + table_name + ' tbody').on('click', 'button.details-control', function () {
2129                     var button = $(this);
2130                     var tr = button.closest('tr');
2131                     var dTable = button.closest('table').DataTable({ 'retrieve': true });
2132
2133                     var itemnumber = tr.data('itemnumber');
2134                     var duedate = tr.data('duedate');
2135                     var row = dTable.row( tr );
2136
2137                     if ( row.child.isShown() ) {
2138                         // This row is already open - close it
2139                         row.child.hide();
2140                         tr.removeClass('shown');
2141                         button.removeClass('active');
2142                     }
2143                     else {
2144                         // Open this row
2145                         createChild(row, itemnumber, duedate);
2146                         tr.addClass('shown');
2147                         button.addClass('active');
2148                     }
2149                 } );
2150                 [% END %]
2151             });
2152
2153             [% IF Koha.Preference('AcquisitionDetails') %]
2154                 var table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail', 'acquisitiondetails-table', 'json') | $raw %];
2155                 var acquisitiondetails_table = KohaTable("orders", {
2156                     "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
2157                     'bPaginate': false,
2158                     'bAutoWidth': false,
2159                     "aaSorting": [[ 4, "desc" ]],
2160                 }, table_settings);
2161             [% END %]
2162
2163             [% IF suggestions.count %]
2164                 $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {
2165                     "aoColumnDefs": [
2166                         { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
2167                         { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
2168                     ],
2169                     "sPaginationType": "full"
2170                 }));
2171             [% END %]
2172
2173         });
2174
2175         function columnsInit(table) {
2176             activate_filters(table.id, false);
2177         }
2178
2179         [% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %]
2180             $(document).ready(function() {
2181                 var search_index = localStorage.getItem("cat_search_pulldown_selection");
2182                 var search_value = localStorage.getItem("searchbox_value");
2183                 if ( search_index ){ $('#cat-search-block select.advsearch').val(search_index)};
2184                 if ( search_value ){ $('#cat-search-block #search-form').val(search_value)};
2185             });
2186         [% END %]
2187
2188         [% IF Koha.Preference('EnableItemGroups') %]
2189             // Load item groups table
2190             var itemGroupsTable = KohaTable("items-group-table", {
2191                 "bAutoWidth": false,
2192                 'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
2193                 "aoColumns": [
2194                     {
2195                         "mDataProp": function( oObj ) {
2196                             return oObj.display_order;
2197                         },
2198                     },
2199                     {
2200                         "mDataProp": function( oObj ) {
2201                             return oObj.description;
2202                         },
2203                     },
2204                     {
2205                         "mDataProp": function( oObj ) {
2206                             [% IF CAN_user_editcatalogue_manage_item_groups %]
2207                                 return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
2208                                     <i class='fa fa-edit'></i> ${_("Edit")}
2209                                 </button>`
2210                                 + '&nbsp'
2211                                 + `<button class='item-group-delete btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
2212                                     <i class='fa fa-trash'></i> ${('Delete')}
2213                                 </button>`;
2214                             [% ELSE %]
2215                                 return "";
2216                             [% END %]
2217                         },
2218                     },
2219                 ],
2220                 "bPaginate": false,
2221                 "bProcessing": true,
2222                 "bServerSide": false,
2223                 "sAjaxSource": `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1`,
2224                 "sAjaxDataProp": "",
2225                 "fnServerData": function ( sSource, aoData, fnCallback ) {
2226                     $.getJSON( sSource, aoData, function (json) {
2227                         fnCallback(json)
2228                     } );
2229                 },
2230             });
2231
2232             // Create new item groups
2233             $('.item-group-create').on('click', function(){
2234                 $('#modal-item-group-create-form-description').val("");
2235                 $('#modal-item-group-create-submit').removeAttr('disabled');
2236                 $('#modal-item-group-create').modal('show');
2237             });
2238
2239             $("#modal-item-group-create-form").validate({
2240                 submitHandler: function(form) {
2241                     $.ajax({
2242                         url: `/api/v1/biblios/${biblionumber}/item_groups`,
2243                         headers: { "x-koha-embed": "items" },
2244                         success: function(item_groups){
2245                             $('#modal-item-group-create-submit').attr('disabled', 'disabled');
2246
2247                             var settings = {
2248                               "url": `/api/v1/biblios/${biblionumber}/item_groups`,
2249                               "method": "POST",
2250                               "headers": {
2251                                 "Content-Type": "application/json"
2252                               },
2253                               "data": JSON.stringify(
2254                                   {
2255                                       "description": $("#modal-item-group-create-form-description").val(),
2256                                       "display_order": $("#modal-item-group-create-form-display_order").val(),
2257                                   }
2258                               ),
2259                             };
2260
2261                             $.ajax(settings)
2262                             .done(function (response) {
2263                                 $('#item-group-add-form-select').append($('<option>', {
2264                                     value: response.item_group_id,
2265                                     text: response.description
2266                                 }));
2267
2268                                 $('#modal-item-group-create').modal('hide');
2269                                 if ( item_groups.length == 0 ) {
2270                                     // This bib has no previous item groups, reload the page
2271                                     window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2272                                 } else {
2273                                     // Has other item groups, just reload the table
2274                                     itemGroupsTable.api().ajax.reload();
2275                                 }
2276                             })
2277                             .fail(function(err) {
2278                                 var message = err.responseJSON.error;
2279                                 alert(message);
2280                             });
2281                         }
2282                     });
2283                 }
2284             });
2285
2286             $('#modal-item-group-create').on('shown.bs.modal', function () {
2287                 $('#modal-item-group-create-form-description').focus();
2288             })
2289
2290             // Edit existing item groups
2291             $('body').on( 'click', '.item-group-edit', function(){
2292                 const item_group_id = $(this).data('item-group-id');
2293                 const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2294                 $.get( url, function( data ) {
2295                     $('#modal-item-group-edit-form-description').val( data.description );
2296                     $('#modal-item-group-edit-form-display_order').val( data.display_order );
2297                     $('#modal-item-group-edit-submit').data('item-group-id', item_group_id );
2298                     $('#modal-item-group-edit-submit').removeAttr('disabled');
2299                     $('#modal-item-group-edit').modal('show');
2300                 });
2301             });
2302
2303             $("#modal-item-group-edit-form").validate({
2304                 submitHandler: function(form) {
2305                     $('#modal-item-group-edit-submit').attr('disabled', 'disabled');
2306
2307                     const item_group_id = $('#modal-item-group-edit-submit').data('item-group-id');
2308                     const url = `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`;
2309
2310                     var settings = {
2311                       "url": url,
2312                       "method": "PUT",
2313                       "headers": {
2314                         "Content-Type": "application/json"
2315                       },
2316                       "data": JSON.stringify(
2317                           {
2318                               "description": $("#modal-item-group-edit-form-description").val(),
2319                               "display_order": $("#modal-item-group-edit-form-display_order").val(),
2320                           }
2321                       ),
2322                     };
2323
2324                     $.ajax(settings)
2325                     .done(function (response) {
2326                         $('#modal-item-group-edit').modal('hide');
2327                         itemGroupsTable.api().ajax.reload();
2328                     })
2329                     .fail(function(err) {
2330                         var message = err.responseJSON.error;
2331                         alert(message);
2332                     });
2333                 }
2334             });
2335
2336             $('#modal-item-group-edit').on('shown.bs.modal', function () {
2337                 $('#modal-item-group-edit-form-description').focus();
2338             })
2339
2340             // Delete existing item groups
2341             $('body').on( 'click', '.item-group-delete', function(){
2342                 const item_group_id = $(this).data('item-group-id');
2343                 $('#modal-item-group-delete-submit').data('item-group-id', item_group_id );
2344                 $('#modal-item-group-delete-submit').removeAttr('disabled');
2345                 $('#modal-item-group-delete').modal('show');
2346             });
2347             $("#modal-item-group-delete-submit").on('click', function(){
2348                 $('#modal-item-group-delete-submit').attr('disabled', 'disabled');
2349                 const item_group_id = $("#modal-item-group-delete-submit").data('item-group-id');
2350
2351                 $.ajax({
2352                     url: `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2353                     headers: { "x-koha-embed": "items" },
2354                     success: function(item_group_data){
2355                         $.ajax({
2356                           "url": `/api/v1/biblios/${biblionumber}/item_groups/${item_group_id}`,
2357                           "method": "DELETE",
2358                         })
2359                         .done(function (response) {
2360                             $('#modal-item-group-delete').modal('hide');
2361                             $(`#item-group-add-form-select option[value='${item_group_id}']`).remove();
2362                             if ( item_group_data.items === null ) {
2363                                 // No items for this item group, we can just refresh the table
2364                                 itemGroupsTable.api().ajax.reload();
2365                             } else {
2366                                 // This item group had items attached to it, we need to reload the page
2367                                 window.location.replace(`/cgi-bin/koha/catalogue/detail.pl?biblionumber=${biblionumber}`);
2368                             }
2369                         })
2370                         .fail(function(err) {
2371                             var message = err.responseJSON.error;
2372                             alert(message);
2373                         });
2374                     }
2375                 });
2376             });
2377
2378             // Add item(s) to a item group
2379             $('.itemselection_action_item_group_set').on('click', function(){
2380                 $('#modal-item-group-set').modal('show');
2381             });
2382
2383             $("#modal-item-group-set-form").validate({
2384                 submitHandler: function(form) {
2385                     $('#modal-item-group-set-submit').attr('disabled', 'disabled');
2386
2387                     const item_group_id = $('#item-group-add-form-select').val();
2388
2389                     let itemnumbers = new Array();
2390                     $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2391                         const itemnumber = $(this).val();
2392                         itemnumbers.push( itemnumber );
2393                     });
2394                     if (itemnumbers.length > 0) {
2395                         let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_item_group';
2396                         url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2397                         url += '&biblionumber=[% biblionumber | uri %]';
2398                         url += `&item_group_id=${item_group_id}`;
2399
2400                         window.location.replace(url);
2401                     }
2402
2403                     $('#modal-item-group-set').modal('hide');
2404                 }
2405             });
2406
2407             // Remove item(s) from an item group
2408             $('.itemselection_action_item_group_unset').on('click', function(){
2409                 $('#modal-item-group-unset').modal('show');
2410             });
2411
2412             $("#modal-item-group-unset-submit").on('click', function(){
2413                 $('#modal-item-group-unset-submit').attr('disabled', 'disabled');
2414
2415                 let itemnumbers = new Array();
2416                 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
2417                     const itemnumber = $(this).val();
2418                     itemnumbers.push( itemnumber );
2419                 });
2420                 if (itemnumbers.length > 0) {
2421                     let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_item_group';
2422                     url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
2423                     url += '&biblionumber=[% biblionumber | uri %]';
2424
2425                     window.location.replace(url);
2426                 }
2427
2428                 $('#modal-item-group-unset').modal('hide');
2429
2430             });
2431         [% END %]
2432     </script>
2433 [% END %]
2434 [% INCLUDE 'intranet-bottom.inc' %]