Bug 33005: (follow-up) Add spans for translatability
[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>[% IF ( opsearch ) %]Order from external source[% ELSE %]Search results &rsaquo; Acquisitions &rsaquo; Order from external source[% END %] &rsaquo; Koha</title>
7
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% USE Koha %]
10
11 <style>
12 tr.selected {
13     background-color : #FFFFCC;
14 }
15
16 tr.selected td {
17     background-color : transparent !important;
18 }
19
20 #dataPreview {
21     width : 90%;
22     top: 5%;
23 }
24
25 #dataPreview pre {
26     overflow: unset;
27 }
28
29 .modal-body {
30     max-height: 380px;
31 }
32
33 @media (max-width: 767px) {
34     #dataPreview {
35         margin: 0;
36         width : auto;
37     }
38 }
39 </style>
40 </head>
41
42 <body id="acq_z3950_search" class="acq">
43 [% WRAPPER 'header.inc' %]
44     [% INCLUDE 'acquisitions-search.inc' %]
45 [% END %]
46
47 [% WRAPPER 'sub-header.inc' %]
48     [% WRAPPER breadcrumbs %]
49         [% WRAPPER breadcrumb_item %]
50             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
51         [% END %]
52         [% WRAPPER breadcrumb_item %]
53             <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
54         [% END %]
55         [% WRAPPER breadcrumb_item %]
56             <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
57         [% END %]
58         [% IF ( opsearch ) %]
59             [% WRAPPER breadcrumb_item bc_active= 1 %]
60                 <span>Order from external source</span>
61             [% END %]
62         [% ELSE %]
63             [% WRAPPER breadcrumb_item %]
64                 <a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Order from external source</a>
65             [% END %]
66             [% WRAPPER breadcrumb_item bc_active= 1 %]
67                 <span>Search results</span>
68             [% END %]
69         [% END # /IF opsearch %]
70     [% END #/ WRAPPER breadcrumbs %]
71 [% END #/ WRAPPER sub-header.inc %]
72
73 <div class="main container-fluid">
74       [% IF ( opsearch ) %]
75     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
76     <div class="row">
77     <div class="col-sm-6">
78     <h1>Order from external source</h1>
79     <input type="hidden" name="op" id="op" value="do_search" />
80             <fieldset class="rows">
81          <ol>
82              <li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li>
83              <li><label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn | html %]" /></li>
84              <li><label for="searchtitle">Title: </label> <input type="text" id="searchtitle"  name="title" value="[% title | html %]" class="focus" /></li>
85              <li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" /></li>
86              <li><label for="publicationyear">Publication year: </label> <input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear | html %]" /></li>
87             <li>
88                 <label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="[% subject | html %]" />
89             </li>
90             <li>
91                 <label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="[% srchany | html %]" />
92             </li>
93             <li>
94                 <label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="[% lccall | html %]" />
95             </li>
96             <li>
97                 <label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="[% controlnumber | html %]" />
98             </li>
99             <li>
100                 <label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="[% dewey | html %]" />
101             </li>
102             <li>
103                 <label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="[% stdid | html %]" />
104             </li>
105             <li>
106              <li><label for="frameworkcode" >Select MARC framework:</label>
107              <select id="frameworkcode" name="frameworkcode" >
108              <option value="">Default</option>
109                  [% FOREACH framework IN frameworks %]
110                     <option value="[% framework.frameworkcode | html %]" >[% framework.frameworktext | html %]</option>
111                  [% END %]
112               </select>
113               </li>
114               <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
115          </ol>
116     </fieldset>
117     <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
118     <input type="hidden" name="basketno" value="[% basketno | html %]" />
119     <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
120     </div> <!-- /.col-sm-6 -->
121 <div class="col-sm-6">
122 <h2>Search targets</h2>
123     <div id="z3950_search_targets_acq" class="page-section">
124         <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>
125     [% FOREACH serverloo IN serverloop %]
126         <p>
127             [% IF ( serverloo.checked ) %]
128                 <input type="checkbox" name="id" id="z3950_[% serverloo.id | html %]" value="[% serverloo.id | html %]" checked="checked" />
129             [% ELSE %]
130                 <input type="checkbox" name="id" id="z3950_[% serverloo.id | html %]" value="[% serverloo.id | html %]" />
131             [% END %]
132             <label for="z3950_[% serverloo.id | html %]">[% serverloo.servername | html %] [[% serverloo.host | html %]]</label>
133
134         </p>
135     [% END %]
136     </div> <!-- /#z3950_search-targets_acq -->
137   </div> <!-- /.col-sm-6 -->
138 </div> <!-- /.row -->
139
140 <div class="row">
141     <div class="col-md-12">
142     <fieldset class="action"><input type="submit" class="btn btn-primary" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Cancel</a></fieldset>
143     </div>
144 </div>
145 </form>
146
147
148 [% ELSE %]
149     <div class="row">
150     <div class="col-md-12">
151     <h2>Search results</h2>
152
153     <p>You searched for:
154         [% IF ( title ) %]<em>Title: </em><span class=term>[% title | html %]</span> [% END %]
155         [% IF ( author ) %]<em>Author: </em><span class=term>[% author | html %]</span> [% END %]
156         [% IF ( publicationyear ) %]<em>Publication year: </em><span class=term>[% publicationyear | html %]</span> [% END %]
157         [% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn | html %]</span> [% END %]
158         [% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn | html %]</span> [% END %]
159         [% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall | html %]</span> [% END %]
160         [% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject | html %]</span> [% END %]
161         [% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber | html %]</span> [% END %]
162         [% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey | html %]</span> [%END %]
163     </p>
164
165     [% IF ( breeding_loop ) %]
166     <table id="resultst">
167     <thead><tr>
168         <th>Server</th>
169         <th>Title</th>
170         <th>Author</th>
171         <th>Year</th>
172         <th>Edition</th>
173         <th>ISBN</th>
174         <th>LCCN</th>
175         [% IF ( Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' ) %]
176             <th>Additional fields</th>
177         [% END %]
178         <th>Actions</th>
179     </tr></thead>
180     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
181         [% IF ( breeding_loo.breedingid ) %]
182
183         <tr>
184             <td>[% breeding_loo.server | html %]</td>
185             <td>[% breeding_loo.title | html %]</td>
186             <td>[% breeding_loo.author | html %]</td>
187             <td>[% breeding_loo.date | html %]</td>
188             <td>[% breeding_loo.edition | html %]</td>
189             <td>[% breeding_loo.isbn | html %]</td>
190             <td>[% breeding_loo.lccn | html %]</td>
191             [% IF ( Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' ) %]
192             <td>
193                 <dl>
194                   [% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
195                     [% FOREACH string IN breeding_loo.$addnumberfield %]
196                         <dt>[% addnumberfield | html %]:</dt>
197                         <dd>[% string | html %]</dd>
198                     [% END %]
199                   [% END %]
200                </dl>
201             </td>
202             [% END %]
203             <td class="actions">
204                 <div class="btn-group dropup">
205                     <a class="btn btn-default btn-xs z3950actions" href="#">MARC</a><button data-toggle="dropdown" class="btn-xs dropdown-toggle"><span class="caret"></span></button>
206                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="z3950preview[% breeding_loo.breedingid | html %]">
207                         <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData" data-action="show_marc"><i class="fa fa-eye"></i> MARC</a></li>
208                         <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid | uri %]" title="Card" class="previewData" data-action="show_card"><i class="fa fa-eye"></i> Card</a></li>
209                         <li><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="chosen" title="Order" data-action="order"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a></li>
210                     </ul>
211                 </div>
212             </td>
213         </tr>
214         [% END %]
215     [% END %]</tbody>
216 </table>
217
218
219     <div id="dataPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
220         <div class="modal-dialog">
221         <div class="modal-content">
222         <div class="modal-header">
223             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
224             <h3 id="dataPreviewLabel">MARC preview</h3>
225         </div>
226         <div class="modal-body">
227             <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
228         </div>
229         <div class="modal-footer">
230             <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
231         </div>
232         </div>
233         </div>
234     </div>
235
236     <form method="post" action="z3950_search.pl" id="page_form" name="page_form" class="checkboxed">
237         <input type="hidden" name="op" id="op" value="do_search" />
238         <input type="hidden" name="current_page" id="current_page" value="[% current_page | html %]" />
239         <input type="hidden" id="searchtitle"  name="title" value="[% title | html %]" />
240         <input type="hidden" id="isbn" name="isbn" value="[% isbn | html %]" />
241         <input type="hidden" id="lccall" name="lccall" value="[% lccall | html %]" />
242         <input type="hidden" id="author" name="author" value="[% author | html %]" />
243         <input type="hidden" id="publicationyear" name="publicationyear" value="[% publicationyear | html %]" />
244         <input type="hidden" id="subject" name="subject" value="[% subject | html %]" />
245         <input type="hidden" id="dewey" name="dewey" value="[% dewey | html %]" />
246         <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
247         <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
248         <input type="hidden" name="controlnumber" value="[% controlnumber | html %]" />
249         <input type="hidden" name="basketno" value="[% basketno | html %]" />
250         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
251
252         [% FOREACH server IN servers %]
253         <input type="hidden" name="id" id="z3950_[% server.id | html %]" value="[% server.id | html %]" />
254         [% END %]
255
256         [% IF ( show_prevbutton ) %]
257             <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page | html %]" />
258         [% END %]
259         Page [% current_page | html %] / [% total_pages | html %]
260         [% IF ( show_nextbutton ) %]
261             <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page | html %]" />
262         [% END %]
263         <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" class="btn btn-primary" value="Go" />
264     </form>
265
266     [% ELSE %]
267         [% IF ( emptyserverlist ) %]
268             <div class="dialog alert">You didn't select any external target.</div>
269         [% ELSE %]
270             [% IF ( errconn ) %]
271                 <div class="dialog alert">
272                     <ul>
273                     [% FOREACH errcon IN errconn %]
274                         <li>Connection failed to [% errcon.server | html %]</li>
275                     [% END %]
276                     </ul>
277                 </div>
278             [% END %]
279         [% END %]
280         <div class="dialog message">Nothing found. <a href="javascript: history.back()">Try another search</a>.</div>
281     [% END %]
282     </div> <!-- /.col-md-12 -->
283     </div> <!-- /.row -->
284
285 [% END %]
286
287 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending | html %] servers to search</h3>[% END %]
288
289 [% MACRO jsinclude BLOCK %]
290     [% Asset.js("js/acquisitions-menu.js") | $raw %]
291     [% INCLUDE 'datatables.inc' %]
292     [% INCLUDE 'z3950_search.inc' %]
293     [% Asset.js("js/z3950_search.js") | $raw %]
294     <script>
295         $(document).ready(function(){
296             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
297                 "aoColumnDefs": [
298                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
299                     { "aTargets": [ 1 ], "sType": "nsb-nse" },
300                 ],
301                 "aaSorting": [[ 1, "asc" ]],
302                 "bPaginate": false,
303                 "searching": false,
304                 "bInfo":false
305             }));
306             InitLastAction();
307         });
308     </script>
309 [% END %]
310
311 [% INCLUDE 'intranet-bottom.inc' %]