"Fossies" - the Fresh Open Source Software Archive

Member "koha-19.11.15/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt" (23 Feb 2021, 51877 Bytes) of package /linux/misc/koha-19.11.15.tar.gz:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 [% USE raw %]
    2 [% USE Asset %]
    3 [% USE Koha %]
    4 [% USE KohaDates %]
    5 [% USE AuthorisedValues %]
    6 [% USE Branches %]
    7 [% USE Biblio %]
    8 [% USE ColumnsSettings %]
    9 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
   10 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
   11 
   12 [% IF Koha.Preference('AmazonAssocTag') %]
   13     [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
   14 [% ELSE %]
   15     [% AmazonAssocTag = '' %]
   16 [% END %]
   17 
   18 [% ShowCourseReserves = 0 | html %]
   19 [% IF UseCourseReserves %]
   20     [% FOREACH item IN itemloop %]
   21        [% IF item.course_reserves %]
   22            [% FOREACH r IN item.course_reserves %]
   23                [% IF r.course.enabled == 'yes' %]
   24                    [% ShowCourseReserves = 1 | html %]
   25                [% END %]
   26            [% END %]
   27         [% END %]
   28     [% END %]
   29 [% END %]
   30 
   31 [% SET footerjs = 1 %]
   32 [% INCLUDE 'doc-head-open.inc' %]
   33 <title>Koha &rsaquo; Catalog &rsaquo;
   34   [% IF ( unknownbiblionumber ) %]
   35     Unknown record
   36   [% ELSE %]
   37     Details for [% INCLUDE 'biblio-title-head.inc' %]
   38   [% END %]
   39 </title>
   40 [% INCLUDE 'doc-head-close.inc' %]
   41 </head>
   42 
   43 <body id="catalog_detail" class="catalog">
   44 
   45 [% INCLUDE 'header.inc' %]
   46 [% INCLUDE 'cat-search.inc' %]
   47 
   48 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo;
   49   [% IF ( unknownbiblionumber ) %]
   50     Unknown record
   51   [% ELSE %]
   52     Details for <i>[% INCLUDE 'biblio-title.inc' %]</i>
   53   [% END %]
   54 </div>
   55 
   56 <div class="main container-fluid">
   57     <div class="row">
   58         <div class="col-sm-10 col-sm-push-2">
   59             <main>
   60                 <div class="row">
   61 
   62 [% IF ( unknownbiblionumber ) %]
   63   <div class="dialog message">The record you requested does not exist ([% biblionumber | html %]).</div>
   64 [% ELSE %]
   65 
   66 [% IntranetCoce    = Koha.Preference('IntranetCoce') %]
   67 [% CoceProviders   = Koha.Preference('CoceProviders') %]
   68 [% CoceHost        = Koha.Preference('CoceHost') %]
   69 
   70 [% INCLUDE 'cat-toolbar.inc' %]
   71     [% IF decoding_error %]
   72         <div>
   73             There is an error with this bibliographic record, the view may be degraded.
   74             <br/> Error: [% decoding_error | html %]
   75         </div>
   76     [% END %]
   77     [% IF ( ocoins ) %]
   78         <!-- COinS / OpenURL -->
   79         <span class="Z3988" title="[% ocoins | html %]"></span>
   80     [% END %]
   81 
   82     [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
   83         [% IF ( XSLTDetailsDisplay ) %]
   84             <div id="catalogue_detail_biblio" class="col-xs-9">
   85         [% ELSE %]
   86             <div id="catalogue_detail_biblio" class="col-xs-9">
   87         [% END %]
   88     [% ELSE %]
   89         <div id="catalogue_detail_biblio" class="col-xs-12">
   90     [% END %]
   91 
   92         [% XSLTBloc | $raw %]
   93 
   94         [% IF shelves.count %]
   95             <span class="results_summary"><span class="label">Lists that include this title: </span>
   96             [% FOREACH s IN shelves %]
   97                 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber | uri %]">[% s.shelfname | html %]</a>
   98                 [% IF ( loop.last ) %][% ELSE %]|[% END %]
   99             [% END %]
  100             </span>
  101         [% END %]
  102         [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
  103                 <span class="results_summary"><span class="label">Tags:</span>
  104                     [% FOREACH TagLoo IN TagLoop %]
  105                         [% IF ( CAN_user_tools_moderate_tags ) %]
  106                         <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term |url %]">[% TagLoo.term | html %]</a>
  107                         [% ELSE %]
  108                         [% TagLoo.term | html %]
  109                         [% END %]
  110                         <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
  111                     [% END %]
  112                     </span>
  113         [% END %]
  114         <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>
  115 
  116         [% IF ( holdcount ) %]
  117             <span class="results_summary">
  118                 <span class="label">Holds:</span>
  119                 <span class="number_box">
  120                     [% IF CAN_user_reserveforothers_place_holds %]
  121                         <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber | uri %]">[% holdcount | html %]</a>
  122                     [% ELSE %]
  123                         <span>[% holdcount | html %]</span>
  124                     [% END %]
  125                 </span>
  126             </span>
  127         [% END %]
  128 
  129         [% IF ( article_requests_count = Biblio.ArticleRequestsActiveCount( biblionumber ) ) %]
  130             <span class="results_summary">
  131                 <span class="label">Article requests:</span>
  132                 <span class="number_box">
  133                     <a href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% biblionumber | uri %]">[% article_requests_count | html %]</a>
  134                 </span>
  135             </span>
  136         [% END %]
  137 
  138         [% IF ( AmazonCoverImages  || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %]
  139         </div><div class="col-xs-3" id="bookcoverimg">
  140         [% IF ( LocalCoverImages ) %]
  141             <div title="[% biblionumber |url %]" class="[% biblionumber | html %]" id="local-thumbnail-preview"></div>
  142         [% END %]
  143         [% IF ( AdlibrisEnabled && normalized_isbn ) %]
  144             <a href="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]"><img src="[% AdlibrisURL | url %]?isbn=[% normalized_isbn | uri %]" class="adlibris-cover-big" alt="Adlibris cover image" /></a>
  145         [% END %]
  146         [% IF ( AmazonCoverImages && normalized_isbn) %]
  147             <div id="amazon-bookcoverimg">
  148             <a href="http://www.amazon[% AmazonTld | uri %]/gp/reader/[% normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link">
  149                 <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | html %].01.MZZZZZZZ.jpg" alt="" />
  150         </a></div>
  151         [% END %]
  152         [% IF ( IntranetCoce && CoceProviders ) %]
  153           [% coce_id = normalized_ean || normalized_isbn %]
  154             <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% biblionumber | url %]">
  155           [% IF ( coce_id ) %]
  156             <span style="block" title="[% biblionumber | url %]" class="[% coce_id | html %]" id="coce-thumbnail-preview"></span>
  157           [% ELSE %]
  158             <span class="no-image">No cover image available</span>
  159           [% END %]
  160             </a>
  161         [% END %]
  162 
  163         [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
  164             <a class="custom_cover_image" href="[% biblio.custom_cover_image_url | url %]"><img alt="Cover image" src="[% biblio.custom_cover_image_url | url %]" /></a>
  165         [% END %]
  166         [% END %]
  167 
  168 </div>
  169 </div>
  170 <div id="bibliodetails" class="toptabs">
  171 
  172 <ul>
  173     [% IF (SeparateHoldings) %]
  174         <li>
  175             <a href="#holdings">[% LoginBranchname | html %] holdings ([% itemloop.size() || 0 | html %])</a>
  176         </li>
  177         <li>
  178             <a href="#otherholdings">Other holdings ([% otheritemloop.size() || 0 | html %])</a>
  179         </li>
  180     [% ELSE %]
  181         <li>
  182             <a href="#holdings">Holdings ([% itemloop.size() || 0 | html %])</a>
  183         </li>
  184     [% END %]
  185 [% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %]
  186 [% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
  187 [% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %]
  188 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %]
  189 [% IF ( LocalCoverImages ) %]
  190     [% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]
  191         <li>
  192             <a href="#images">Images ([% localimages.size() || 0 | html %])</a>
  193         </li>
  194     [% END %]
  195 [% END %]
  196 [% IF HTML5MediaEnabled && HTML5MediaSets.size %]<li id="media_tab"><a href="#html5media">Play media</a></li>[% END %]
  197 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
  198     <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
  199 [% END %]
  200 [% FOREACH tab IN tabs %]
  201     <li><a href="#[% tab.id | uri %]">[% tab.title | html %]</a></li>
  202 [% END %]
  203 </ul>
  204 
  205 [% items_table_block_iter = 0 %]
  206 [% BLOCK items_table %]
  207     [% items_table_block_iter = items_table_block_iter + 1 %]
  208     <div class="[% tab | html %]_table_table_controls">
  209         [% IF (StaffDetailItemSelection) %]
  210             | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a> |
  211             <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
  212             <span class="itemselection_actions">
  213               | Actions:
  214               [% IF CAN_user_tools_items_batchdel %]
  215                 <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
  216               [% END %]
  217               [% IF CAN_user_tools_items_batchmod %]
  218                 <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
  219               [% END %]
  220             </span>
  221         [% END %]
  222     </div>
  223     <table class="items_table" id="[% tab | html %]_table">
  224         <thead>
  225             <tr>
  226                 [% IF (StaffDetailItemSelection) %]<th class="NoSort"></th>[% END %]
  227                 [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
  228                 <th>Current location</th>
  229                 <th>Home library</th>
  230                 [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
  231                 <th>Call number</th>
  232                 [% IF volinfo %]
  233                     [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%]
  234                         <th class="title-string">Serial enumeration / chronology</th>
  235                     [% ELSE %]
  236                         <th>Serial enumeration / chronology</th>
  237                     [% END %]
  238                 [% END %]
  239                 <th>Status</th>
  240                 <th class="title-string">Last seen</th>
  241                 <th class="title-string">Date accessioned</th>
  242                 <th>Barcode</th>
  243                 [% IF ( itemdata_uri ) %]<th>URL</th>[% END %]
  244                 [% IF ( itemdata_copynumber ) %]<th>Copy number</th>[% END %]
  245                 [% IF ( itemdata_stocknumber ) %]<th>Inventory number</th>[% END %]
  246                 [% IF materials %]<th>Materials specified</th>[% END %]
  247                 [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
  248                 [% IF ( itemdata_nonpublicnotes ) %]<th>Non-public notes</th>[% END %]
  249                 [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
  250                 [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
  251                 [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
  252                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th class="NoSort">Spine label</th>[% END %]
  253                 [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">&nbsp;</th>[% END %]
  254             </tr>
  255         </thead>
  256         <tbody>
  257             [% FOREACH item IN items %]
  258                 <tr>
  259                 [% IF (StaffDetailItemSelection) %]
  260                     <td style="text-align:center;vertical-align:middle">
  261                         <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
  262                     </td>
  263                 [% END %]
  264                     [% IF ( item_level_itypes ) %]
  265                         <td class="itype">
  266                             [% IF !noItemTypeImages && item.imageurl %]
  267                                 <img src="[% item.imageurl | html %]" alt="[% item.translated_description | html %]" title="[% item.translated_description | html %]" />
  268                             [% END %]
  269                             [% item.translated_description | html %]
  270                         </td>
  271                     [% END %]
  272                     <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td>
  273                     <td class="homebranch">
  274                         [% Branches.GetName(item.homebranch) | html %]
  275                         <span class="shelvingloc">[% item.location | html %]</span>
  276                     </td>
  277                     [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
  278                     <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
  279                     [% IF ( volinfo ) %]
  280                         <td class="enumchron">
  281                             [% IF itemdata_publisheddate %]<span title="[% item.publisheddate | html %]">[% END %]
  282                             [% IF ( itemdata_enumchron ) %]
  283                                 [% IF item.enumchron && item.serialseq %]
  284                                     <span class="enum">[% item.enumchron | html %]</span>
  285                                     [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %]
  286                                         <span class="sep"> -- </span>
  287                                         <span class="serialseq">[% item.serialseq | html %]</span>
  288                                     [% END %]
  289                                 [% ELSIF item.enumchron %]
  290                                     <span class="enum">[% item.enumchron | html %]</span>
  291                                 [% ELSIF item.serialseq %]
  292                                     <span class="serialseq">[% item.serialseq | html %]</span>
  293                                 [% END %]
  294                                 [% IF ( item.publisheddate ) %]
  295                                     <span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
  296                                 [% END %]
  297                             [% END %]
  298                             </span>
  299                         </td>
  300                     [% END %]
  301                     <td class="status">
  302 
  303                         [% IF item.CheckedOutFor %]
  304                           [% IF item.onsite_checkout %]
  305                             <span>Currently in local use
  306                           [% ELSE %]
  307                             <span class="datedue">Checked out
  308                           [% END %]
  309                                 [% UNLESS ( item.NOTSAMEBRANCH ) %]
  310                                   [% IF item.onsite_checkout %]
  311                                     by
  312                                   [% ELSE %]
  313                                     to
  314                                   [% END %]
  315                                   [% INCLUDE 'patron-title.inc' patron=item.CheckedOutFor hide_patron_infos_if_needed=1 %]
  316                                 [% END %]
  317                                 : due [% item.datedue | html %]
  318                             </span>
  319                         [% ELSIF ( item.transfertwhen ) %]
  320                             <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) | html %] to [% Branches.GetName( item.transfertto ) | html %] since [% item.transfertwhen | $KohaDates %]</span>
  321                         [% END %]
  322 
  323                         [% IF ( item.itemlost ) %]
  324                             [% IF itemlostloop %]
  325                                 [% FOREACH itemlostloo IN itemlostloop %]
  326                                     [% IF itemlostloo.authorised_value == item.itemlost %]
  327                                         <span class="lost">[% itemlostloo.lib | html %]</span>
  328                                     [% END %]
  329                                 [% END %]
  330                             [% ELSE %]
  331                                 <span class="lost">Unavailable (lost or missing)</span>
  332                             [% END %]
  333                         [% END %]
  334 
  335                         [% IF ( item.withdrawn ) %]
  336                             [% IF itemwithdrawnloop %]
  337                                 [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %]
  338                                     [% IF itemwithdrawnloo.authorised_value == item.withdrawn %]
  339                                         <span class="wdn">[% itemwithdrawnloo.lib | html %]</span>
  340                                     [% END %]
  341                                 [% END %]
  342                             [% ELSE %]
  343                                 <span class="wdn">Withdrawn</span>
  344                             [% END %]
  345                         [% END %]
  346 
  347                         [% IF ( item.damaged ) %]
  348                             [% IF itemdamagedloop %]
  349                                 [% FOREACH itemdamagedloo IN itemdamagedloop %]
  350                                     [% IF itemdamagedloo.authorised_value == item.damaged %]
  351                                         <span class="dmg">[% itemdamagedloo.lib | html %]</span>
  352                                     [% END %]
  353                                 [% END %]
  354                             [% ELSE %]
  355                                 <span class="dmg">Damaged</span>
  356                             [% END %]
  357                         [% END %]
  358 
  359                         [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
  360                             Not for loan
  361                             [% IF ( item.notforloanvalue ) %]
  362                                 ([% item.notforloanvalue | html %])
  363                             [% END %]
  364                         [% END %]
  365 
  366                         [% SET hold = item.first_hold %]
  367                         [% IF hold %]
  368                             [% IF hold.waitingdate %]
  369                                 Waiting at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %].
  370                                 [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %]
  371                                     Hold for:
  372                                     [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %]
  373                                 [% END %]
  374                             [% ELSE %]
  375                                 There is an item level hold on this item (priority = [% hold.priority | html %]).
  376                             [% END %]
  377                         [% END %]
  378                         [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold ) %]
  379                             Available
  380                         [% END %]
  381 
  382                         [% IF ( item.restricted ) %]
  383                             <span class="restricted">([% item.restrictedvalue | html %])</span>
  384                         [% END %]
  385 
  386                     </td>
  387                     <td class="datelastseen"><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
  388                     <td class="dateaccessioned"><span title="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</span></td>
  389                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
  390                     [% IF ( itemdata_uri ) %]
  391                         <td class="uri"><a href="[% item.uri | url %]">[% item.uri | html %]</a></td>
  392                     [% END %]
  393                     [% IF ( itemdata_copynumber ) %]
  394                         <td class="copynumber">[% item.copynumber | html %]</td>
  395                     [% END %]
  396                     [% IF ( itemdata_stocknumber ) %]
  397                         <td class="stocknumber">[% item.stocknumber | html %]</td>
  398                     [% END %]
  399                     [% IF materials %]
  400                         <td class="materials"> [% item.materials | html %] </td>
  401                     [% END %]
  402                     [% IF ( itemdata_itemnotes ) %]
  403                         <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td>
  404                     [% END %]
  405                     [% IF itemdata_nonpublicnotes %]
  406                         <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td>
  407                     [% END %]
  408                     [% IF ( hostrecords ) %]
  409                         <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td>
  410                     [% END %]
  411                     [% IF ( analyze ) %]
  412                         <td>
  413                             [% IF ( item.countanalytics ) %]
  414                                 <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a>
  415                             [% END %]
  416                         </td>
  417                     [% END %]
  418                     [% IF ( analyze ) %]
  419                         <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&amp;hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td>
  420                     [% END %]
  421 
  422                 [% IF ShowCourseReserves %]
  423                     <td>
  424                         [% IF item.course_reserves %]
  425                             [% FOREACH r IN item.course_reserves %]
  426                                 [% IF r.course.enabled == 'yes' %]
  427                                     <p>
  428                                       <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]">
  429                                          [% r.course.course_name | html %]
  430                                          <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
  431                                          [% IF r.course.section %] [% r.course.section | html %] [% END %]
  432                                          [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %]
  433                                       </a>
  434                                    </p>
  435                                [% END %]
  436                            [% END %]
  437                        [% END %]
  438                     </td>
  439                 [% END %]
  440 
  441                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]
  442                     <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>
  443                 [% END %]
  444 
  445                 [% IF CAN_user_editcatalogue_edit_items %]
  446                     <td class="actions">
  447                         [% UNLESS item.cannot_be_edited %]
  448                             <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>
  449                         [% END %]
  450                     </td>
  451                 [% END %]
  452                 </tr>
  453             [% END %]
  454         </tbody>
  455     </table>
  456 [% END %][%# end of block items_table %]
  457 
  458 <div id="holdings">
  459 
  460 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
  461     <span class="results_summary NovelistSelect" style="display:none;">
  462         <span class="label">Novelist Select: </span>
  463         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
  464     </span>
  465 [% END %]
  466 
  467 [% IF ( count ) %]
  468     [% IF ( showncount ) %]
  469         [% PROCESS items_table tab="holdings" items=itemloop %]
  470         [% END %]
  471                 [% IF ( hiddencount ) %]
  472                    <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&amp;showallitems=1">Show all items ([% hiddencount | html %] hidden)</a>
  473                 [% END %] 		
  474 		[% IF ( debug_display ) %]
  475 		<br /><br />
  476 		<table>
  477 			<tr><td>itemdata_enumchron</td><td>[% itemdata_enumchron | html %]</td></tr>
  478 			<tr><td>itemdata_copynumber</td><td>[% itemdata_copynumber | html %]</td></tr>
  479 			<tr><td>serial</td><td>[% serial | html %]</td></tr>
  480 		</table>
  481                 [% END %]
  482 [% ELSE %]
  483     [% IF ( ALTERNATEHOLDINGS ) %]
  484     [% FOREACH ALTERNATEHOLDING IN ALTERNATEHOLDINGS %]
  485         <div id="alternateholdings"><span class="holdings_label">Holdings:</span> [% ALTERNATEHOLDING.holding | html %]</div>
  486     [% END %]
  487     [% ELSE %]
  488     <div id="noitems">No physical items for this record</div>
  489     [% END %]
  490 [% END %]
  491 
  492 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
  493     <span class="results_summary NovelistSelect" style="display:none;">
  494         <span class="label">Novelist Select: </span>
  495         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
  496     </span>
  497 [% END %]
  498     </div>
  499 
  500 [% IF (SeparateHoldings) %]
  501     <div id="otherholdings">
  502         [% IF (otheritemloop.size) %]
  503             [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
  504         [% ELSE %]
  505             No other items.
  506         [% END %]
  507     </div>
  508 [% END %]
  509 
  510 [% IF ( MARCNOTES || notes ) %]
  511 
  512 <div id="description">
  513 <div class="content_set">
  514 
  515 [% IF ( MARCNOTES ) %]
  516     [% FOREACH MARCNOTE IN MARCNOTES %]
  517         <p>
  518         [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
  519             <a href="[% MARCNOTE.marcnote | url %]">[% MARCNOTE.marcnote | html %]</a>
  520         [% ELSE %]
  521             [% MARCNOTE.marcnote | html | html_line_break %]
  522         [% END %]
  523         </p>
  524     [% END %]
  525 [% ELSE %]
  526     [% IF ( notes ) %]
  527         <p>[% notes | html %]</p>
  528     [% END %]
  529 [% END %]
  530 </div>
  531 </div>
  532 
  533 [% END %]
  534 
  535 [% IF ( subscriptionsnumber ) %]
  536 <div id="subscriptions">
  537 <div id="catalogue_detail_subscriptions">
  538     <h2>This is a serial subscription</h2>
  539     <p> (There are [% subscriptionsnumber | html %] subscriptions associated with this title).</p> 
  540     [% FOREACH subscription IN subscriptions %]
  541             [% IF subscription.branchcode %]
  542                 <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]</h3>
  543             [% END %]
  544             [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
  545             [% IF ( subscription.location ) %]<p class="subscription_location">Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location ) | html %]</p>[% END %]
  546             [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber | html %] </p>[% END %]
  547             [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes | html | html_line_break %] </p>[% END %]
  548             [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist | html %] </p>[% END %]
  549             [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote | html %])</p>[% END %]
  550             [% IF ( subscription.latestserials ) %]
  551             <p> The [% subscription.staffdisplaycount | html %] latest issues related to this subscription:</p>
  552             <table>
  553                 <tr>
  554                     <th>Issue #</th>
  555                     <th>Date arrived</th>
  556                     <th>Date published</th>
  557                     <th>Status</th>
  558                     <th>Note</th>
  559                 </tr>
  560             [% FOREACH latestserial IN subscription.latestserials %]
  561                 <tr>
  562                     <td>[% latestserial.serialseq | html %]</td>
  563                     <td><span title="[% latestserial.planneddate | html %]">[% latestserial.planneddate | $KohaDates %]</span></td>
  564                     <td><span title="[% latestserial.publisheddate | html %]">[% latestserial.publisheddate | $KohaDates %]</span></td>
  565                     <td>
  566                       [% IF ( latestserial.status1 ) %]Expected[% END %]
  567                       [% IF ( latestserial.status2 ) %]Arrived[% END %]
  568                       [% IF ( latestserial.status3 ) %]Late[% END %]
  569                       [% IF ( latestserial.status4 ) %]Missing[% END %]
  570                       [% IF ( latestserial.status41 ) %]Missing (never received)[% END %]
  571                       [% IF ( latestserial.status42 ) %]Missing (sold out)[% END %]
  572                       [% IF ( latestserial.status43 ) %]Missing (damaged)[% END %]
  573                       [% IF ( latestserial.status44 ) %]Missing (lost)[% END %]
  574                       [% IF ( latestserial.status5 ) %]Not issued[% END %]
  575                       [% IF ( latestserial.status6 ) %]Delete[% END %]
  576                       [% IF ( latestserial.status7 ) %]Claimed[% END %]
  577                       [% IF ( latestserial.status8 ) %]Stopped[% END %]
  578                     </td>
  579                     <td>[% latestserial.notes | html %]</td>
  580                 </tr>
  581             [% END %]
  582             </table>
  583             [% END %]
  584             <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]">Subscription details</a>
  585     [% END %]
  586 </div>
  587 </div>
  588 [% END %]
  589 
  590 [% IF Koha.Preference('AcquisitionDetails') %]
  591 <div id="acq_details">
  592   [% IF orders.count %]
  593     <table id="orders">
  594       <thead>
  595         <tr>
  596           <th>Vendor</th>
  597           <th>Invoice</th>
  598           <th>Basket group</th>
  599           <th>Basket</th>
  600           <th>Order number</th>
  601           <th class="title-string">Creation date</th>
  602           <th class="title-string">Receive date</th>
  603           <th>Status</th>
  604           <th>Quantity</th>
  605           <th>Internal note</th>
  606           <th>Subscription</th>
  607           <th>Subscription callnumber</th>
  608         </tr>
  609       </thead>
  610       <tbody>
  611       [% FOR order IN orders %]
  612         [% SET basket = order.basket %]
  613         [% SET vendor = basket.bookseller %]
  614           <tr>
  615             <td>
  616                 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]" title="Vendor detail page">[% vendor.name | html %]</a>
  617             </td>
  618             <td>
  619             [% IF order.invoiceid %]
  620                 [% IF CAN_user_acquisition %]
  621                     <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]"
  622                        title="Invoice detail page">
  623                        [% order.invoice.invoicenumber | html %]</a>
  624                 [% ELSE %]
  625                     [% order.invoice.invoicenumber | html %]
  626                 [% END %]
  627             [% END %]
  628             </td>
  629             <td>
  630             [% IF basket.basketgroupid %]
  631                 [% SET basket_group = basket.basket_group %]
  632                 [% IF CAN_user_acquisition_group_manage %]
  633                     <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>
  634                 [% ELSE %]
  635                     [% basket_group.name | html %] ([% basket_group.id | html %])
  636                 [% END %]
  637             [% END %]
  638             </td>
  639             <td>[% IF CAN_user_acquisition_order_manage %]
  640                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %] ([% basket.basketno | html %])</a>
  641             [% ELSE %]
  642                 [% basket.basketname | html %] ([% basket.basketno | html %])
  643             [% END %]</td>
  644             <td>[% order.ordernumber | html %]</td>
  645             <td><span title="[% basket.creationdate | uri %]">[% basket.creationdate | $KohaDates%]</span></td>
  646             <td><span title="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates%]</span></td>
  647             <td>
  648               [% SWITCH order.orderstatus %]
  649                 [% CASE 'new' %]New
  650                 [% CASE 'ordered' %]Ordered
  651                 [% CASE 'partial' %]Partial
  652                 [% CASE 'complete' %]Complete
  653                 [% CASE 'cancelled' %]Cancelled
  654               [% END %]
  655             </td>
  656             <td>[% order.quantity | html %]</td>
  657             <td>[% order.order_internalnote | html %]</td>
  658             <td>
  659                 [% IF order.subscriptionid %]
  660                     <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% order.subscriptionid | uri %]">[% order.subscriptionid | html %]</a>
  661                 [% END %]
  662             </td>
  663             <td>
  664                 [% IF order.subscriptionid %]
  665                     [% order.subscription.callnumber | html %]
  666                 [% END %]
  667             </td>
  668           </tr>
  669       [% END %]
  670       </tbody>
  671     </table>
  672   [% ELSE %]
  673     There is no order for this biblio.
  674   [% END %]
  675 </div>
  676 [% END %]
  677 
  678 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
  679 <div id="editions"><h4>Editions</h4>
  680 <table>
  681 [% 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 %]
  682 [% UNLESS ( item_level_itypes ) %]<td>[% IF ( noItemTypeImages ) %][% XISBN.description | html %][% ELSE %]<img src="[% XISBN.imageurl | html %]" alt="[% XISBN.description | html %]" title="[% XISBN.description | html %]">[% END %]</td>[% END %]
  683 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber | uri %]">[% XISBN.title | html %]</a> by [% XISBN.author | html %] &copy;[% XISBN.copyrightdate | html %]
  684   [% IF ( XISBN.publishercode ) %]
  685 [% 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 %]
  686     [% END %]
  687                 [% IF ( XISBN.pages ) %] [% END %][% XISBN.pages | html %] [% IF ( XISBN.illus ) %][% XISBN.illus | html %][% END %]
  688                 [% IF ( XISBN.size ) %], [% END %][% XISBN.size | html %]
  689 </td>
  690 
  691 [% END %]
  692 </table></div>[% END %]
  693 [% END %]
  694 
  695 [% IF ( LocalCoverImages ) %]
  696     <div id="images">
  697         [% IF ( localimages.0 ) %]
  698             <p>Click on an image to view it in the image viewer</p>
  699             <ul class="thumbnails">
  700                 [% FOREACH image IN localimages %]
  701                     [% IF image %]
  702                         <li id="imagenumber-[% image | html %]" class="thumbnail">
  703                             <a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | uri %]&amp;imagenumber=[% image | uri %]">
  704                                 <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image | uri %]" />
  705                             </a>
  706                             [% IF CAN_user_tools_upload_local_cover_images %]
  707                                 <a href="#" class="remove"><i class="fa fa-trash"></i> Delete image</a>
  708                             [% END %]
  709                         </li>
  710                     [% END %]
  711                 [% END %]
  712             </ul>
  713         [% ELSE # - No image passed JavaScript takes care %]
  714             No images have been uploaded for this bibliographic record yet.
  715         [% END %]
  716         [% IF ( CAN_user_tools_upload_local_cover_images ) %]
  717             <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>
  718             </p>
  719         [% END %]
  720     </div>
  721 [% END %]
  722 
  723 [% IF ( HTML5MediaEnabled ) %]
  724 <div id="html5media">
  725           [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
  726             <p>
  727                 [% IF HTML5MediaSet.is_youtube %]
  728                     <iframe id="player" type="text/html" width="640" height="360"
  729                         src="[% HTML5MediaSet.srcblock | url %]" frameborder="0"></iframe>
  730                 [% ELSE %]
  731                   <[% HTML5MediaParent | html %] controls preload=none>
  732                     <[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | url %]"[% HTML5MediaSet.typeblock | html %] />
  733                     [[% HTML5MediaParent | html %] tag not supported by your browser.]
  734                   </[% HTML5MediaParent | html %]>
  735                 [% END %]
  736             </p>
  737           [% END %]
  738 </div>
  739 [% END %]
  740 
  741 
  742 [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
  743     <div id="NovelistSelect" class="novelistSelect">
  744         <div data-novelist-novelistselect=[% normalized_isbn | html %]></div>
  745     </div>
  746 [% END %]
  747 
  748 [% FOREACH tab IN tabs %]
  749     <div id="[% tab.id | html %]">
  750         [% tab.content | $raw %]
  751     </div>
  752 [% END %]
  753 
  754 </div><!-- /bibliodetails -->
  755 
  756 <div id="export" style="margin-top: 1em;">
  757 <form method="get" action="/cgi-bin/koha/catalogue/export.pl">
  758 <table>  <tr>
  759       <th>Save record</th>   </tr>
  760     <tr><td> Select download format:    <select name="format">
  761         <option value="mods">MODS (XML)</option>
  762         <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
  763         <option value="marcxml">MARCXML</option>
  764         <option value="marc8">MARC (non-Unicode/MARC-8)</option>
  765         <option value="utf8">MARC (Unicode/UTF-8)</option>    </select>
  766         <input type="submit" name="save" value="Download record" /></td>
  767   </tr>
  768   <tr><td>
  769     <input type="hidden" name="op" value="export" /><input type="hidden" name="bib" value="[% biblionumber | html %]" />
  770   </td></tr>
  771 </table>
  772 </form>
  773 </div>
  774 
  775 <div id="marcPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
  776     <div class="modal-dialog modal-lg">
  777     <div class="modal-content">
  778     <div class="modal-header">
  779         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
  780         <h3 id="marcPreviewLabel">MARC preview</h3>
  781     </div>
  782     <div class="modal-body">
  783         <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
  784     </div>
  785     <div class="modal-footer">
  786         <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
  787     </div>
  788     </div>
  789     </div>
  790 </div>
  791 
  792             </main>
  793         </div> <!-- /.col-sm-10.col-sm-push-2 -->
  794 
  795         <div class="col-sm-2 col-sm-pull-10">
  796             <aside>
  797                 [% INCLUDE 'biblio-view-menu.inc' %]
  798             </aside>
  799         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
  800      </div> <!-- /.row -->
  801 
  802 [% END %]
  803 
  804 [% MACRO jsinclude BLOCK %]
  805     [% INCLUDE 'catalog-strings.inc' %]
  806     [% Asset.js("js/catalog.js") | $raw %]
  807     [% INCLUDE 'greybox.inc' %]
  808     [% Asset.js("js/coce.js") | $raw %]
  809     <script>
  810         var interface = "[% interface | html %]";
  811         var theme = "[% theme | html %]";
  812         // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
  813         function verify_images() {
  814             $("#bookcoverimg").each(function(i){
  815                 $(this).find('img').each(function(i){
  816                    if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0) || (this.src.indexOf('images-na.ssl-images-amazon.com'))) {
  817                         w = this.width;
  818                         h = this.height;
  819                         if ((w == 1) || (h == 1)) {
  820                             $("#amazon-bookcoverimg").remove();
  821                         } else if ((this.complete != null) && (!this.complete)) {
  822                             $("#amazon-bookcoverimg").remove();
  823                         }
  824                     }
  825                 });
  826                 if( $(this).find('img').length < 1 ){
  827                     $(this).remove();
  828                     $("#catalogue_detail_biblio").attr("class","col-xs-12");
  829                 }
  830             });
  831             $("#editions img").each(function(i){
  832                 if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0) || (this.src.indexOf('images-na.ssl-images-amazon.com'))) {
  833                     w = this.width;
  834                     h = this.height;
  835                     if ((w == 1) || (h == 1)) {
  836                         this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
  837                     } else if ((this.complete != null) && (!this.complete)) {
  838                         this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
  839                     }
  840                 }
  841             });
  842         }
  843 
  844         function removeLocalImage(imagenumber) {
  845             var thumbnail = $("#imagenumber-" + imagenumber );
  846             var copy = thumbnail.html();
  847             thumbnail.find("img").css("opacity", ".2");
  848             thumbnail.find("a.remove").html("<img style='display:inline-block' src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' />");
  849             $.ajax({
  850                 url: "/cgi-bin/koha/svc/cover_images?action=delete&biblionumber=" + biblionumber + "&imagenumber=" + imagenumber,
  851                 success: function(data) {
  852                     $(data).each( function(i) {
  853                         if ( this.deleted == 1 ) {
  854                             thumbnail.remove();
  855                         } else {
  856                             thumbnail.html( copy );
  857                             alert(_("An error occurred on deleting this image"));
  858                         }
  859                         if ( $('ul.thumbnails > li').length == 0 ) {
  860                             showNoImageMessage();
  861                         }
  862                     });
  863                 },
  864                 error: function(data) {
  865                     thumbnail.html( copy );
  866                     alert(_("An error occurred on deleting this image"));
  867                 }
  868             });
  869         }
  870 
  871         function showNoImageMessage() {
  872             var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
  873             no_images_msg = '<p>' + no_images_msg + '</p>';
  874             [% IF ( CAN_user_tools_upload_local_cover_images ) %]
  875                 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>");
  876                 no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
  877             [% END %]
  878             $('#images').html(no_images_msg);
  879         }
  880 
  881         [% IF StaffDetailItemSelection %]
  882             function itemSelectionBuildDeleteLink(div) {
  883                 var itemnumbers = new Array();
  884                 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
  885                     itemnumbers.push($(this).val());
  886                 });
  887                 if (itemnumbers.length > 0) {
  888                     var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
  889                     url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
  890                     url += '&biblionumber=[% biblionumber | uri %]';
  891                     url += '&src=CATALOGUING';
  892                     $('a.itemselection_action_delete').attr('href', url);
  893                 } else {
  894                     return false;
  895                 }
  896                 return true
  897             }
  898 
  899             function itemSelectionBuildModifyLink(div) {
  900                 var itemnumbers = new Array();
  901                 $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
  902                     itemnumbers.push($(this).val());
  903                 });
  904                 if (itemnumbers.length > 0) {
  905                     var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
  906                     url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
  907                     url += '&biblionumber=[% biblionumber | uri %]';
  908                     url += '&src=CATALOGUING';
  909                     $('a.itemselection_action_modify').attr('href', url);
  910                 } else {
  911                     return false;
  912                 }
  913                 return true;
  914             }
  915 
  916             function itemSelectionBuildActionLinks(tab) {
  917                 var div = $("#" + tab);
  918                 var delete_link_ok = itemSelectionBuildDeleteLink(div);
  919                 var modify_link_ok = itemSelectionBuildModifyLink(div);
  920                 if (modify_link_ok || delete_link_ok) {
  921                     $('.itemselection_actions', div).show();
  922                 } else {
  923                     $('.itemselection_actions', div).hide();
  924                 }
  925             }
  926 
  927             $(document).ready(function() {
  928                 $('table.items_table').each(function() {
  929                     var div = $(this).parent().attr("id");
  930                     itemSelectionBuildActionLinks(div);
  931                 });
  932 
  933                 $("input[name='itemnumber'][type='checkbox']").change(function() {
  934                     var div = $(this).parents('table').parent().parent().attr("id");
  935                     itemSelectionBuildActionLinks(div);
  936                 });
  937 
  938                 $(".SelectAll").on("click",function(e){
  939                     e.preventDefault();
  940                     var tab = $(this).data("tab");
  941                     $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
  942                     itemSelectionBuildActionLinks(tab);
  943                 });
  944 
  945                 $(".ClearAll").on("click",function(e){
  946                     e.preventDefault();
  947                     var tab = $(this).data("tab");
  948                     $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
  949                     itemSelectionBuildActionLinks(tab);
  950                 });
  951             });
  952         [% END %]
  953 
  954         $(document).ready(function() {
  955             $('#bibliodetails').tabs();
  956         [% IF count == 0 and ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) %]
  957             $('#bibliodetails').tabs("option", "active", $('#media_tab').index() );
  958         [% END %]
  959             $('#search-form').focus();
  960             $('.thumbnails > li > .remove').click(function() {
  961                 var result = confirm(_("Are you sure you want to delete this cover image?"));
  962 
  963                 if ( result == true ) {
  964                     var imagenumber = $(this).parent().attr('id').split('-')[1];
  965                     removeLocalImage(imagenumber);
  966                 }
  967 
  968                 return false;
  969             });
  970             [%# inject no images message %]
  971             [% IF LocalCoverImages %]
  972                 KOHA.LocalCover.GetCoverFromBibnumber(true);
  973             [% END %]
  974             [% IF ( IntranetCoce && CoceProviders ) %]
  975                 KOHA.coce.getURL('[% CoceHost | html %]', '[% CoceProviders | html %]');
  976             [% END %]
  977 
  978             $("body").on("click",".previewMARC", function(e){
  979                 e.preventDefault();
  980                 var page = $(this).attr("href");
  981                 $("#marcPreview .modal-body").load(page + " table");
  982                 $('#marcPreview').modal({show:true});
  983             });
  984             $("#marcPreview").on("hidden.bs.modal", function(){
  985                 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
  986             });
  987             [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
  988                 novSelect.loadContentForQuery({
  989                     ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
  990                     ISBN : '[% IF normalized_isbn %][% normalized_isbn | html %][% ELSE %][% normalized_upc | html %][% END %]',
  991                     version : '2.1'
  992                 },
  993                 '[% Koha.Preference('NovelistSelectStaffProfile') | html %]',
  994                 '[% Koha.Preference('NovelistSelectPassword') | html %]',
  995                 function(d){
  996                     if ( d.length > 0 ){ //If no content
  997                         $(".NovelistSelect").show();
  998                     }
  999                  });
 1000              [% END %]
 1001              $(".print-label").on("click", function(e){
 1002                 e.preventDefault();
 1003                 link = $(this).attr("href");
 1004                 openWindow(link,"Print spine label",400,400);
 1005              });
 1006         });
 1007 
 1008         [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() {
 1009             verify_images();
 1010         });[% END %]
 1011     </script>
 1012     [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
 1013         <script src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
 1014     [% END %]
 1015     [% INCLUDE 'datatables.inc' %]
 1016     [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
 1017     [% INCLUDE 'browser-strings.inc' %]
 1018     [% INCLUDE 'columns_settings.inc' %]
 1019     [% Asset.js("js/browser.js") | $raw %]
 1020     [% Asset.js("js/table_filters.js") | $raw %]
 1021     <script>
 1022         var browser;
 1023         browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
 1024         browser.show();
 1025 
 1026         $(document).ready(function() {
 1027             var ids = ['holdings_table', 'otherholdings_table'];
 1028 
 1029             for (var i in ids) {
 1030                 var id = ids[i];
 1031                 var dt_parameters = {
 1032                     'sDom': 't',
 1033                     'bPaginate': false,
 1034                     'bAutoWidth': false,
 1035                     "aoColumnDefs": [
 1036                         { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
 1037                         { "sType": "title-string", "aTargets" : [ "title-string" ] }
 1038                     ]
 1039                 };
 1040                 var table = KohaTable(id, dt_parameters, null, 'with_filters');
 1041             }
 1042 
 1043             [% IF Koha.Preference('AcquisitionDetails') %]
 1044                 var columns_settings = [% ColumnsSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %];
 1045                 var acquisitiondetails_table = KohaTable("orders", {
 1046                     "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
 1047                     'bPaginate': false,
 1048                     'bAutoWidth': false,
 1049                     "aaSorting": [[ 4, "desc" ]],
 1050                     "aoColumnDefs": [
 1051                         { "aTargets": "title-string", "sType": "title-string" }
 1052                     ]
 1053                 }, columns_settings);
 1054             [% END %]
 1055         });
 1056     </script>
 1057 [% END %]
 1058 [% INCLUDE 'intranet-bottom.inc' %]