Bug 3013 - Value builder for 006 and 008 need choices for all format types
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / z3950_search.tmpl
index d8b2dfa..f0b11f8 100644 (file)
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
 <title>Koha &rsaquo; Z39.50 Search Results</title>
+<!-- TMPL_INCLUDE NAME="greybox.inc" -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/javascript">
 //<![CDATA[
-    function Import(GetThisOne,biblionumber) {
-        opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+biblionumber+"&z3950=1&frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&breedingid="+GetThisOne;
-        window.close();
+function Import(GetThisOne,biblionumber) {
+    opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+biblionumber+"&z3950=1&frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&breedingid="+GetThisOne;
+    window.close();
+    return false;
+}
+$.tablesorter.addParser({
+    id: 'articles', 
+    is: function(s) {return false;  }, 
+    format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
+    type: 'text' 
+});
+
+function closemenu(){
+    $(".linktools").hide();
+    $("tr").removeClass("selected");
+}
+$(document).ready(function(){
+    $("#CheckAll").click(function(){
+        $(".checkboxed").checkCheckboxes();
+        return false;
+    });
+    $("#CheckNone").click(function(){
+        $(".checkboxed").unCheckCheckboxes();
         return false;
-    }
+    });
+    $("#resultst").tablesorter({
+        sortList: [[1,0]],
+        headers: { 1: { sorter: 'articles' },7: { sorter: false },8: { sorter: false } },
+        widgets: ['zebra']
+    }); 
+        /* Inline edit/delete links */
+        $("td").click(function(event){
+            var $tgt = $(event.target);
+            $(".linktools").hide();
+            $("tr").removeClass("selected");
+            if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){
+                return true;
+            } else {
+                var position = $(this).offset();
+                var top = position.top+5;
+                var left = position.left+5;
+                $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
+            }
+            var row = $(this).parent();
+            row.addClass("selected");
+        });
+});
+
 //]]>
 </script>
-<style type="text/css">body {margin: 1em; }</style>
+<style type="text/css">
+.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
+.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
+.linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
+tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }
+</style>
+      <!-- TMPL_IF name="opsearch" -->
+   <style type="text/css">
+          #custom-doc { width:53em;*width:51.72em;min-width:689px; margin:auto; text-align:left; }
+   </style>
 </head>
 <body>
 
