Bug 12904: Force browser to load new javascript files after upgrade
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / z3950_auth_search.tt
1 [% SET footerjs = 1 %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Z39.50 search results</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
6 <style type="text/css">
7 .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;}
8 .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
9 .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
10 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; } #marcPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #marcPreview { margin: 0; width : auto; } }
11 </style>
12
13 [% IF ( opsearch ) %]
14     <style type="text/css">
15     #custom-doc { width:53em;*width:51.72em;min-width:689px; margin:auto; text-align:left; }
16     </style>
17     </head>
18     <body id="cat_z3950_auth_search" class="cat">
19     <div id="custom-doc" class="yui-t7">
20 [% ELSE %]
21     </head>
22
23     <body id="cat_z3950_search" class="cat" style="padding:.5em;">
24     <div>
25 [% END %]
26
27     <div id="bd">
28     [% IF ( opsearch ) %]
29         <h2>Z39.50 Authority search points</h2>
30         <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
31         <input type="hidden" name="op" id="op" value="do_search" />
32         <input type="hidden" name="authid" value="[% authid %]" />
33         <div class="yui-g">
34             <div class="yui-u first">
35                 <fieldset class="rows">
36                 <ol>
37                     <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
38                     <li><label for="nameany">Name (any): </label> <input type="text" id="nameany" name="nameany" value="" /></li>
39                     <li><label for="authorany">Author (any): </label> <input type="text" id="authorany" name="authorany" value="" /></li>
40                     <li><label for="authorpersonal">Author (personal): </label> <input type="text" id="authorpersonal" name="authorpersonal" value="[% authorpersonal | html %]" /></li>
41                     <li><label for="authorcorp">Author (corporate): </label> <input type="text" id="authorcorp" name="authorcorp" value="[% authorcorp | html %]" /></li>
42                     <li><label for="authormeetingcon">Author (meeting/conference): </label> <input type="text" id="authormeetingcon" name="authormeetingcon" value="[% authormeetingcon | html %]" /></li>
43                 </ol>
44                 </fieldset>
45             </div>
46             <div class="yui-u">
47                 <fieldset class="rows">
48                 <ol>
49                     <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
50                     <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li>
51                     <li><label for="title">Title (any): </label> <input type="text" id="title"  name="title" value="[% title | html %]" /></li>
52                     <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
53                     <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
54                 </ol>
55                 </fieldset>
56             </div>
57             <div class="yui-g">
58                 <h2>Search targets</h2>
59                 <div id="z3950_search_targets_auth">
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 %]" value="[% serverloo.id %]" checked="checked" />
65                     [% ELSE %]
66                         <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
67                     [% END %]
68                     <label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
69                     </p>
70                 [% END %]
71                 </div>
72             </div>
73         <fieldset class="action"><input type="submit"  class="submit" value="Search"/> <a class="cancel close" href="#">Cancel</a></fieldset>
74         </form>
75 [% ELSE %]
76     <h2>Results for Authority Records</h2>
77     [% IF ( breeding_loop ) %]
78     <table id="resultst">
79 <thead>    <tr>
80         <th>Server</th>
81         <th>Heading</th>
82         <th>Authority Type</th>
83         <th>Actions</th>
84     </tr></thead>
85     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
86         [% IF ( breeding_loo.breedingid ) %]
87         <tr id="row[% breeding_loo.breedingid %]">
88             <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td>
89             <td>[% breeding_loo.heading %]</td>
90             <td>[% breeding_loo.heading_code %]</td>
91             <td class="actions">
92                 <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC btn btn-default btn-xs"><i class="fa fa-eye"></i> Show MARC</a>
93                 <a href="#" class="import_record btn btn-default btn-xs" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]"><i class="fa fa-download"></i> Import</a>
94             </td>
95         </tr>
96         [% END %]
97     [% END %]</tbody>
98 </table>
99
100     <div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
101         <div class="modal-dialog">
102         <div class="modal-content">
103         <div class="modal-header">
104             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
105             <h3 id="marcPreviewLabel">MARC preview</h3>
106         </div>
107         <div class="modal-body">
108             <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
109         </div>
110         </div>
111         </div>
112     </div>
113
114     <form method="post" action="z3950_auth_search.pl" id="page_form" name="page_form" class="checkboxed">
115         <input type="hidden" name="op" id="op" value="do_search" />
116         <input type="hidden" name="current_page" id="current_page" value="[% current_page %]" />
117         <input type="hidden" id="nameany"  name="nameany" value="[% nameany %]" />
118         <input type="hidden" id="authorany"  name="authorany" value="[% authorany %]" />
119         <input type="hidden" id="authorcorp"  name="authorcorp" value="[% authorcorp %]" />
120         <input type="hidden" id="authorpersonal"  name="authorpersonal" value="[% authorpersonal %]" />
121         <input type="hidden" id="authormeetingcon"  name="authormeetingcon" value="[% authormeetingcon %]" />
122         <input type="hidden" id="title"  name="title" value="[% title %]" />
123         <input type="hidden" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle %]" />
124         <input type="hidden" id="subject" name="subject" value="[% subject %]" />
125         <input type="hidden" id="subjectsubdiv" name="subjectsubdiv" value="[% subjectsubdiv %]" />
126         <input type="hidden" id="heading"  name="heading" value="[% heading %]" />
127         <input type="hidden" id="srchany" name="srchany" value="[% srchany %]" />
128         <input type="hidden" name="authid" value="[% authid %]" />
129
130         [% FOREACH server IN servers %]
131         <input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" />
132         [% END %]
133
134         [% IF ( show_prevbutton ) %]
135             <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
136         [% END %]
137         Page [% current_page %] / [% total_pages %]
138         [% IF ( show_nextbutton ) %]
139             <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
140         [% END %]
141         <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" />
142     </form>
143
144 <p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="hidden" name="authid" value="[% authid %]" /><input type="submit" value="Try another search"/></form></p>
145     [% ELSE %]
146         [% IF ( errconn ) %]
147             <div class="dialog alert">
148                 <ul>
149                 [% FOREACH errcon IN errconn %]
150                     [% IF ( errcon.error == '10000' ) %]<li>Connection failed to [% errcon.server %]</li>
151                     [% ELSIF ( errcon.error == '10007' ) %]<li>Connection timeout to [% errcon.server %]</li>[% END %]
152                 [% END %]
153                 </ul>
154             </div>
155          [% END %]
156    <div class="dialog message">Nothing found.</div>
157     <p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="hidden" name="authid" value="[% authid %]" /><input type="submit" value="Try another search"/></form></p>
158     [% END %]
159
160 [% END %]
161 </div>
162 </div>
163
164 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
165
166 [% MACRO jsinclude BLOCK %]
167     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
168     [% INCLUDE 'datatables.inc' %]
169     <script type="text/javascript">
170         $(document).ready(function(){
171
172             $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
173                 "sDom": 't',
174                 "aoColumnDefs": [
175                     { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false },
176                 ],
177                 "aaSorting": [[ 1, "asc" ]],
178                 "bPaginate": false
179             }));
180                 /* Inline edit/delete links */
181                 $("td").click(function(event){
182                     var $tgt = $(event.target);
183                     var row = $(this).parent();
184                     $(".linktools").hide();
185                     $("tr").removeClass("selected");
186                     row.addClass("selected");
187                     if($tgt.is("a")||$tgt.is(":nth-child(4)")||$tgt.is(":nth-child(5)")){
188                         //Don't show inline links for cells containing links of their own.
189                     } else {
190                         var position = $(this).offset();
191                         var top = position.top+5;
192                         var left = position.left+5;
193                         $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
194                     }
195                 });
196
197         });
198     </script>
199     [% INCLUDE 'z3950_search.inc' %]
200     <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search_[% KOHA_VERSION %].js"></script>
201 [% END %]
202
203 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]