Bug 19946: (follow-up) Add fixed footer to authorities Z39.50 popup
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / z3950_auth_search.tt
blob0a15b33a67fa34826f5960a061ee8bd47c179c47
1 [% SET footerjs = 1 %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 [% IF ( opsearch ) %]
4     <title>Koha &rsaquo; Z39.50 authority search points</title>
5 [% ELSE %]
6     <title>Koha &rsaquo; Z39.50 authority search results</title>
7     [% END %]
8 [% INCLUDE 'doc-head-close.inc' %]
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
10 <style type="text/css">
11     #marcPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #marcPreview { margin: 0; width : auto; } }
12 </style>
14 <body id="cat_z3950_auth_search" class="cat">
15     <div class="container-fluid">
17     [% IF ( opsearch ) %]
18         <h2>Z39.50 authority search points</h2>
19         <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
20         <input type="hidden" name="op" id="op" value="do_search" />
21         <input type="hidden" name="authid" value="[% authid %]" />
22             <div class="row">
23             <div class="col-xs-6">
24                 <fieldset class="rows">
25                 <ol>
26                     <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
27                     <li><label for="nameany">Name (any): </label> <input type="text" id="nameany" name="nameany" value="" /></li>
28                     <li><label for="authorany">Author (any): </label> <input type="text" id="authorany" name="authorany" value="" /></li>
29                     <li><label for="authorpersonal">Author (personal): </label> <input type="text" id="authorpersonal" name="authorpersonal" value="[% authorpersonal | html %]" /></li>
30                     <li><label for="authorcorp">Author (corporate): </label> <input type="text" id="authorcorp" name="authorcorp" value="[% authorcorp | html %]" /></li>
31                     <li><label for="authormeetingcon">Author (meeting / conference): </label> <input type="text" id="authormeetingcon" name="authormeetingcon" value="[% authormeetingcon | html %]" /></li>
32                 </ol>
33                 </fieldset>
34             </div>
35             <div class="col-xs-6">
36                 <div class="row">
37                     <fieldset class="rows">
38                     <ol>
39                         <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
40                         <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li>
41                         <li><label for="title">Title (any): </label> <input type="text" id="title"  name="title" value="[% title | html %]" /></li>
42                         <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
43                         <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
44                     </ol>
45                     </fieldset>
46                 </div>
48                 <div class="row">
49                     <h2>Search targets</h2>
50                     <div id="z3950_search_targets_auth">
51                         <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>
52                     [% FOREACH serverloo IN serverloop %]
53                         <p>
54                         [% IF ( serverloo.checked ) %]
55                             <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" checked="checked" />
56                         [% ELSE %]
57                             <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
58                         [% END %]
59                         <label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
60                         </p>
61                     [% END %]
62                     </div>
63                 </div>
64             </div>
65             </div>
66             <nav class="navbar navbar-default navbar-fixed-bottom">
67                 <div class="container-fluid">
68                      <fieldset class="action"><input type="submit"  class="submit" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
69                 </div>
70             </nav>
71         </form>
72 [% ELSE %]
73     <h2>Results for authority records</h2>
74     [% IF ( breeding_loop ) %]
75     <table id="resultst">
76 <thead>    <tr>
77         <th>Server</th>
78         <th>Heading</th>
79         <th>Authority Type</th>
80         <th>Actions</th>
81     </tr></thead>
82     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
83         [% IF ( breeding_loo.breedingid ) %]
84         <tr id="row[% breeding_loo.breedingid %]">
85             <td>[% breeding_loo.server %]</td>
86             <td>[% breeding_loo.heading %]</td>
87             <td>[% breeding_loo.heading_code %]</td>
88             <td class="actions">
89                 <div class="dropdown">
90                     <a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% breeding_loo.breedingid %]" role="button" data-toggle="dropdown" href="#">
91                       Actions <b class="caret"></b>
92                     </a>
93                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% breeding_loo.breedingid %]">
94                         <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC"><i class="fa fa-eye"></i> MARC preview</a></li>
95                         <li><a href="#" class="import_record" 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></li>
96                     </ul>
97                 </div>
98             </td>
99         </tr>
100         [% END %]
101     [% END %]</tbody>
102 </table>
104     <div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
105         <div class="modal-dialog">
106         <div class="modal-content">
107         <div class="modal-header">
108             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
109             <h3 id="marcPreviewLabel">MARC preview</h3>
110         </div>
111         <div class="modal-body">
112             <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
113         </div>
114         </div>
115         </div>
116     </div>
118     <form method="post" action="z3950_auth_search.pl" id="page_form" name="page_form" class="checkboxed">
119         <input type="hidden" name="op" id="op" value="do_search" />
120         <input type="hidden" name="current_page" id="current_page" value="[% current_page %]" />
121         <input type="hidden" id="nameany"  name="nameany" value="[% nameany %]" />
122         <input type="hidden" id="authorany"  name="authorany" value="[% authorany %]" />
123         <input type="hidden" id="authorcorp"  name="authorcorp" value="[% authorcorp %]" />
124         <input type="hidden" id="authorpersonal"  name="authorpersonal" value="[% authorpersonal %]" />
125         <input type="hidden" id="authormeetingcon"  name="authormeetingcon" value="[% authormeetingcon %]" />
126         <input type="hidden" id="title"  name="title" value="[% title %]" />
127         <input type="hidden" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle %]" />
128         <input type="hidden" id="subject" name="subject" value="[% subject %]" />
129         <input type="hidden" id="subjectsubdiv" name="subjectsubdiv" value="[% subjectsubdiv %]" />
130         <input type="hidden" id="heading"  name="heading" value="[% heading %]" />
131         <input type="hidden" id="srchany" name="srchany" value="[% srchany %]" />
132         <input type="hidden" name="authid" value="[% authid %]" />
134         [% FOREACH server IN servers %]
135         <input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" />
136         [% END %]
138         [% IF ( show_prevbutton ) %]
139             <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
140         [% END %]
141         Page [% current_page %] / [% total_pages %]
142         [% IF ( show_nextbutton ) %]
143             <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
144         [% END %]
145         <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" />
146     </form>
148 <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>
149     [% ELSE %]
150         [% IF ( errconn ) %]
151             <div class="dialog alert">
152                 <ul>
153                 [% FOREACH errcon IN errconn %]
154                     [% IF ( errcon.error == '10000' ) %]<li>Connection failed to [% errcon.server %]</li>
155                     [% ELSIF ( errcon.error == '10007' ) %]<li>Connection timeout to [% errcon.server %]</li>[% END %]
156                 [% END %]
157                 </ul>
158             </div>
159          [% END %]
160    <div class="dialog message">Nothing found.</div>
161     <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>
162     [% END %]
164 [% END %]
166 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
168 [% MACRO jsinclude BLOCK %]
169     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
170     [% INCLUDE 'datatables.inc' %]
171     <script type="text/javascript">
172         $(document).ready(function(){
174             $(".dropdown").on("hidden.bs.dropdown", function(){
175                 // Reset menu styles so that a click on the
176                 // original dropdown button toggle works correctly
177                 $(".dropdown").css("position","absolute");
178                 $(".dropdown-menu").css({
179                     "top" : "100%",
180                     "left" : "auto",
181                     "right" : 0
182                 });
183             });
185             $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
186                 "sDom": 't',
187                 "aoColumnDefs": [
188                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
189                 ],
190                 "aaSorting": [[ 1, "asc" ]],
191                 "bPaginate": false
192             }));
194             /* Display actions menu anywhere the table is clicked */
195             $("td").click(function(event){
196                 var tgt = $(event.target);
197                 var row = $(this).parent();
198                 var rowid = row.attr("id");
199                 $("tr").removeClass("highlighted-row");
200                 row.addClass("highlighted-row");
201                 $(".dropdown").removeClass("open");
202                 if(tgt.is("a")||tgt.is(":nth-child(8)")){
203                     // Don't show inline links for cells containing links of their own.
204                 } else {
205                     event.stopPropagation();
206                     var dropdown = $(".dropdown", row);
207                     dropdown.addClass("open");
208                     var position = $(this).offset();
209                     var top = position.top + 5;
210                     var left = position.left + 5;
211                     dropdown.css("position","unset");
212                     $(".dropdown-menu", row).css({
213                         "top" : top,
214                         "left" : left,
215                         "right" : "unset"
216                     });
218                }
219             });
221         });
222     </script>
223     [% INCLUDE 'z3950_search.inc' %]
224     <script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search_[% KOHA_VERSION %].js"></script>
225 [% END %]
227 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]