Bug 19623: (follow-up) Correct footer include in pop-up windows
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / z3950_search.tt
1 [% SET footerjs = 1 %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Z39.50/SRU search results</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6 <style type="text/css">
7 .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;}
8 .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
9 .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
10 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }
11 #dataPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
12 </style>
13       [% IF ( opsearch ) %]
14    <style type="text/css">
15            #custom-doc { width:53em;*width:51.72em;min-width:689px; margin:auto; text-align:left; }
16    </style>
17 </head>
18
19 <body id="cat_z3950_search" class="cat">
20
21 <div id="custom-doc" class="yui-t7">
22 [% ELSE %]
23 </head>
24 <body id="cat_z3950_search" class="cat" style="padding:.5em;">
25 <div>
26 [% END %]
27       <div id="bd">
28           [% IF ( opsearch ) %]
29 <h2>Z39.50/SRU search</h2>
30     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
31     <input type="hidden" name="op" id="op" value="do_search" />
32         <div class="yui-g">
33     <div class="yui-u first">
34             <fieldset class="rows"> 
35         <ol>
36         <li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
37         <li><label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn | html %]" /></li>
38         <li><label for="title">Title: </label> <input type="text" id="title"  name="title" value="[% title |html %]" /></li>
39         <li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" /></li>
40         <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
41         <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
42         <li><label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
43         <li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
44         <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
45         <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li>
46         <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
47         </ol>
48     <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
49     <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
50     </div>
51     <div class="yui-g">
52       <h2>Search targets</h2>
53       <div id="z3950_search_targets">
54         <span class="z3950checks"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span>
55     [% FOREACH serverloo IN serverloop %]
56         <p> 
57             [% IF ( serverloo.checked ) %]
58                 <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" checked="checked" />
59             [% ELSE %]
60                 <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
61             [% END %]
62             <label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
63
64         </p>
65     [% END %]
66       </div>
67     </div>
68     <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
69     </form>
70
71
72 [% ELSE %]
73     <h2>Results</h2>
74     <p>You searched for:
75         [% IF ( title ) %]<em>Title: </em><span class=term>[% title | html %]</span> [% END %]
76         [% IF ( author ) %]<em>Author: </em><span class=term>[% author | html %]</span> [% END %]
77         [% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn | html %]</span> [% END %]
78         [% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn | html %]</span> [% END %]
79         [% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall | html %]</span> [% END %]
80         [% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject | html %]</span> [% END %]
81         [% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber | html %]</span> [% END %]
82         [% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey | html %]</span> [%END %]
83         [% IF ( srchany ) %]<em>Raw (any): </em><span class=term>[% srchany | html %]</span> [% END %]
84         [% IF ( stdid ) %]<em>Standard ID: </em><span class=term>[% stdid | html %]</span> [% END %]
85     </p>
86     [% IF ( errconn ) %]
87             <div class="dialog alert">
88                 <ul>
89                 [% FOREACH errcon IN errconn %]
90                     [% IF ( errcon.error == '10000' ) %]<li>Connection failed to [% errcon.server %]</li>
91                     [% ELSIF ( errcon.error == '10007' ) %]<li>Connection timeout to [% errcon.server %]</li>
92                     [% ELSIF ( errcon.error == 'xslt_err' ) %]<li>[% errcon.server %]: Warning: XSLT error on search result [% errcon.seq %]</li>
93                     [% ELSE %]<li>[% errcon.server %] record [% errcon.seq %]: [% errcon.error %]</li>
94                     [% END %]
95                 [% END %]
96                 </ul>
97             </div>
98     [% END %]
99
100     [% IF ( breeding_loop ) %]
101     <table id="resultst">
102 <thead>    <tr>
103         <th>Server</th>
104         <th>Title</th>
105         <th>Author</th>
106         <th>Date</th>
107         <th>Edition</th>
108         <th>ISBN</th>
109         <th>LCCN</th>
110         <th>MARC</th>
111         <th>Card</th>
112                 <th>&nbsp;</th>
113     </tr></thead>
114     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
115         [% IF ( breeding_loo.breedingid ) %]
116
117             <tr id="row[% breeding_loo.breedingid %]">
118             <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td>
119             <td>[% breeding_loo.title |html %]</td>
120             <td>[% breeding_loo.author %]</td>
121             <td>[% breeding_loo.date %]</td>
122             <td>[% breeding_loo.edition %]</td>
123             <td>[% breeding_loo.isbn %]</td>
124             <td>[% breeding_loo.lccn %]</td>
125             <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td>
126             <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td>
127             <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode | uri %]">Import</a></td>
128         </tr>
129         [% END %]
130     [% END %]</tbody>
131 </table>
132
133 <div id="dataPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
134     <div class="modal-dialog">
135     <div class="modal-content">
136     <div class="modal-header">
137         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
138         <h3 id="dataPreviewLabel">Preview</h3>
139     </div>
140     <div class="modal-body">
141         <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
142     </div>
143     </div>
144     </div>
145 </div>
146
147
148     <form method="post" action="z3950_search.pl" id="page_form" name="page_form" class="checkboxed">
149         <input type="hidden" name="op" id="op" value="do_search" />
150         <input type="hidden" name="current_page" id="current_page" value="[% current_page %]" />
151         <input type="hidden" id="title"  name="title" value="[% title | html %]" />
152         <input type="hidden" id="isbn" name="isbn" value="[% isbn | html %]" />
153         <input type="hidden" id="lccall" name="lccall" value="[% lccall | html %]" />
154         <input type="hidden" id="controlnumber" name="controlnumber" value="[% controlnumber | html %]" />
155         <input type="hidden" id="srchany" name="srchany" value="[% srchany | html %]" />
156         <input type="hidden" id="author" name="author" value="[% author | html %]" />
157         <input type="hidden" id="subject" name="subject" value="[% subject | html %]" />
158         <input type="hidden" id="dewey" name="dewey" value="[% dewey | html %]" />
159         <input type="hidden" id="stdid" name="stdid" value="[% stdid | html %]" />
160         <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
161         <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
162
163         [% FOREACH server IN servers %]
164         <input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" />
165         [% END %]
166
167         [% IF ( show_prevbutton ) %]
168             <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
169         [% END %]
170         Page [% current_page %] / [% total_pages %]
171         [% IF ( show_nextbutton ) %]
172             <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
173         [% END %]
174         <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" />
175     </form>
176
177     [% ELSE %]
178         <div class="dialog message">Nothing found.</div>
179     [% END %]
180 <p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_search.pl"><input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/><input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]"/><input type="submit" value="Try another search"/></form></p>
181
182 [% END %]
183
184         </div>
185 </div>
186 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
187
188 [% MACRO jsinclude BLOCK %]
189     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
190     <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script>
191     [% INCLUDE 'datatables.inc' %]
192     <script type="text/javascript">
193         $(document).ready(function(){
194
195             $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
196                 "sDom": 't',
197                 "aoColumnDefs": [
198                     { "aTargets": [ -1,-2,-3 ], "bSortable": false, "bSearchable": false },
199                     { "aTargets": [ 1 ], "sType": "nsb-nse" },
200                 ],
201                 "aaSorting": [[ 1, "asc" ]],
202                 "bPaginate": false
203             }));
204                 /* Inline edit/delete links */
205                 $("td").click(function(event){
206                     var $tgt = $(event.target);
207                     var row = $(this).parent();
208                     $(".linktools").hide();
209                     $("tr").removeClass("selected");
210                     row.addClass("selected");
211                     if($tgt.is("a")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){
212                         //Don't show inline links for cells containing links of their own.
213                     } else {
214                         var position = $(this).offset();
215                         var top = position.top+5;
216                         var left = position.left+5;
217                         $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
218                     }
219                 });
220
221         });
222     </script>
223     [% INCLUDE 'z3950_search.inc' %]
224 [% END %]
225
226 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]