Merge remote branch 'kc/new/bug_5949' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / z3950_search.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Z39.50 Search Results</title>
3 <!-- TMPL_INCLUDE NAME="greybox.inc" -->
4 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
5 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
6 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
7 <script type="text/javascript">
8 //<![CDATA[
9 function Import(GetThisOne,biblionumber) {
10     opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+biblionumber+"&z3950=1&frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->&breedingid="+GetThisOne;
11     window.close();
12     return false;
13 }
14 $.tablesorter.addParser({
15     id: 'articles', 
16     is: function(s) {return false;  }, 
17     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
18     type: 'text' 
19 });
20
21 function closemenu(){
22     $(".linktools").hide();
23     $("tr").removeClass("selected");
24 }
25
26 $(document).ready(function(){
27     $("#CheckAll").click(function(){
28         $(".checkboxed").checkCheckboxes();
29         return false;
30     });
31     $("#CheckNone").click(function(){
32         $(".checkboxed").unCheckCheckboxes();
33         return false;
34     });
35     $("#resultst").tablesorter({
36         sortList: [[1,0]],
37         headers: { 1: { sorter: 'articles' },7: { sorter: false },8: { sorter: false } },
38         widgets: ['zebra']
39     }); 
40         /* Inline edit/delete links */
41         $("td").click(function(event){
42             var $tgt = $(event.target);
43             $(".linktools").hide();
44             $("tr").removeClass("selected");
45             if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){
46                 return true;
47             } else {
48                 var position = $(this).offset();
49                 var top = position.top+5;
50                 var left = position.left+5;
51                 $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
52             }
53             var row = $(this).parent();
54             row.addClass("selected");
55         });
56     $("form[name='f']").submit(function(){
57         if ($('input[type=checkbox]').filter(':checked').length == 0) {
58             alert(_("Please choose at least one Z39.50 target"));
59             return false;
60         } else
61             return true;
62     });
63 });
64
65 //]]>
66 </script>
67 <style type="text/css">
68 .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;}
69 .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
70 .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
71 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }
72 </style>
73       <!-- TMPL_IF name="opsearch" -->
74    <style type="text/css">
75            #custom-doc { width:53em;*width:51.72em;min-width:689px; margin:auto; text-align:left; }
76    </style>
77 </head>
78 <body>
79
80 <div id="custom-doc" class="yui-t7">
81 <!-- TMPL_ELSE -->
82 </head>
83 <body style="padding:.5em;">
84 <div>
85 <!-- /TMPL_IF -->
86       <div id="bd">
87           <!-- TMPL_IF name="opsearch" -->
88 <h2>Z39.50 Search Points</h2>
89     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
90     <input type="hidden" name="op" id="op" value="do_search" />
91         <div class="yui-g">
92     <div class="yui-u first">
93             <fieldset class="rows"> 
94                  <ol><li><label for="title">Title: </label> <input type="text" id="title"  name="title" value="<!-- TMPL_VAR NAME="title" -->" /></li>
95                  <li><label for="isbn">ISBN/ISSN: </label> <input type="text" id="isbn" name="isbn" value="<!-- TMPL_VAR NAME="isbn" -->" /></li>
96                  <li><label for="lccall">LC Call Number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
97                  <li><label for="controlnumber">Control No.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
98                  <li><label for="srchany">Raw (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li></ol>
99                 </fieldset>
100             </div>
101     <div class="yui-u">
102         <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>
103                  <li> <label for="subject">Subject Heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
104                  <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
105                  <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li></ol>
106     </fieldset>
107     <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
108     <input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
109             </div>
110 </div>
111 <div class="yui-g">
112 <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>
113
114     <!-- TMPL_LOOP name="serverloop" -->
115         <p> 
116             <!-- TMPL_IF name="checked" -->
117                 <input type="checkbox" name="id" id="z3950_<!-- TMPL_VAR NAME="id" -->" value="<!-- TMPL_VAR NAME="id" -->" checked="checked" />
118             <!-- TMPL_ELSE -->
119                 <input type="checkbox" name="id" id="z3950_<!-- TMPL_VAR NAME="id" -->" value="<!-- TMPL_VAR NAME="id" -->" />
120             <!-- /TMPL_IF -->
121             <label for="z3950_<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name" --> [<!-- TMPL_VAR NAME="host" -->]</label>  
122
123         </p>
124     <!-- /TMPL_LOOP -->
125         </div>
126     <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset>
127     </form>
128
129
130 <!-- TMPL_ELSE -->
131     <h2>Results</h2>
132     <!-- TMPL_IF name="breeding_loop" -->
133     <table id="resultst">
134 <thead>    <tr>
135         <th>Server</th>
136         <th>Title</th>
137         <th>Author</th>
138         <th>Date</th>
139         <th>Edition</th>
140         <th>ISBN</th>
141         <th>LCCN</th>
142         <th colspan="2">Preview</th>
143                 <th>&nbsp;</th>
144     </tr></thead>
145     <tbody><!-- TMPL_LOOP name="breeding_loop" -->
146         <!-- TMPL_IF NAME="breedingid" -->
147
148             <tr id="row<!-- TMPL_VAR NAME="breedingid" -->">
149                 <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>
150             <td><!-- TMPL_VAR NAME="title" escape="html" --></td>
151             <td><!-- TMPL_VAR NAME="author" --></td>
152             <td><!-- TMPL_VAR NAME="date" --></td>
153             <td><!-- TMPL_VAR NAME="edition" --></td>
154             <td><!-- TMPL_VAR NAME="isbn" --></td>
155             <td><!-- TMPL_VAR NAME="lccn" --></td>
156             <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>
157             <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>
158             <td><a href="#" onclick="Import(<!-- TMPL_VAR NAME="breedingid" -->,<!-- TMPL_VAR NAME="biblionumber" -->); return false">Import</a></td> 
159         </tr>
160         <!-- /TMPL_IF -->
161     <!-- /TMPL_LOOP --></tbody>
162 </table>
163     <!-- TMPL_ELSE -->
164         <!-- TMPL_IF NAME="emptyserverlist" -->
165             You didn't select any Z39.50 target.
166         <!-- TMPL_ELSE -->
167             <!-- TMPL_LOOP name="errconn" -->
168                 Connection failed to <!-- TMPL_VAR NAME="server" -->
169             <!-- /TMPL_LOOP -->
170         <!-- /TMPL_IF -->
171         <p>Nothing found. <a href="/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Try another search</a>.</p>
172     <!-- /TMPL_IF -->
173
174
175 <!-- /TMPL_IF -->
176
177         </div>
178 </div>
179 <!-- TMPL_IF name="numberpending" --><h3 align="center">Still <!-- TMPL_VAR NAME="numberpending" --> servers to search</h3><!-- /TMPL_IF -->
180
181 </body>
182 </html>
183