Bug 15758: Koha::Libraries - Remove GetBranches
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / catalogue / detail.tt
index 495d7e3..2aea860 100644 (file)
@@ -1,3 +1,21 @@
+[% USE Koha %]
+[% USE KohaDates %]
+[% USE AuthorisedValues %]
+[% USE Branches %]
+
+[% ShowCourseReserves = 0 %]
+[% IF UseCourseReserves %]
+    [% FOREACH item IN itemloop %]
+       [% IF item.course_reserves %]
+           [% FOREACH r IN item.course_reserves %]
+               [% IF r.course.enabled == 'yes' %]
+                   [% ShowCourseReserves = 1 %]
+               [% END %]
+           [% END %]
+        [% END %]
+    [% END %]
+[% END %]
+
 [% INCLUDE 'doc-head-open.inc' %]
 [% INCLUDE 'greybox.inc' %]
 <title>Koha &rsaquo; Catalog &rsaquo;
     Details for [% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]
   [% END %]
 </title>
-[% INCLUDE 'doc-head-close.inc' %]<script type="text/JavaScript" language="JavaScript">
+
+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && ( normalized_isbn || normalized_upc ) ) %]
+    <script type="text/javascript" src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
+[% END %]
+
+[% INCLUDE 'doc-head-close.inc' %]<script type="text/JavaScript">
 //<![CDATA[
 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
 function verify_images() {
-    $("#bookcoverimg img").each(function(i){
-           if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) {
-            w = this.width;
-            h = this.height;
-            if ((w == 1) || (h == 1)) {
-                $("#bookcoverimg").remove();
-                $(".yui-gb").attr("class","yui-g");
-            } else if ((this.complete != null) && (!this.complete)) {
-                $("#bookcoverimg").remove();
-                $(".yui-gb").attr("class","yui-g");
+    $("#bookcoverimg").each(function(i){
+        $(this).find('img').each(function(i){
+           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'))) {
+                w = this.width;
+                h = this.height;
+                if ((w == 1) || (h == 1)) {
+                    $("#amazon-bookcoverimg").remove();
+                    $(".yui-gb").attr("class","yui-g");
+                } else if ((this.complete != null) && (!this.complete)) {
+                    $("#amazon-bookcoverimg").remove();
+                    $(".yui-gb").attr("class","yui-g");
+                }
             }
-        }
         });
+        if( $(this).find('img').length < 1 ) $(this).remove();
+    });
        $("#editions img").each(function(i){
-           if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) {
+           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'))) {
             w = this.width;
             h = this.height;
             if ((w == 1) || (h == 1)) {
-                               this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
+                          this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
             } else if ((this.complete != null) && (!this.complete)) {
-                               this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
+                             this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
             }
         }
         });
 }
