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