Bug 17182: Allow Keyword to MARC mapping for acquisitions searches
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / neworderbiblio.tt
index 385a9b2..bf2dd47 100644 (file)
@@ -1,13 +1,39 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Acquisitions &rsaquo; Search Existing Records</title>
-[% INCLUDE 'greybox.inc' %]
+<title>Koha &rsaquo; Acquisitions &rsaquo; Search existing records</title>
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 [% INCLUDE 'doc-head-close.inc' %]
+[% INCLUDE 'datatables.inc' %]
+<script type="text/javascript">
+//<![CDATA[
+ $(document).ready(function() {
+    var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
+        'sDom': 't',
+        'bPaginate': false,
+        'bFilter': false,
+        'bInfo': false,
+        'bSort': false,
+    } ) );
+    $(".previewMARC").on("click", function(e){
+        e.preventDefault();
+        var ltitle = $(this).text();
+        var page = $(this).attr("href");
+        $("#marcPreviewLabel").text(ltitle);
+        $("#marcPreview .modal-body").load(page + " table");
+        $('#marcPreview').modal({show:true});
+    });
+    $("#marcPreview").on("hidden", function(){
+        $("#marcPreviewLabel").html("");
+        $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
+    });
+ });
+ //]]>
+</script>
 </head>
-<body>
+<body id="acq_neworderbiblio" class="acq">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?=[% basketno %]">Basket [% basketno %]</a> &rsaquo; Search Existing Records</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; Search existing records</div>
 
 <div id="doc3" class="yui-t2">
    
@@ -15,7 +41,7 @@
        <div id="yui-main">
        <div class="yui-b">
        
-<h1>Search Existing Records</h1>
+<h1>Search existing records</h1>
 
 
 [% IF ( total ) %]
 [% END %]
 
 [% IF ( query_error ) %]
-<br /><br />
-<b>Error:</b>
-<span class="problem">
-    [% query_error %]
-</span>
+    <div class="dialog alert"><p><strong>Error:</strong> [% query_error %]</p></div>
 [% END %]
 
 [% IF ( total ) %]
 <div class="searchresults">
-    <table>
-    <tr>
-       <th>Summary</th>
-       <th>Publisher</th>
-       <th>Copyright</th>
-       <th colspan="2">&nbsp;</th>
-    </tr>
-    [% FOREACH biblio IN resultsloop %]
+    <table id="resultst">
+    <thead>
+      <tr>
+         <th>Summary</th>
+         <th>Publisher</th>
+         <th>Copyright</th>
+         <th>&nbsp;</th>
+         <th>&nbsp;</th>
+      </tr>
+    </thead>
+    <tbody>
+      [% FOREACH biblio IN resultsloop %]
         <tr>
             <td>
-                <p><span class="title">[% biblio.title |html %]</span>
+                <p><span class="title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title | html %]</a></span>
+                [% FOREACH subtitle IN biblio.subtitles %] <span class="subtitle">[% subtitle.subfield %]</span>[% END %]
                 [% IF ( biblio.author ) %]  by <span class="author">[% biblio.author %]</span>,[% END %]</p>
                 <p>[% IF ( biblio.isbn ) %] [% biblio.isbn %][% END %]
                 [% IF ( biblio.pages ) %] - [% biblio.pages %][% END %]
@@ -64,7 +91,7 @@
                 [% biblio.copyrightdate %]
             </td>
         <td>
-        <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">View MARC</a>
+        <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber %]&amp;viewas=html" class="previewMARC">View MARC</a>
         </td>
             <td>
             <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;biblionumber=[% biblio.biblionumber %]" title="Order this one">
             </a>
             </td>
         </tr>
-    [% END %]
+      [% END %]
+    </tbody>
     </table>
+    <div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
+        <div class="modal-dialog">
+        <div class="modal-content">
+        <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/spinner-small.gif" alt="" /> Loading </div>
+        </div>
+        <div class="modal-footer">
+            <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
+        </div>
+        </div>
+        </div>
+    </div>
 </div>
 [% END %]