Bug 23227: Remove type attribute from script tags: Reports
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / z3950_search.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% USE Koha %]
8
9 <style>
10 .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;}
11 .linktools a { font-size : 85%; text-decoration:none; padding:.3em;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
12 .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
13 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent !important; } #dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }
14 </style>
15 </head>
16
17 <body id="acq_z3950_search" class="acq">
18 [% INCLUDE 'header.inc' %]
19 [% INCLUDE 'acquisitions-search.inc' %]
20
21 <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 | uri %]">[% name | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a> &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Order from external source</a> &rsaquo; Search results[% END %]</div>
22
23 <div class="main container-fluid">
24       [% IF ( opsearch ) %]
25     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
26     <div class="row">
27     <div class="col-sm-6">
28     <h2>Order from external source</h2>
29     <input type="hidden" name="op" id="op" value="do_search" />
30             <fieldset class="rows">
31          <ol>
32              <li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
33              <li><label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn | html %]" /></li>
34              <li><label for="searchtitle">Title: </label> <input type="text" id="searchtitle"  name="title" value="[% title | html %]" class="focus" /></li>
35              <li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" /></li>
36              <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
37              <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
38              <li><label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
39              <li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
40              <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
41              <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li>
42              <li><label for="frameworkcode" >Select MARC framework:</label>
43              <select id="frameworkcode" name="frameworkcode" >
44              <option value="">Default</option>
45                  [% FOREACH framework IN frameworks %]
46                     <option value="[% framework.frameworkcode | html %]" >[% framework.frameworktext | html %]</option>
47                  [% END %]
48               </select>
49               </li>
50               <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
51          </ol>
52     </fieldset>
53     <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
54     <input type="hidden" name="basketno" value="[% basketno | html %]" />
55     <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
56     </div> <!-- /.col-sm-6 -->
57 <div class="col-sm-6">
58 <h2>Search targets</h2>
59     <div id="z3950_search_targets_acq">
60         <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>
61     [% FOREACH serverloo IN serverloop %]
62         <p>
63             [% IF ( serverloo.checked ) %]
64                 <input type="checkbox" name="id" id="z3950_[% serverloo.id | html %]" value="[% serverloo.id | html %]" checked="checked" />
65             [% ELSE %]
66                 <input type="checkbox" name="id" id="z3950_[% serverloo.id | html %]" value="[% serverloo.id | html %]" />
67             [% END %]
68             <label for="z3950_[% serverloo.id | html %]">[% serverloo.servername | html %] [[% serverloo.host | html %]]</label>
69
70         </p>
71     [% END %]
72     </div> <!-- /#z3950_search-targets_acq -->
73   </div> <!-- /.col-sm-6 -->
74 </div> <!-- /.row -->
75
76 <div class="row">
77     <div class="col-md-12">
78     <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Cancel</a></fieldset>
79     </div>
80 </div>
81 </form>
82
83
84 [% ELSE %]
85     <div class="row">
86     <div class="col-md-12">
87     <h2>Search results</h2>
88
89     <p>You searched for:
90         [% IF ( title ) %]<em>Title: </em><span class=term>[% title | html %]</span> [% END %]
91         [% IF ( author ) %]<em>Author: </em><span class=term>[% author | html %]</span> [% END %]
92         [% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn | html %]</span> [% END %]
93         [% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn | html %]</span> [% END %]
94         [% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall | html %]</span> [% END %]
95         [% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject | html %]</span> [% END %]
96         [% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber | html %]</span> [% END %]
97         [% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey | html %]</span> [%END %]
98     </p>
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>ISBN</th>
107         <th>LCCN</th>
108         [% IF ( Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' ) %]
109             <th>Additional fields</th>
110         [% END %]
111         <th>Preview</th>
112         <th>&nbsp;</th>
113     </tr></thead>
114     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
115         [% IF ( breeding_loo.breedingid ) %]
116
117         <tr>
118             <td>[% breeding_loo.server | html %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid | html %]" class="previewData">Preview card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&amp;breedingid=[% breeding_loo.breedingid | html %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td>
119             <td>[% breeding_loo.title | html %]</td>
120             <td>[% breeding_loo.author | html %]</td>
121             <td>[% breeding_loo.isbn | html %]</td>
122             <td>[% breeding_loo.lccn | html %]</td>
123             [% IF ( Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' ) %]
124             <td>
125                 <dl>
126                   [% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
127                     [% FOREACH string IN breeding_loo.$addnumberfield %]
128                         <dt>[% addnumberfield | html %]:</dt>
129                         <dd>[% string | html %]</dd>
130                     [% END %]
131                   [% END %]
132                </dl>
133             </td>
134             [% END %]
135             <td>
136                 <div class="dropdown">
137                     <a class="btn btn-default btn-xs dropdown-toggle" id="z3950preview[% breeding_loo.breedingid | uri %]" role="button" data-toggle="dropdown" href="#">
138                         Preview <b class="caret"></b>
139                     </a>
140                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="z3950preview[% breeding_loo.breedingid | html %]">
141                         <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData"><i class="fa fa-eye"></i> MARC</a></li>
142                         <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid | uri %]" title="Card" class="previewData"><i class="fa fa-eye"></i> Card</a></li>
143                     </ul>
144                 </div>
145             </td>
146             <td class="actions"><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&amp;breedingid=[% breeding_loo.breedingid | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a></td>
147         </tr>
148         [% END %]
149     [% END %]</tbody>
150 </table>
151
152
153     <div id="dataPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
154         <div class="modal-dialog">
155         <div class="modal-content">
156         <div class="modal-header">
157             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
158             <h3 id="dataPreviewLabel">MARC preview</h3>
159         </div>
160         <div class="modal-body">
161             <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
162         </div>
163         <div class="modal-footer">
164             <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
165         </div>
166         </div>
167         </div>
168     </div>
169
170     <form method="post" action="z3950_search.pl" id="page_form" name="page_form" class="checkboxed">
171         <input type="hidden" name="op" id="op" value="do_search" />
172         <input type="hidden" name="current_page" id="current_page" value="[% current_page | html %]" />
173         <input type="hidden" id="searchtitle"  name="title" value="[% title | html %]" />
174         <input type="hidden" id="isbn" name="isbn" value="[% isbn | html %]" />
175         <input type="hidden" id="lccall" name="lccall" value="[% lccall | html %]" />
176         <input type="hidden" id="author" name="author" value="[% author | html %]" />
177         <input type="hidden" id="subject" name="subject" value="[% subject | html %]" />
178         <input type="hidden" id="dewey" name="dewey" value="[% dewey | html %]" />
179         <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
180         <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
181         <input type="hidden" name="controlnumber" value="[% controlnumber | html %]" />
182         <input type="hidden" name="basketno" value="[% basketno | html %]" />
183         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
184
185         [% FOREACH server IN servers %]
186         <input type="hidden" name="id" id="z3950_[% server.id | html %]" value="[% server.id | html %]" />
187         [% END %]
188
189         [% IF ( show_prevbutton ) %]
190             <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page | html %]" />
191         [% END %]
192         Page [% current_page | html %] / [% total_pages | html %]
193         [% IF ( show_nextbutton ) %]
194             <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page | html %]" />
195         [% END %]
196         <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page | html %]" size="4" type="text" /> <input type="submit" name="changepage_goto" value="Go" />
197     </form>
198
199     [% ELSE %]
200         [% IF ( emptyserverlist ) %]
201             <div class="dialog alert">You didn't select any external target.</div>
202         [% ELSE %]
203             [% IF ( errconn ) %]
204                 <div class="dialog alert">
205                     <ul>
206                     [% FOREACH errcon IN errconn %]
207                         <li>Connection failed to [% errcon.server | html %]</li>
208                     [% END %]
209                     </ul>
210                 </div>
211             [% END %]
212         [% END %]
213         <div class="dialog message">Nothing found. <a href="javascript: history.back()">Try another search</a>.</div>
214     [% END %]
215     </div> <!-- /.col-md-12 -->
216     </div> <!-- /.row -->
217
218 [% END %]
219
220 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending | html %] servers to search</h3>[% END %]
221
222 [% MACRO jsinclude BLOCK %]
223     [% Asset.js("js/acquisitions-menu.js") | $raw %]
224     [% INCLUDE 'datatables.inc' %]
225     [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
226     <script>
227         $(document).ready(function(){
228             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
229                 "aoColumnDefs": [
230                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
231                     { "aTargets": [ 1 ], "sType": "nsb-nse" },
232                 ],
233                 "aaSorting": [[ 1, "asc" ]],
234                 "bPaginate": false
235             }));
236             /* Inline edit/delete links */
237             $("td").click(function(event){
238                 var $tgt = $(event.target);
239                 var row = $(this).parent();
240                 $(".linktools").hide();
241                 $("tr").removeClass("selected");
242                 row.addClass("selected");
243                 if($tgt.is("a")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")){
244                     //Don't show inline links for cells containing links of their own.
245                 } else {
246                     var position = $(this).offset();
247                     var top = position.top+5;
248                     var left = position.left+5;
249                     $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
250                 }
251             });
252         });
253     </script>
254     [% INCLUDE 'z3950_search.inc' %]
255     [% Asset.js("js/z3950_search.js") | $raw %]
256 [% END %]
257
258 [% INCLUDE 'intranet-bottom.inc' %]