-     $(document).ready(function() {
+
+    function removeLocalImage(imagenumber) {
+
+        $.ajax({
+            url: "/cgi-bin/koha/svc/cover_images?action=delete&biblionumber=" + [% biblionumber %] + "&imagenumber=" + imagenumber,
+            success: function(data) {
+                $(data).each( function(i) {
+                    if ( this.deleted == 1 ) {
+                        $('#imagenumber-' + this.imagenumber).remove();
+                    }
+                    if ( $('ul.thumbnails > li').length == 0 ) {
+                        showNoImageMessage();
+                    }
+                });
+            },
+            error: function(data) {
+                alert(_("An error occurred on deleting this image"));
+            }
+        });
+
+    }
+
+    function showNoImageMessage() {
+
+        var no_images_msg = _("No images have been uploaded for this bibliographic record yet.");
+        no_images_msg = '<p>' + no_images_msg + '</p>';
+    [% IF ( CAN_user_tools_upload_local_cover_images ) %]
+        var please_upload = _("Please select the image file to upload. %sUpload%s").format(
+            "<a class='btn btn-mini' href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&amp;filetype=image'><i class='fa fa-upload' aria-hidden='true'></i> ",
+            "</a>");
+        no_images_msg += "<p id='upload_image'>" + please_upload + '</p>';
+    [% END %]
+
+        $('#images').html(no_images_msg);
+    }
+
+    [% IF StaffDetailItemSelection %]
+
+        function itemSelectionBuildDeleteLink(div) {
+            var itemnumbers = new Array();
+            $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
+                itemnumbers.push($(this).val());
+            });
+            if (itemnumbers.length > 0) {
+                  var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1';
+                  url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
+                  url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]';
+                  $('a.itemselection_action_delete').attr('href', url);
+            } else {
+                return false;
+            }
+            return true
+        }
+
+        function itemSelectionBuildModifyLink(div) {
+            var itemnumbers = new Array();
+            $("input[name='itemnumber'][type='checkbox']:checked", div).each(function() {
+                itemnumbers.push($(this).val());
+            });
+            if (itemnumbers.length > 0) {
+                  var url = '/cgi-bin/koha/tools/batchMod.pl?op=show';
+                  url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
+                  url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]';
+                  $('a.itemselection_action_modify').attr('href', url);
+            } else {
+                return false;
+            }
+            return true;
+        }
+
+        function itemSelectionBuildActionLinks(tab) {
+            var div = $("#" + tab);
+          var delete_link_ok = itemSelectionBuildDeleteLink(div);
+          var modify_link_ok = itemSelectionBuildModifyLink(div);
+          if (modify_link_ok || delete_link_ok) {
+            $('.itemselection_actions', div).show();
+          } else {
+            $('.itemselection_actions', div).hide();
+          }
+        }
+
+        $(document).ready(function() {
+
+          $('table.items_table').each(function() {
+            var div = $(this).parent().attr("id");
+            itemSelectionBuildActionLinks(div);
+          });
+
+          $("input[name='itemnumber'][type='checkbox']").change(function() {
+            var div = $(this).parents('table').parent().parent().attr("id");
+            itemSelectionBuildActionLinks(div);
+          });
+
+            $(".SelectAll").on("click",function(e){
+                e.preventDefault();
+                var tab = $(this).data("tab");
+                $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true);
+                itemSelectionBuildActionLinks(tab);
+            });
+
+            $(".ClearAll").on("click",function(e){
+                e.preventDefault();
+                var tab = $(this).data("tab");
+                $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
+                itemSelectionBuildActionLinks(tab);
+            });
+
+        });
+    [% END %]
+
+    $(document).ready(function() {
         $('#bibliodetails').tabs();
         $('#search-form').focus();
-     });
-     [% IF ( AmazonCoverImages ) %]$(window).load(function() {
+        $('.thumbnails > li > a > span.remove').click(function() {
+            var result = confirm(_("Are you sure you want to delete this cover image?"));
+
+            if ( result == true ) {
+                var imagenumber = $(this).parent().parent().attr('id').split('-')[1];
+                removeLocalImage(imagenumber);
+            }
+
+            return false;
+        });
+    [%# inject no images message %]
+    [% IF ( LocalCoverImages && ! localimages.0 ) %]
+        showNoImageMessage();
+    [% END %]
+    [% IF LocalCoverImages %]
+        KOHA.LocalCover.GetCoverFromBibnumber(true);
+    [% END %]
+        $("body").on("click",".previewMARC", function(e){
+            e.preventDefault();
+            var page = $(this).attr("href");
+            $("#marcPreview .modal-body").load(page + " table");
+            $('#marcPreview').modal({show:true});
+        });
+        $("#marcPreview").on("hidden", function(){
+            $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
+        });
+     [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && ( normalized_isbn || normalized_upc ) ) %]
+         novSelect.loadContentForQuery(
+             {
+                 ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]',
+                 ISBN : '[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]',
+                 version : '2.1'
+             },
+             '[% Koha.Preference('NovelistSelectProfile') %]',
+             '[% Koha.Preference('NovelistSelectPassword') %]',
+             function(d){
+                 if ( d.length > 0 ){ //If no content
+                     $(".NovelistSelect").show();
+                 }
+             });
+     [% END %]
+
+    });
+
+     [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() {
         verify_images();
      });[% END %]
 //]]>
 </script>
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
-[% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+[% INCLUDE 'datatables.inc' %]
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
+[% INCLUDE 'browser-strings.inc' %]
+<!--[if lt IE 9]>
+<script type="text/javascript" src="[% interface %]/lib/shims/json2.min.js"></script>
+<![endif]-->
+<script type="text/javascript" src="[% interface %]/js/browser.js"></script>
 <script type="text/javascript">
 //<![CDATA[
+    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
+    browser.show();
+
     function activate_filters(id) {
-        table = $("#" + id + " table");
+        var table = $("#" + id + " table");
         if (table.length == 1) {
             filters_row = table.find('thead tr.filters_row');
+
+                var aoColumns = [];
+                filters_row.find('th').each(function() {
+                    if(this.className === "NoSort"){
+                        aoColumns.push(null);
+                    } else {
+                        aoColumns.push('text');
+                    }
+                });
+
             if (table.find('thead tr.columnFilter').length == 0) {
                 table.dataTable().columnFilter({
                     'sPlaceHolder': 'head:after'
+                    ,   'aoColumns': aoColumns
                 });
                 filters_row.addClass('columnFilter');
             }
@@ -66,7 +262,7 @@ function verify_images() {
         }
 
         $('#' + id + '_activate_filters')
-            .text(_("Deactivate filters"))
+            .html('<i class="fa fa-filter"></i> ' + _("Deactivate filters") )
             .unbind('click')
             .click(function() {
                 deactivate_filters(id);
@@ -84,7 +280,7 @@ function verify_images() {
         filters_row.hide();
 
         $('#' + id + '_activate_filters')
-            .text(_("Activate filters"))
+            .html('<i class="fa fa-filter"></i> ' + _("Activate filters") )
             .unbind('click')
             .click(function() {
                 activate_filters(id);
@@ -96,27 +292,43 @@ function verify_images() {
         var ids = ['holdings', 'otherholdings'];
         for (var i in ids) {
             var id = ids[i];
-            table = $('#' + id + ' table');
+            var table = $('#' + id + ' table');
 
             // Duplicate the table header row for columnFilter
             thead_row = table.find('thead tr');
             clone = thead_row.clone().addClass('filters_row');
+            clone.find("th.NoSort").html('');
             thead_row.before(clone);
 
             // Enable sorting
             table.dataTable($.extend(true, {}, dataTablesDefaults, {
                 'sDom': 't',
                 'bPaginate': false,
-                'bAutoWidth': false
+                'bAutoWidth': false,
+                "aoColumnDefs": [
+                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
+                ]
             }));
 
             // Show a link to activate filtering
             link = $('<a>')
                 .attr('href', '#')
                 .attr('id', id + '_activate_filters');
-            table.before(link);
+            $("." + id + "_table_controls").prepend(link);
             deactivate_filters(id);
         }
+        [% IF Koha.Preference('AcquisitionDetails') %]
+            $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
+                'sDom': 't',
+                'bPaginate': false,
+                'bAutoWidth': false,
+                "aaSorting": [[ 4, "desc" ]],
+                "aoColumnDefs": [
+                    { "aTargets": "title-string", "sType": "title-string" }
+                ]
+            }));
+
+        [% END %]
     });
 //]]>
 </script>
@@ -150,7 +362,7 @@ function verify_images() {
         <span class="Z3988" title="[% ocoins %]"></span>
     [% END %]
 
-    [% IF ( AmazonCoverImages ) %]
+    [% IF ( AmazonCoverImages  || LocalCoverImages ) %]
         [% IF ( XSLTDetailsDisplay ) %]
             <div class="yui-gc">
             <div id="catalogue_detail_biblio" class="yui-u first">
@@ -171,10 +383,10 @@ function verify_images() {
     [% IF ( XSLTDetailsDisplay ) %]
         [% XSLTBloc %]
 
-        [% IF ( GetShelves ) %]
+        [% IF shelves.count %]
             <span class="results_summary"><span class="label">Lists that include this title: </span>
-            [% FOREACH GetShelve IN GetShelves %]
-                <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a>
+            [% FOREACH s IN shelves %]
+                <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber %]">[% s.shelfname %]</a>
                 [% IF ( loop.last ) %][% ELSE %]|[% END %]
             [% END %]
             </span>
@@ -191,18 +403,27 @@ function verify_images() {
                     [% END %]
                     </span>
         [% END %]
-        <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 %]" title="MARC" rel="gb_page_center[600,500]">Show</a></span>
-        [% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %]
+        <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 %]&amp;viewas=html" title="MARC" class="previewMARC">Show</a></span>
 
-        [% IF ( AmazonCoverImages ) %]</div><div class="yui-u" id="bookcoverimg">
-        <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /></a>[% END %]
+        [% IF ( AmazonCoverImages  || LocalCoverImages ) %]
+        </div><div class="yui-u" id="bookcoverimg">
+        [% IF ( LocalCoverImages ) %]
+            <div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>
+        [% END %]
+        [% IF ( AmazonCoverImages ) %]
+            <div id="amazon-bookcoverimg">
+            <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link">
+                <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" />
+        </a></div>
+        [% END %]
+        [% END %]
     [% ELSE %]
 
     <h3>[% title |html %]</h3>
     [% FOREACH subtitl IN subtitle %]
        <h4>[% subtitl.subfield %]</h4>
     [% END %]
-            [% UNLESS ( item_level_itypes ) %]<img src="[% imageurl %]" alt="[% description %]" title="[% description %]">[% END %]
+            [% UNLESS ( item_level_itypes ) %]<img src="[% imageurl %]" alt="[% translated_description %]" title="[% translated_description %]">[% END %]
             [% IF ( unititle ) %]<p>[% unititle |html %]</p>[% END %]
             [% IF ( author ) %]<p>By <a href="/cgi-bin/koha/catalogue/search.pl?q=au:[% author |url %]">[% author %]</a></p>[% END %]
         <ul>
@@ -245,12 +466,12 @@ function verify_images() {
             [% END %]</ul>
 </li>
     [% END %]
-    
-    [% IF ( OpacUrl ) %]
+
+    [% IF ( OPACBaseURL ) %]
         <li><strong>OPAC view:</strong>
-       <a href="http://[% OpacUrl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" target="_blank">Open in new window</a>
-               </li>
-       [% END %]
+        <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" target="_blank">Open in new window</a>
+        </li>
+    [% END %]
         <li id="catalogue_detail_marc_preview">
             <strong>MARC Preview:</strong>
             <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a>
@@ -258,13 +479,25 @@ function verify_images() {
         </ul>
         </div>
        
-[% IF ( AmazonCoverImages ) %]<div class="yui-u" id="bookcoverimg">
-<a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" /></a></div>[% END %]
+    [% IF ( AmazonCoverImages  || LocalCoverImages ) %]
+        <div class="yui-u" id="bookcoverimg">
+        [% IF ( LocalCoverImages ) %]
+            <div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div>
+        [% END %]
+        [% IF ( AmazonCoverImages ) %]
+            <div id="amazon-bookcoverimg">
+            <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link">
+            <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn %].01.MZZZZZZZ.jpg" alt="" />
+            </a>
+        </div>
+        [% END %]
+        </div>
+    [% END %]
         
         <div class="yui-u" style="margin-top: 1em;">
         <ul>
         [% IF ( MARCISBNS ) %]
-            <li><strong>ISBN:</strong><ul>[% FOREACH MARCISBN IN MARCISBNS %]<li>[% MARCISBN.marcisbn %]</li>[% END %]</ul></li>
+            <li><strong>ISBN:</strong><ul>[% FOREACH MARCISBN IN MARCISBNS %]<li>[% MARCISBN %]</li>[% END %]</ul></li>
         [% ELSE %]
             [% IF ( normalized_isbn ) %]
                 <li><strong>ISBN:</strong> [% normalized_isbn %]</li>
@@ -305,14 +538,14 @@ function verify_images() {
             </li>
         [% END %]
         <!--This grabs all of the lists a bib record appears in -->
-        [% IF ( GetShelves ) %]
-               <li><strong>Lists that include this title: </strong>
-               <ul>
-               [% FOREACH GetShelve IN GetShelves %]
-                       <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a></li>
-               [% END %]
-               </ul>
-               </li>
+        [% IF shelves.count %]
+            <li><strong>Lists that include this title: </strong>
+            <ul>
+            [% FOREACH s IN shelves %]
+                <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber %]">[% s.shelfname %]</a></li>
+            [% END %]
+            </ul>
+            </li>
         [% END %]
         [% IF ( TagsEnabled &&  TagsShowOnDetail &&  TagLoop ) %]
                 <li><strong>Tags:</strong>
@@ -343,56 +576,95 @@ function verify_images() {
     [% ELSE %]
         <li><a href="#holdings">Holdings</a></li>
     [% END %]
-<li><a href="#description">Descriptions</a></li>
+[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %]
 [% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
+[% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %]
 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %]
 [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]<li><a href="#images">Images</a></li>[% END %][% END %]
 [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %]
+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
+    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
+[% END %]
 </ul>
 
+[% items_table_block_iter = 0 %]
 [% BLOCK items_table %]
-    <table>
+    [% items_table_block_iter = items_table_block_iter + 1 %]
+    <div class="[% tab %]_table_controls">
+        [% IF (StaffDetailItemSelection) %]
+            | <a href="#" class="SelectAll" data-tab="[% tab %]"><i class="fa fa-check"></i> Select all</a> |
+            <a href="#" class="ClearAll" data-tab="[% tab %]"><i class="fa fa-remove"></i> Clear all</a>
+            <span class="itemselection_actions">
+              | Actions:
+              [% IF CAN_user_tools_items_batchdel %]
+                <a class="itemselection_action_delete"><i class="fa fa-trash"></i> Delete selected items</a>
+              [% END %]
+              [% IF CAN_user_tools_items_batchmod %]
+                <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a>
+              [% END %]
+            </span>
+        [% END %]
+    </div>
+    <table class="items_table">
         <thead>
             <tr>
+                [% IF (StaffDetailItemSelection) %]<th class="NoSort"></th>[% END %]
                 [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
                 <th>Current location</th>
-                <th>Home Library</th>
+                <th>Home library</th>
                 [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
                 <th>Call number</th>
                 <th>Status</th>
                 <th>Last seen</th>
                 <th>Barcode</th>
-                [% IF ( volinfo ) %]<th>Publication details</th>[% END %]
+                [% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %]
                 [% IF ( itemdata_uri ) %]<th>url</th>[% END %]
-                [% IF ( itemdata_copynumber ) %]<th>Copy no.</th>[% END %]
+                [% IF ( itemdata_copynumber ) %]<th>Copy number</th>[% END %]
+                [% IF ( itemdata_stocknumber ) %]<th>Inventory number</th>[% END %]
                 [% IF materials %]<th>Materials specified</th>[% END %]
                 [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
+                [% IF ( itemdata_nonpublicnotes ) %]<th>Non-public notes</th>[% END %]
                 [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
                 [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
                 [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
+                [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %]
+                [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">&nbsp;</th>[% END %]
             </tr>
         </thead>
         <tbody>
             [% FOREACH item IN items %]
                 <tr>
+                [% IF (StaffDetailItemSelection) %]
+                    <td style="text-align:center;vertical-align:middle">
+                        <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" />
+                    </td>
+                [% END %]
                     [% IF ( item_level_itypes ) %]
                         <td class="itype">
                             [% IF !noItemTypeImages && item.imageurl %]
-                                <img src="[% item.imageurl %]" alt="[% item.description %]" title="[% item.description %]" />
+                                <img src="[% item.imageurl %]" alt="[% item.translated_description %]" title="[% item.translated_description %]" />
                             [% END %]
-                            [% item.description %]
+                            [% item.translated_description %]
                         </td>
                     [% END %]
-                    <td class="location">[% UNLESS ( singlebranchmode ) %][% item.branchname %] [% END %]</td>
-                    <td class="homebranch">[% item.homebranch %]<span class="shelvingloc">[% item.location %]</span> </td>
+                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) %] [% END %]</td>
+                    <td class="homebranch">[% Branches.GetName(item.homebranch) %]<span class="shelvingloc">[% item.location %]</span> </td>
                     [% IF ( itemdata_ccode ) %]<td>[% item.ccode %]</td>[% END %]
                     <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber %][% END %]</td>
                     <td class="status">
 
                         [% IF ( item.datedue ) %]
+                          [% IF item.onsite_checkout %]
+                            <span>Currently in local use
+                          [% ELSE %]
                             <span class="datedue">Checked out
+                          [% END %]
                                 [% UNLESS ( item.NOTSAMEBRANCH ) %]
+                                  [% IF item.onsite_checkout %]
+                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
+                                  [% ELSE %]
                                     to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
+                                  [% END %]
                                         [% IF ( item.hidepatronname ) %]
                                             [% item.cardnumber %]
                                         [% ELSE %]
@@ -403,13 +675,13 @@ function verify_images() {
                                 : due [% item.datedue %]
                             </span>
                         [% ELSIF ( item.transfertwhen ) %]
-                            <span class="intransit">In transit from [% itemloo.transfertfrom %] to [% itemloo.transfertto %] since [% itemloo.transfertwhen %]</span>
+                            <span class="intransit">In transit from [% Branches.GetName( item.transfertfrom ) %] to [% Branches.GetName( item.transfertto ) %] since [% item.transfertwhen | $KohaDates %]</span>
                         [% END %]
 
                         [% IF ( item.itemlost ) %]
-                            [% IF ( item.itemlostloop ) %]
-                                [% FOREACH itemlostloo IN item.itemlostloop %]
-                                    [% IF ( itemlostloo.selected ) %]
+                            [% IF itemlostloop %]
+                                [% FOREACH itemlostloo IN itemlostloop %]
+                                    [% IF itemlostloo.authorised_value == item.itemlost %]
                                         <span class="lost">[% itemlostloo.lib %]</span>
                                     [% END %]
                                 [% END %]
@@ -418,14 +690,14 @@ function verify_images() {
                             [% END %]
                         [% END %]
 
-                        [% IF ( item.wthdrawn ) %]
+                        [% IF ( item.withdrawn ) %]
                             <span class="wdn">Withdrawn</span>
                         [% END %]
 
                         [% IF ( item.damaged ) %]
-                            [% IF ( item.itemdamagedloop ) %]
-                                [% FOREACH itemdamagedloo IN item.itemdamagedloop %]
-                                    [% IF ( itemdamagedloo.selected ) %]
+                            [% IF itemdamagedloop %]
+                                [% FOREACH itemdamagedloo IN itemdamagedloop %]
+                                    [% IF itemdamagedloo.authorised_value == item.damaged %]
                                         <span class="dmg">[% itemdamagedloo.lib %]</span>
                                     [% END %]
                                 [% END %]
@@ -434,7 +706,7 @@ function verify_images() {
                             [% END %]
                         [% END %]
 
-                        [% IF ( item.itemnotforloan ) %]
+                        [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
                             Not for loan
                             [% IF ( item.notforloanvalue ) %]
                                 ([% item.notforloanvalue %])
@@ -443,32 +715,21 @@ function verify_images() {
 
                         [% IF ( item.reservedate ) %]
                             [% IF ( item.waitingdate ) %]
-                                Waiting
+                                Waiting at [% Branches.GetName( item.ExpectedAtLibrary ) %] since [% item.waitingdate | $KohaDates %].
                             [% ELSE %]
-                                Item-level hold
+                                Item-level hold (placed [% item.reservedate | $KohaDates %]) for delivery at [% Branches.GetName( item.ExpectedAtLibrary ) %].
                             [% END %]
                             [% IF ( canreservefromotherbranches ) %]
-                                for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.ReservedForBorrowernumber %]">
+                                Hold for: <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.ReservedForBorrowernumber %]">
                                     [% IF ( item.hidepatronname ) %]
                                         [% item.Reservedcardnumber %]
                                     [% ELSE %]
-                                        [% item.ReservedForFirstname %] [% item.ReservedForSurname %]
+                                        [% item.ReservedForFirstname _ " " _ item.ReservedForSurname _ " (" _ item.Reservedcardnumber _ ")" %]
                                     [% END %]
                                 </a>
                             [% END %]
-                            [% IF ( item.waitingdate ) %]
-                                at[% ELSE %]for delivery at
-                            [% END %]
-                            [% item.ExpectedAtLibrary %]
-                            [% IF ( item.waitingdate ) %]
-                                since [% item.waitingdate %]
-                            [% ELSE %]
-                                [% IF ( item.reservedate ) %]
-                                    (placed [% item.reservedate %])
-                                [% END %]
-                            [% END %]
                         [% END %]
-                        [% UNLESS ( item.itemnotforloan or item.onloan or item.itemlost or item.wthdrawn or item.damaged or item.transfertwhen or item.reservedate ) %]
+                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
                             Available
                         [% END %]
 
@@ -477,17 +738,25 @@ function verify_images() {
                         [% END %]
 
                     </td>
-                    <td class="datelastseen">[% item.datelastseen %]</td>
+                    <td class="datelastseen">[% item.datelastseen | $KohaDates %]</td>
                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type %]&amp;itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a></td>
                     [% IF ( volinfo ) %]
                         <td class="enumchron">
                             [% IF ( itemdata_enumchron ) %]
-                                [% IF ( item.enumchron ) %]
-                                    [% item.enumchron %]
-                                    [% IF ( item.serialseq ) %] -- [% END %]
+                                [% IF item.enumchron && item.serialseq %]
+                                    <span class="enum">[% item.enumchron %]</span>
+                                    [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %]
+                                        <span class="sep"> -- </span>
+                                        <span class="serialseq">[% item.serialseq %]</span>
+                                    [% END %]
+                                [% ELSIF item.enumchron %]
+                                    <span class="enum">[% item.enumchron %]</span>
+                                [% ELSIF item.serialseq %]
+                                    <span class="serialseq">[% item.serialseq %]</span>
+                                [% END %]
+                                [% IF ( item.publisheddate ) %]
+                                    <span class="pubdate">([% item.publisheddate | $KohaDates %])</span>
                                 [% END %]
-                                [% item.serialseq %]
-                                [% IF ( item.publisheddate ) %] ([% item.publisheddate %])[% END %]
                             [% END %]
                         </td>
                     [% END %]
@@ -497,12 +766,18 @@ function verify_images() {
                     [% IF ( itemdata_copynumber ) %]
                         <td class="copynumber">[% item.copynumber %]</td>
                     [% END %]
+                    [% IF ( itemdata_stocknumber ) %]
+                        <td class="stocknumber">[% item.stocknumber %]</td>
+                    [% END %]
                     [% IF materials %]
                         <td class="materials"> [% item.materials %] </td>
                     [% END %]
                     [% IF ( itemdata_itemnotes ) %]
                         <td><div class="itemnotes">[% item.itemnotes %]</div></td>
                     [% END %]
+                    [% IF itemdata_nonpublicnotes %]
+                        <td class="nonpublicnote">[% item.itemnotes_nonpublic %]</td>
+                    [% END %]
                     [% IF ( SpineLabelShowPrintOnBibDetails ) %]
                         <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode %]" >Print label</a></td>
                     [% END %]
@@ -520,6 +795,31 @@ function verify_images() {
                         <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber %]&amp;hostitemnumber=[% item.itemnumber %]">Create analytics</a></td>
                     [% END %]
 
+                [% IF ShowCourseReserves %]
+                    <td>
+                        [% IF item.course_reserves %]
+                            [% FOREACH r IN item.course_reserves %]
+                                [% IF r.course.enabled == 'yes' %]
+                                    <p>
+                                      <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id %]">
+                                         [% r.course.course_name %]
+                                         <!--[% IF r.course.course_number %] [% r.course.course_number %] [% END %]-->
+                                         [% IF r.course.section %] [% r.course.section %] [% END %]
+                                         [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) %] [% END %]
+                                      </a>
+                                   </p>
+                               [% END %]
+                           [% END %]
+                       [% END %]
+                    </td>
+                [% END %]
+                [% IF CAN_user_editcatalogue_edit_items %]
+                    <td class="actions">
+                        [% UNLESS item.cannot_be_edited %]
+                            <a class="btn btn-mini" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber %]&itemnumber=[% item.itemnumber %]#edititem"><i class="fa fa-pencil"></i> Edit</a>
+                        [% END %]
+                    </td>
+                [% END %]
                 </tr>
             [% END %]
         </tbody>
@@ -527,9 +827,17 @@ function verify_images() {
 [% END %][%# end of block items_table %]
 
 <div id="holdings">
+
+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
+    <span class="results_summary NovelistSelect" style="display:none;">
+        <span class="label">Novelist Select: </span>
+        <div data-novelist-novelistselect=[% normalized_isbn %]></div>
+    </span>
+[% END %]
+
 [% IF ( count ) %]
     [% IF ( showncount ) %]
-        [% PROCESS items_table items=itemloop %]
+        [% PROCESS items_table tab="holdings" items=itemloop %]
         [% END %]
                 [% IF ( hiddencount ) %]
                    <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items ([% hiddencount %] hidden)</a>
@@ -551,33 +859,50 @@ function verify_images() {
     <div id="noitems">No physical items for this record</div>
     [% END %]
 [% END %]
+
+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
+    <span class="results_summary NovelistSelect" style="display:none;">
+        <span class="label">Novelist Select: </span>
+        <div data-novelist-novelistselect=[% normalized_isbn %]></div>
+    </span>
+[% END %]
     </div>
 
 [% IF (SeparateHoldings) %]
     <div id="otherholdings">
         [% IF (otheritemloop.size) %]
-            [% PROCESS items_table items=otheritemloop %]
+            [% PROCESS items_table tab="otherholdings" items=otheritemloop %]
         [% ELSE %]
             No other items.
         [% END %]
     </div>
 [% END %]
-    
+
+[% IF ( MARCNOTES || notes ) %]
+
 <div id="description">
 <div class="content_set">
 
 [% IF ( MARCNOTES ) %]
     [% FOREACH MARCNOTE IN MARCNOTES %]
-    <p>[% MARCNOTE.marcnote FILTER html_line_break %]</p>
+        <p>
+        [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
+            <a href="[% MARCNOTE.marcnote %]">[% MARCNOTE.marcnote %]</a>
+        [% ELSE %]
+            [% MARCNOTE.marcnote FILTER html_line_break %]
+        [% END %]
+        </p>
     [% END %]
-    [% ELSE %]
+[% ELSE %]
     [% IF ( notes ) %]
-    <p>[% notes %]</p>
+        <p>[% notes %]</p>
     [% END %]
 [% END %]
 </div>
 </div>
 
+[% END %]
+
 [% IF ( subscriptionsnumber ) %]
 <div id="subscriptions">
 <div class="yui-g">
@@ -585,8 +910,9 @@ function verify_images() {
     <h2>This is a serial subscription</h2>
     <p> (There are [% subscriptionsnumber %] subscriptions associated with this title).</p> 
     [% FOREACH subscription IN subscriptions %]
-           [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %]
-           [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %]
+            [% IF subscription.branchcode %]
+                <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode %]</h3>
+            [% END %]
             [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
             [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %] </p>[% END %]
             [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %]
@@ -597,7 +923,8 @@ function verify_images() {
             <table>
                 <tr>
                     <th>Issue #</th>
-                    <th>Date</th>
+                    <th>Date arrived</th>
+                    <th>Date published</th>
                     <th>Status</th>
                     <th>Note</th>
                 </tr>
@@ -605,11 +932,16 @@ function verify_images() {
                 <tr>
                     <td>[% latestserial.serialseq %]</td>
                     <td>[% latestserial.planneddate %]</td>
+                    <td>[% latestserial.publisheddate%]</td>
                     <td>
                       [% IF ( latestserial.status1 ) %]Expected[% END %]
                       [% IF ( latestserial.status2 ) %]Arrived[% END %]
                       [% IF ( latestserial.status3 ) %]Late[% END %]
                       [% IF ( latestserial.status4 ) %]Missing[% END %]
+                      [% IF ( latestserial.status41 ) %]Missing (never received)[% END %]
+                      [% IF ( latestserial.status42 ) %]Missing (sold out)[% END %]
+                      [% IF ( latestserial.status43 ) %]Missing (damaged)[% END %]
+                      [% IF ( latestserial.status44 ) %]Missing (lost)[% END %]
                       [% IF ( latestserial.status5 ) %]Not issued[% END %]
                       [% IF ( latestserial.status6 ) %]Delete[% END %]
                       [% IF ( latestserial.status7 ) %]Claimed[% END %]
@@ -627,10 +959,71 @@ function verify_images() {
 </div>
 [% END %]
 
+[% IF Koha.Preference('AcquisitionDetails') %]
+<div id="acq_details">
+  [% IF orders %]
+    <table id="orders">
+      <thead>
+        <tr>
+          <th>Vendor</th>
+          <th>Basket group</th>
+          <th>Basket</th>
+          <th>Order number</th>
+          <th class="title-string">Creation date</th>
+          <th class="title-string">Receive date</th>
+          <th>Status</th>
+          <th>Quantity</th>
+        </tr>
+      </thead>
+      <tbody>
+      [% FOR order IN orders %]
+          <tr>
+            <td>
+            [% IF (order.id) %]
+                <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.id %]" title="Vendor detail page">[% order.name %]</a>
+            [% END %]
+            </td>
+            <td>
+            [% IF (order.basketgroupid) %]
+                [% IF CAN_user_acquisition_group_manage %]
+                    <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% order.id %]&basketgroupid=[% order.basketgroupid %]">[% order.groupname %] ([% order.basketgroupid %])</a>
+                [% ELSE %]
+                    [% order.groupname %] ([% order.basketgroupid %])
+                [% END %]
+            [% END %]
+            </td>
+            <td>[% IF CAN_user_acquisition_order_manage %]
+                <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketname %] ([% order.basketno %])</a>
+            [% ELSE %]
+                [% order.basketname %] ([% order.basketno %])
+            [% END %]</td>
+            <td>[% order.ordernumber %]</td>
+            <td><span title="[% order.creationdate %]">[% order.creationdate | $KohaDates%]</span></td>
+            <td><span title="[% order.datereceived %]">[% order.datereceived | $KohaDates%]</span></td>
+            <td>
+              [% SWITCH order.orderstatus %]
+                [% CASE 'new' %]New
+                [% CASE 'ordered' %]Ordered
+                [% CASE 'partial' %]Partial
+                [% CASE 'complete' %]Complete
+                [% CASE 'cancelled' %]Cancelled
+              [% END %]
+            </td>
+            <td>[% order.quantity %]</td>
+          </tr>
+      [% END %]
+      </tbody>
+    </table>
+  [% ELSE %]
+    There is no order for this biblio.
+  [% END %]
+</div>
+[% END %]
+
 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
 <div id="editions"><h4>Editions</h4>
 <table>
-[% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="http://images.amazon.com/images/P/[% XISBN.normalized_isbn %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %]
+[% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% XISBN.normalized_isbn %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %]
 [% UNLESS ( item_level_itypes ) %]<td>[% IF ( noItemTypeImages ) %][% XISBN.description %][% ELSE %]<img src="[% XISBN.imageurl %]" alt="[% XISBN.description %]" title="[% XISBN.description %]">[% END %]</td>[% END %]
 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber %]">[% XISBN.title |html %]</a> by [% XISBN.author %] &copy;[% XISBN.copyrightdate %]
   [% IF ( XISBN.publishercode ) %]
@@ -647,34 +1040,46 @@ function verify_images() {
 [% IF ( LocalCoverImages ) %]
 <div id="images">
 [% IF ( localimages.0 ) %]
-<p>Click on an image to view it in the image viewer</p>
+    <p>Click on an image to view it in the image viewer</p>
+    <ul class="thumbnails">
 [% FOREACH image IN localimages %]
-[% IF image %]
-<a class="localimage" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image %]" /></a>
-[% END %]
-[% END %]
-[% ELSE %]
-[% IF ( CAN_user_tools_upload_local_cover_images ) %]
-<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&amp;filetype=image'>upload</a> one.</p>
+    [% IF image %]
+        <li id="imagenumber-[% image %]">
+            <a class="thumbnail" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% image %]">
+                <img alt="remove this image" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image %]" />
+                [% IF CAN_user_tools_upload_local_cover_images %]
+                  <span class="remove" title="remove this image">Delete image</span>
+                [% END %]
+            </a>
+        </li>
+    [% END %]
 [% END %]
+    </ul>
+[%# ELSE - No image passed JavaScript takes care %]
 [% END %]
 </div>
 [% END %]
 
 [% IF ( HTML5MediaEnabled ) %]
 <div id="html5media">
-        <p>
-        <[% HTML5MediaParent %] controls preload=none>
           [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
-            <[% HTML5MediaSet.child  %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] />
+            <p>
+              <[% HTML5MediaParent %] controls preload=none>
+                <[% HTML5MediaSet.child  %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] />
+                [[% HTML5MediaParent %] tag not supported by your browser.]
+              </[% HTML5MediaParent %]>
+            </p>
           [% END %]
-            [[% HTML5MediaParent %] tag not supported by your browser.]
-        </[% HTML5MediaParent %]>
-        </p>
 </div>
 [% END %]
 
 
+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
+    <div id="NovelistSelect" class="novelistSelect">
+        <div data-novelist-novelistselect=[% normalized_isbn %]></div>
+    </div>
+[% END %]
+
 </div><!-- /bibliodetails -->
 
 <div class="yui-g" id="export" style="margin-top: 1em;">
@@ -683,7 +1088,7 @@ function verify_images() {
       <th>Save Record</th>   </tr>
     <tr><td> Select download format:    <select name="format">
         <option value="mods">MODS (XML)</option>
-        <option value="dc">Dublin Core (XML)</option>
+        <option data-toggle="modal" data-target="#exportModal_">Dublin Core</option>
         <option value="marcxml">MARCXML</option>
         <option value="marc8">MARC (non-Unicode/MARC-8)</option>
         <option value="utf8">MARC (Unicode/UTF-8)</option>    </select>
@@ -696,7 +1101,18 @@ function verify_images() {
 </form>
 </div>
 
-
+<div id="marcPreview" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
+    <div class="modal-header">
+        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
+        <h3 id="marcPreviewLabel">MARC preview</h3>
+    </div>
+    <div class="modal-body">
+        <div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div>
+    </div>
+    <div class="modal-footer">
+        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+    </div>
+</div>
 
 </div>
 </div>
@@ -705,4 +1121,5 @@ function verify_images() {
 </div>
 [% END %]
 </div>
+
 [% INCLUDE 'intranet-bottom.inc' %]