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