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