-    <h2>Search for:</h2>
-    <!-- TMPL_IF NAME="title"--><p><strong>Title:</strong> <!-- TMPL_VAR NAME="title"--></p><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="author"--><p><strong>Author:</strong> <!-- TMPL_VAR NAME="author"--></p><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="isbn"--><p><strong>ISBN:</strong> <!-- TMPL_VAR NAME="isbn"--></p><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="issn"--><p><strong>ISSN:</strong> <!-- TMPL_VAR NAME="issn"--></p><!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="lccn"--><p><strong>LCCN:</strong> <!-- TMPL_VAR NAME="lccn"--></p><!-- /TMPL_IF -->
-    
-<!-- TMPL_IF name="opsearch" -->
-    
-    <form method="post" action="z3950_search.pl" name="f">
-    <fieldset class="rows"> 
-       <legend>Search these servers:</legend>
-       <input type="hidden" name="op" id="op" value="do_search" />
-    <input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
-    <input type="hidden" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
-    <input type="hidden" name="isbn" value="<!-- TMPL_VAR NAME="isbn" -->" />
-    <input type="hidden" name="issn" value="<!-- TMPL_VAR NAME="issn" -->" />
-    <input type="hidden" name="lccn" value="<!-- TMPL_VAR NAME="lccn" -->" />
-    <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+<div id="custom-doc" class="yui-t7">
+<!-- TMPL_ELSE -->
+</head>
+<body style="padding:.5em;">
+<div>
+<!-- /TMPL_IF -->
+      <div id="bd">
+         <!-- TMPL_IF name="opsearch" -->
+<h2>Z39.50 Search Points</h2>
+    <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
+    <input type="hidden" name="op" id="op" value="do_search" />
+       <div class="yui-g">
+    <div class="yui-u first">
+           <fieldset class="rows"> 
+                <ol><li><label for="title">Title: </label> <input type="text" id="title"  name="title" value="<!-- TMPL_VAR NAME="title" -->" /></li>
+                <li><label for="isbn">ISBN/ISSN: </label> <input type="text" id="isbn" name="isbn" value="<!-- TMPL_VAR NAME="isbn" -->" /></li>
+                <li><label for="lccall">LC Call Number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
+                <li><label for="controlnumber">Control No.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
+                <li><label for="srchany">Raw (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li></ol>
+               </fieldset>
+           </div>
+    <div class="yui-u">
+       <fieldset class="rows">          <ol><li><label for="author">Author: </label> <input type="text" id="author" name="author" value="<!-- TMPL_VAR NAME="author" -->" /><!--  <label for="Keyword">Keyword</label> <input type="text" name="keyword" value="" /> --></li>
+                <li> <label for="subject">Subject Heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
+                <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
+                <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li></ol>
+    </fieldset>
     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
-    <ol>
+    <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+           </div>
+</div>
+<div class="yui-g">
+<h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select All</a></span><span class="clearall"><a id="CheckNone" href="#">Clear All</a></span></span></h2>
+
     <!-- TMPL_LOOP name="serverloop" -->
-        <li class="radio">
+        <p> 
             <!-- TMPL_IF name="checked" -->
-                <input type="checkbox" name="id" id="<!-- TMPL_VAR NAME="id" -->id" value="<!-- TMPL_VAR NAME="id" -->" checked="checked" />
+                <input type="checkbox" name="id" id="z3950_<!-- TMPL_VAR NAME="id" -->" value="<!-- TMPL_VAR NAME="id" -->" checked="checked" />
             <!-- TMPL_ELSE -->
-                <input type="checkbox" name="id" id="<!-- TMPL_VAR NAME="id" -->id" value="<!-- TMPL_VAR NAME="id" -->" />
+                <input type="checkbox" name="id" id="z3950_<!-- TMPL_VAR NAME="id" -->" value="<!-- TMPL_VAR NAME="id" -->" />
             <!-- /TMPL_IF -->
-        <label for="<!-- TMPL_VAR NAME="id" -->id"><!-- TMPL_VAR NAME="name" --></label>
-        </li>
-    <!-- /TMPL_LOOP --></ol></fieldset>
-    <fieldset class="action"><input type="submit" class="submit" value="Submit" onclick="cursor :'wait'" /></fieldset>
+            <label for="z3950_<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name" --> [<!-- TMPL_VAR NAME="host" -->]</label>  
+
+        </p>
+    <!-- /TMPL_LOOP -->
+        </div>
+    <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
     </form>
+
+
 <!-- TMPL_ELSE -->
     <h2>Results</h2>
-    <table>
-    <tr>
+    <!-- TMPL_IF name="breeding_loop" -->
+    <table id="resultst">
+<thead>    <tr>
         <th>Server</th>
         <th>Title</th>
         <th>Author</th>
+        <th>Date</th>
+        <th>Edition</th>
         <th>ISBN</th>
         <th>LCCN</th>
-        <th>&nbsp;</th>
-    </tr>
-    <!-- TMPL_IF name="breeding_loop" -->
-    <!-- TMPL_LOOP name="breeding_loop" -->
+        <th colspan="2">Preview</th>
+               <th>&nbsp;</th>
+    </tr></thead>
+    <tbody><!-- TMPL_LOOP name="breeding_loop" -->
         <!-- TMPL_IF NAME="breedingid" -->
-               
-        <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
-            <td><!-- TMPL_VAR name="server" --></td>
-            <td><!-- TMPL_VAR NAME="title" --></td>
+
+           <tr id="row<!-- TMPL_VAR NAME="breedingid" -->">
+               <td><!-- TMPL_VAR name="server" --> <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR NAME="breedingid" -->" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=<!-- TMPL_VAR NAME="breedingid" -->" rel="gb_page_center[600,500]">Preview Card</a> <a href="#" onclick="Import(<!-- TMPL_VAR NAME="breedingid" -->,0); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
+            <td><!-- TMPL_VAR NAME="title" escape="html" --></td>
             <td><!-- TMPL_VAR NAME="author" --></td>
+            <td><!-- TMPL_VAR NAME="date" --></td>
+            <td><!-- TMPL_VAR NAME="edition" --></td>
             <td><!-- TMPL_VAR NAME="isbn" --></td>
             <td><!-- TMPL_VAR NAME="lccn" --></td>
-            <td><a href="javascript:Import(<!-- TMPL_VAR NAME="breedingid" -->,<!-- TMPL_VAR NAME="biblionumber" -->)">Import</a></td> 
+            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">MARC</a></td>
+            <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=<!-- TMPL_VAR NAME="breedingid" -->" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
+            <td><a href="#" onclick="Import(<!-- TMPL_VAR NAME="breedingid" -->,<!-- TMPL_VAR NAME="biblionumber" -->); return false">Import</a></td> 
         </tr>
         <!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
+    <!-- /TMPL_LOOP --></tbody>
+</table>
     <!-- TMPL_ELSE -->
-        <tr><td colspan="6">Nothing found</td></tr>
+        <!-- TMPL_LOOP name="errconn" -->
+            Connection failed to <!-- TMPL_VAR NAME="server" -->
+        <!-- /TMPL_LOOP -->
+       <p>Nothing found. <a href="/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Try another search</a>.</p>
     <!-- /TMPL_IF -->
-</table>
+
+
 <!-- /TMPL_IF -->
 
+       </div>
+</div>
 <!-- TMPL_IF name="numberpending" --><h3 align="center">Still <!-- TMPL_VAR NAME="numberpending" --> servers to search</h3><!-- /TMPL_IF -->
 
 </body>