Bug 12835 - Acquisitions: Show search terms in z39.50 results
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / z3950_search.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
3 [% INCLUDE 'greybox.inc' %]
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7
8 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11     $(document).ready(function(){
12
13     var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
14         "aoColumnDefs": [
15             { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
16             { "aTargets": [ 1 ], "sType": "nsb-nse" },
17         ],
18         "aaSorting": [[ 1, "asc" ]],
19         "bPaginate": false
20     } ) );
21
22     $("#CheckAll").click(function(){
23         $(".checkboxed").checkCheckboxes();
24         return false;
25     });
26     $("#CheckNone").click(function(){
27         $(".checkboxed").unCheckCheckboxes();
28         return false;
29     });
30
31     $("#closemenu").click(function(e){
32         $(".linktools").hide();
33         $("tr").removeClass("selected");
34     });
35
36         /* Inline edit/delete links */
37         $("td").click(function(event){
38             var $tgt = $(event.target);
39             $(".linktools").hide();
40             $("tr").removeClass("selected");
41             if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){
42                 return true;
43             } else {
44                 var position = $(this).offset();
45                 var top = position.top+5;
46                 var left = position.left+5;
47                 $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
48             }
49             var row = $(this).parent();
50             row.addClass("selected");
51         });
52 });
53
54 [% IF ( total_pages ) %]
55 function validate_goto_page(){
56     var page = $('#goto_page').val();
57     if(isNaN(page)) {
58         alert(_("The page entered is not a number."));
59         return false;
60     }
61     else if(page < 1 || page > [% total_pages %] ) {
62         alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
63         return false;
64     }
65     else {
66         return true;
67     }
68 }
69 [% END %]
70
71 //]]>
72 </script>
73 <style type="text/css">
74 .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;}
75 .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
76 .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
77 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; }
78 </style>
79 </head>
80 <body id="acq_z3950_search" class="acq">
81 [% INCLUDE 'header.inc' %]
82 [% INCLUDE 'acquisitions-search.inc' %]
83
84 <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; [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order from external source</a> &rsaquo; Search results[% END %]</div>
85
86 <div id="doc3" class="yui-t7">
87       <div id="bd">
88           [% IF ( opsearch ) %]
89 <h2>Order from external source</h2>
90     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
91     <input type="hidden" name="op" id="op" value="do_search" />
92         <div class="yui-g">
93     <div class="yui-u first">
94             <fieldset class="rows">
95          <ol><li><label for="searchtitle">Title: </label> <input type="text" id="searchtitle"  name="title" value="[% title |html %]" class="focus" /></li>
96                  <li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn %]" /></li>
97          <li><label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
98          <li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
99 </ol>
100                 </fieldset>
101             </div>
102     <div class="yui-u">
103     <fieldset class="rows">
104         <ol>
105         <li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author %]" /></li>
106          <li><label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn %]" /></li>
107          <li> <label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
108                  <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li></ol></fieldset>
109              <fieldset class="rows" >
110                  <ol>
111                      <li>
112                          <label for="frameworkcode" >Select used MARC framework:</label>
113                          <select id="frameworkcode" name="frameworkcode" >
114                              <option value="">Default</option>
115                          [% FOREACH frameworkcodeloo IN frameworkcodeloop %]
116                              [% IF ( frameworkcodeloo.active ) %]
117                                  <option value="[% frameworkcodeloo.value %]" selected="selected" >[% frameworkcodeloo.frameworktext %]</option>
118                              [% ELSE %]
119                                  <option value="[% frameworkcodeloo.value %]" >[% frameworkcodeloo.frameworktext %]</option>
120                              [% END %]
121                          [% END %]
122                          </select>
123                      </li>
124                  </ol>
125              </fieldset>
126     <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
127     <input type="hidden" name="basketno" value="[% basketno %]" />
128     <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
129             </div>
130 </div>
131 <div class="yui-g">
132 <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>
133
134     [% FOREACH serverloo IN serverloop %]
135         <p>
136             [% IF ( serverloo.checked ) %]
137                 <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" checked="checked" />
138             [% ELSE %]
139                 <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
140             [% END %]
141             <label for="z3950_[% serverloo.id %]">[% serverloo.servername %] [[% serverloo.host %]]</label>
142
143         </p>
144     [% END %]
145     <fieldset class="action"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a></fieldset>
146     </div>
147     </form>
148
149
150 [% ELSE %]
151     <h2>Search results</h2>
152
153     <p>You searched for:
154         [% IF ( title ) %]<em>Title: </em><span class=term>[% title %]</span> [% END %]
155         [% IF ( author ) %]<em>Author: </em><span class=term>[% author %]</span> [% END %]
156         [% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn %]</span> [% END %]
157         [% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn %]</span> [% END %]
158         [% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall %]</span> [% END %]
159         [% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject %]</span> [% END %]
160         [% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber %]</span> [% END %]
161         [% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey %]</span> [%END %]
162     </p>
163
164     [% IF ( breeding_loop ) %]
165     <table id="resultst">
166 <thead>    <tr>
167         <th>Server</th>
168         <th>Title</th>
169         <th>Author</th>
170         <th>ISBN</th>
171         <th>LCCN</th>
172         <th>Preview</th>
173                 <th>&nbsp;</th>
174     </tr></thead>
175     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
176         [% IF ( breeding_loo.breedingid ) %]
177
178         [% IF ( breeding_loo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
179             <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td>
180             <td>[% breeding_loo.title |html %]</td>
181             <td>[% breeding_loo.author %]</td>
182             <td>[% breeding_loo.isbn %]</td>
183             <td>[% breeding_loo.lccn %]</td>
184             <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="Card" rel="gb_page_center[600,500]">Card</a></td>
185                         <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&amp;breedingid=[% breeding_loo.breedingid %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order</a></td>
186
187         </tr>
188         [% END %]
189     [% END %]</tbody>
190 </table>
191
192     <form method="post" action="z3950_search.pl" id="page_form" name="page_form" class="checkboxed">
193         <input type="hidden" name="op" id="op" value="do_search" />
194         <input type="hidden" name="current_page" id="current_page" value="[% current_page %]" />
195         <input type="hidden" id="searchtitle"  name="title" value="[% title |html %]" />
196         <input type="hidden" id="isbn" name="isbn" value="[% isbn %]" />
197         <input type="hidden" id="lccall" name="lccall" value="[% lccall %]" />
198         <input type="hidden" id="author" name="author" value="[% author %]" />
199         <input type="hidden" id="subject" name="subject" value="[% subject %]" />
200         <input type="hidden" id="dewey" name="dewey" value="[% dewey %]" />
201         <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
202         <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
203         <input type="hidden" name="controlnumber" value="[% controlnumber %]" />
204         <input type="hidden" name="basketno" value="[% basketno %]" />
205         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
206
207         [% FOREACH server IN servers %]
208         <input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" />
209         [% END %]
210
211         [% IF ( show_prevbutton ) %]
212             <input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" />
213         [% END %]
214         Page [% current_page %] / [% total_pages %]
215         [% IF ( show_nextbutton ) %]
216             <input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" />
217         [% END %]
218         <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" />
219     </form>
220
221     [% ELSE %]
222         [% IF ( emptyserverlist ) %]
223             <div class="dialog alert">You didn't select any external target.</div>
224         [% ELSE %]
225             [% IF ( errconn ) %]
226                 <div class="dialog alert">
227                     <ul>
228                     [% FOREACH errcon IN errconn %]
229                         <li>Connection failed to [% errcon.server %]</li>
230                     [% END %]
231                     </ul>
232                 </div>
233             [% END %]
234         [% END %]
235         <div class="dialog message">Nothing found. <a href="javascript: history.back()">Try another search</a>.</div>
236     [% END %]
237
238
239 [% END %]
240
241         </div>
242 </div>
243 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
244
245 </body>
246 </html>
247