Bug 17174: Making z39.50 Authority search actions buttons
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / z3950_auth_search.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Z39.50 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 ], "bSortable": false, "bSearchable": false },
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(4)")||$tgt.is(":nth-child(5)")){
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; } #marcPreview { width : 90%; margin-left : -45%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #marcPreview { margin: 0; width : auto; } }
48 </style>
49
50     [% IF ( opsearch ) %]
51         <style type="text/css">
52         #custom-doc { width:53em;*width:51.72em;min-width:689px; margin:auto; text-align:left; }
53         </style>
54         </head>
55         <body id="cat_z3950_auth_search" class="cat">
56         <div id="custom-doc" class="yui-t7">
57     [% ELSE %]
58         </head>
59         <body id="cat_z3950_search" class="cat" style="padding:.5em;">
60         <div>
61     [% END %]
62     <div id="bd">
63     [% IF ( opsearch ) %]
64         <h2>Z39.50 Authority search points</h2>
65         <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
66         <input type="hidden" name="op" id="op" value="do_search" />
67         <input type="hidden" name="authid" value="[% authid %]" />
68         <div class="yui-g">
69             <div class="yui-u first">
70                 <fieldset class="rows">
71                 <ol>
72                     <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
73                     <li><label for="nameany">Name (any): </label> <input type="text" id="nameany" name="nameany" value="" /></li>
74                     <li><label for="authorany">Author (any): </label> <input type="text" id="authorany" name="authorany" value="" /></li>
75                     <li><label for="authorpersonal">Author (personal): </label> <input type="text" id="authorpersonal" name="authorpersonal" value="[% authorpersonal | html %]" /></li>
76                     <li><label for="authorcorp">Author (corporate): </label> <input type="text" id="authorcorp" name="authorcorp" value="[% authorcorp | html %]" /></li>
77                     <li><label for="authormeetingcon">Author (meeting/conference): </label> <input type="text" id="authormeetingcon" name="authormeetingcon" value="[% authormeetingcon | html %]" /></li>
78                 </ol>
79                 </fieldset>
80             </div>
81             <div class="yui-u">
82                 <fieldset class="rows">
83                 <ol>
84                     <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
85                     <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li>
86                     <li><label for="title">Title (any): </label> <input type="text" id="title"  name="title" value="[% title | html %]" /></li>
87                     <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
88                     <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
89                 </ol>
90                 </fieldset>
91             </div>
92             <div class="yui-g">
93                 <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>
94                 <div id="z3950_search_targets_auth">
95                 [% FOREACH serverloo IN serverloop %]
96                     <p>
97                     [% IF ( serverloo.checked ) %]
98                         <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" checked="checked" />
99                     [% ELSE %]
100                         <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
101                     [% END %]
102                     <label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
103                     </p>
104                 [% END %]
105                 </div>
106             </div>
107         <fieldset class="action"><input type="submit"  class="submit" value="Search"/> <a class="cancel close" href="#">Cancel</a></fieldset>
108         </form>
109 [% ELSE %]
110     <h2>Results for Authority Records</h2>
111     [% IF ( breeding_loop ) %]
112     <table id="resultst">
113 <thead>    <tr>
114         <th>Server</th>
115         <th>Heading</th>
116         <th>Authority Type</th>
117         <th>Actions</th>
118     </tr></thead>
119     <tbody>[% FOREACH breeding_loo IN breeding_loop %]
120         [% IF ( breeding_loo.breedingid ) %]
121         <tr id="row[% breeding_loo.breedingid %]">
122             <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>
123             <td>[% breeding_loo.heading %]</td>
124             <td>[% breeding_loo.heading_code %]</td>
125             <td class="actions">
126                 <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC btn btn-mini"><i class="fa fa-eye"></i> Show MARC</a>
127                 <a href="#" class="import_record btn btn-mini" 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>
128             </td>
129         </tr>
130         [% END %]
131     [% END %]</tbody>
132 </table>
133
134     <div id="marcPreview" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
135         <div class="modal-header">
136             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
137             <h3 id="marcPreviewLabel">MARC preview</h3>
138         </div>
139         <div class="modal-body">
140             <div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div>
141         </div>
142     </div>
143
144     <form method="post" action="z3950_auth_search.pl" id="page_form" name="page_form" class="checkboxed">
145         <input type="hidden" name="op" id="op" value="do_search" />
146         <input type="hidden" name="current_page" id="current_page" value="[% current_page %]" />
147         <input type="hidden" id="nameany"  name="nameany" value="[% nameany %]" />
148         <input type="hidden" id="authorany"  name="authorany" value="[% authorany %]" />
149         <input type="hidden" id="authorcorp"  name="authorcorp" value="[% authorcorp %]" />
150         <input type="hidden" id="authorpersonal"  name="authorpersonal" value="[% authorpersonal %]" />
151         <input type="hidden" id="authormeetingcon"  name="authormeetingcon" value="[% authormeetingcon %]" />
152         <input type="hidden" id="title"  name="title" value="[% title %]" />
153         <input type="hidden" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle %]" />
154         <input type="hidden" id="subject" name="subject" value="[% subject %]" />
155         <input type="hidden" id="subjectsubdiv" name="subjectsubdiv" value="[% subjectsubdiv %]" />
156         <input type="hidden" id="heading"  name="heading" value="[% heading %]" />
157         <input type="hidden" id="srchany" name="srchany" value="[% srchany %]" />
158         <input type="hidden" name="authid" value="[% authid %]" />
159
160         [% FOREACH server IN servers %]
161         <input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" />
162         [% END %]
163
164         [% IF ( show_prevbutton ) %]
165             <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" />
166         [% END %]
167         Page [% current_page %] / [% total_pages %]
168         [% IF ( show_nextbutton ) %]
169             <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" />
170         [% END %]
171         <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" />
172     </form>
173
174 <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>
175     [% ELSE %]
176         [% IF ( errconn ) %]
177             <div class="dialog alert">
178                 <ul>
179                 [% FOREACH errcon IN errconn %]
180                     [% IF ( errcon.error == '10000' ) %]<li>Connection failed to [% errcon.server %]</li>
181                     [% ELSIF ( errcon.error == '10007' ) %]<li>Connection timeout to [% errcon.server %]</li>[% END %]
182                 [% END %]
183                 </ul>
184             </div>
185          [% END %]
186    <div class="dialog message">Nothing found.</div>
187     <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>
188     [% END %]
189
190 [% END %]
191 </div>
192 </div>
193
194 [% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
195
196 </body>
197 </html>