Bug 1047: Punctuation in site names no longer breaks Edit/Delete z39.50 server admini...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / z3950servers.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
3 [% IF ( add_form ) %] Z39.50 servers &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
4 [% IF ( delete_confirm ) %]Z39.50 servers &rsaquo; Confirm deletion[% END %]
5 [% IF ( confirm_add ) %] Z39.50 servers &rsaquo; Z39.50 server added[% END %]
6 [% IF ( confirm_update ) %] Z39.50 servers &rsaquo; Z39.50 server updated[% END %]
7 [% IF ( delete_confirmed ) %]Z39.50 servers &rsaquo; Z39.50 server deleted[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% IF ( else ) %]
10 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
11 [% INCLUDE 'datatables.inc' %]
12 [% END %]
13 [% IF ( add_form ) %]
14 <script type="text/javascript">
15 //<![CDATA[
16     $(document).ready(function(){
17         $( "#serverentry" ).validate({
18             rules: {
19                 searchfield: { required: true },
20                 host: { required: true },
21                 port: {
22                     required: true,
23                     number: true
24                 },
25                 db: { required: true },
26                 rank: { number: true },
27                 timeout: { number: true }
28             }
29         });
30     });
31 //]]>
32 </script>
33 [% END %]
34 [% IF ( else ) %]
35     <script type="text/javascript">
36     //<![CDATA[
37      $(document).ready(function() {
38         [% IF ( loop ) %]$("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
39             "aoColumnDefs": [
40                 { "aTargets": [ 2,3,4,7,8,9,10,11 ], "bSortable": false, "bSearchable": false },
41             ],
42             "sPaginationType": "four_button"
43         }));[% END %]
44      });
45     //]]>
46     </script>
47 [% END %]
48
49 </head>
50 <body id="admin_z3950servers" class="admin">
51 [% INCLUDE 'header.inc' %]
52 [% INCLUDE 'z3950-admin-search.inc' %]
53
54 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
55 [% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
56 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Confirm deletion[% END %]
57 [% IF ( confirm_add ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server added[% END %]
58 [% IF ( confirm_update ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server updated[% END %]
59
60 [% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server deleted[% END %]</div>
61
62 <div id="doc3" class="yui-t2">
63    
64    <div id="bd">
65         <div id="yui-main">
66         <div class="yui-b">
67
68 [% IF ( add_form ) %]
69        
70         <form action="[% script_name %]" name="Aform" method="post" id="serverentry">
71         <input type="hidden" name="op" value="add_validate" />
72 [% IF ( searchfield ) %]
73                 <h1>Modify Z39.50 server</h1>
74         [% ELSE %]
75                 <h1>New Z39.50 server</h1>
76         [% END %]                
77         <fieldset class="rows">
78         <ol>[% IF ( searchfield ) %]
79                 <li><span class="label">Z39.50 server: </span>        <input type="hidden" name="searchfield" value="[% searchfield %]" />[% searchfield %]</li>
80         [% ELSE %]
81                 <li><label for="searchfield" class="required">Z39.50 server: </label>        <input type="text" name="searchfield" id="searchfield" size="65" maxlength="100" onblur="toUC(this)" required="required" /> <span class="required">Required</span></li>
82         [% END %]
83
84         <li><label for="host" class="required">Hostname: </label> <input type="text" name="host" id="host" size="30" value="[% host %]" required="required" /> <span class="required">Required</span>
85                 </li>
86         <li><label for="port" class="required">Port: </label> <input type="text" name="port" id="port" size="5" value="[% port %]" required="required" /> <span class="required">Required</span>
87                 </li>
88         <li><label for="db" class="required">Database: </label> <input type="text" name="db" id="db" value="[% db %]" required="required" /> <span class="required">Required</span>
89                 </li>
90                 <li><label for="userid">Userid: </label>        <input type="text" name="userid" id="userid" value="[% userid %]" />
91                 </li>
92                 <li><label for="password">Password: </label>    <input type="text" name="password" id="password" value="[% password %]" />
93                 </li>
94                 <li><label for="checked">Checked (searched by default): </label>
95                         [% IF ( checked ) %]
96                                 <input type="checkbox" name="checked" id="checked" value="1" checked="checked" />
97                         [% ELSE %]
98                                 <input type="checkbox" name="checked" id="checked" value="1" />
99                         [% END %]
100                 </li>
101         <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% rank %]" />
102                 </li>   
103                 <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>   
104 <select name="syntax">
105 [% IF ( syntaxUNIMARC ) %]
106 <option value="UNIMARC" selected="selected">UNIMARC</option>
107 [% ELSE %]
108 <option value="UNIMARC">UNIMARC</option>
109 [% END %]
110 [% IF ( syntaxINTERMARC ) %]
111 <option value="INTERMARC" selected="selected">INTERMARC</option>
112 [% ELSE %]
113 <option value="INTERMARC">INTERMARC</option>
114 [% END %]
115 [% IF ( syntaxCCF ) %]
116 <option value="CCF" selected="selected">CCF</option>
117 [% ELSE %]
118 <option value="CCF">CCF</option>
119 [% END %]
120 [% IF ( syntaxUSMARC ) %]
121 <option value="USMARC" selected="selected">MARC21/USMARC</option>
122 [% ELSE %]
123 <option value="USMARC">MARC21/USMARC</option>
124 [% END %]
125 [% IF ( syntaxUKMARC ) %]
126 <option value="UKMARC" selected="selected">UKMARC</option>
127 [% ELSE %]
128 <option value="UKMARC">UKMARC</option>
129 [% END %]
130 [% IF ( syntaxNORMARC ) %]
131 <option value="NORMARC" selected="selected">NORMARC</option>
132 [% ELSE %]
133 <option value="NORMARC">NORMARC</option>
134 [% END %]
135 [% IF ( syntaxLIBRISMARC ) %]
136 <option value="LIBRISMARC" selected="selected">LIBRISMARC</option>
137 [% ELSE %]
138 <option value="LIBRISMARC">LIBRISMARC</option>
139 [% END %]
140 [% IF ( syntaxDANMARC ) %]
141 <option value="DANMARC" selected="selected">DANMARC</option>
142 [% ELSE %]
143 <option value="DANMARC">DANMARC</option>
144 [% END %]
145 [% IF ( syntaxFINMARC ) %]
146 <option value="FINMARC" selected="selected">FINMARC</option>
147 [% ELSE %]
148 <option value="FINMARC">FINMARC</option>
149 [% END %]
150 [% IF ( syntaxCANMARC ) %]
151 <option value="CANMARC" selected="selected">CANMARC</option>
152 [% ELSE %]
153 <option value="CANMARC">CANMARC</option>
154 [% END %]
155 [% IF ( syntaxSBN ) %]
156 <option value="SBN" selected="selected">SBN</option>
157 [% ELSE %]
158 <option value="SBN">SBN</option>
159 [% END %]
160 [% IF ( syntaxPICAMARC ) %]
161 <option value="PICAMARC" selected="selected">PICAMARC</option>
162 [% ELSE %]
163 <option value="PICAMARC">PICAMARC</option>
164 [% END %]
165 [% IF ( syntaxAUSMARC ) %]
166 <option value="AUSMARC" selected="selected">AUSMARC</option>
167 [% ELSE %]
168 <option value="AUSMARC">AUSMARC</option>
169 [% END %]
170 [% IF ( syntaxIBERMARC ) %]
171 <option value="IBERMARC" selected="selected">IBERMARC</option>
172 [% ELSE %]
173 <option value="IBERMARC">IBERMARC</option>
174 [% END %]
175 [% IF ( syntaxCATMARC ) %]
176 <option value="CATMARC" selected="selected">CATMARC</option>
177 [% ELSE %]
178 <option value="CATMARC">CATMARC</option>
179 [% END %]
180 [% IF ( syntaxMALMARC ) %]
181 <option value="MALMARC" selected="selected">MALMARC</option>
182 [% ELSE %]
183 <option value="MALMARC">MALMARC</option>
184 [% END %]
185 </select>
186 </li>
187
188     <li><label for="encoding">Encoding (z3950 can send<br /> records in various encodings. Choose one): </label>  
189 <select name="encoding">
190 [% FOREACH enc IN [ 'utf8' 'EUC-KR' 'ISO_5426' 'ISO_6937' 'ISO_8859-1' 'MARC-8' ] %]
191     [% IF ( encoding == enc ) %]
192     <option value="[% enc %]" selected="selected">[% enc %]</option>
193     [% ELSE %]
194     <option value="[% enc %]">[% enc %]</option>
195     [% END %]
196 [% END %]
197 </select>
198 </li>
199     <li><label for="timeout">Timeout (0 its like not set): </label>
200         <input type="text" name="timeout" id="timeout" size="4" value="[% timeout %]" /> seconds
201         </li>
202     <li><label for="recordtype">Record type: </label>
203     <select name="recordtype" id="recordtype">
204             [% IF ( recordtypebiblio ) %]
205             <option value="biblio" selected="selected">Bibliographic</option>
206             [% ELSE %]
207                    <option value="biblio">Bibliographic</option>
208             [% END %]
209             [% IF ( recordtypeauthority ) %]
210             <option value="authority" selected="selected">Authority</option>
211             [% ELSE %]
212                    <option value="authority">Authority</option>
213             [% END %]
214         </select>
215     </li>
216 </ol>
217         </fieldset>
218
219         <fieldset class="action"><input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/z3950servers.pl">Cancel</a></fieldset>
220         </form>
221 [% END %]
222
223 [% IF ( confirm_add ) %]
224 <h3>Z39.50 server added</h3>
225 <form action="[% script_name %]" method="post">
226         <input type="submit" value="OK" />
227         </form>
228 [% END %]
229
230 [% IF ( confirm_update ) %]
231 <h3>Z39.50 server updated</h3>
232 <form action="[% script_name %]" method="post">
233         <input type="submit" value="OK" />
234         </form>
235 [% END %]
236
237 [% IF ( delete_confirm ) %]
238         [% reqsel %]
239 <h3>Confirm deletion of server [% searchfield %]</h3>
240         <ul>
241                 <li><strong>Target: </strong>        [% searchfield %]</li>
242                 <li><strong>Hostname: </strong>[% host %]</li>
243                 <li><strong>Port: </strong>[% port %]</li>
244                 <li><strong>Database: </strong>[% db %]</li>
245                 <li><strong>Userid: </strong>[% userid %]</li>
246                 <li><strong>Password: </strong>[% password %]</li>
247                 <li><strong>Checked: </strong>[% checked %]</li>
248                 <li><strong>Rank: </strong>[% rank %]</li>
249                 <li><strong>Syntax: </strong>[% syntax %]</li>
250                 <li><strong>Encoding: </strong>[% encoding %]</li>
251                 <li><strong>Timeout: </strong>[% timeout %]</li>
252                 <li><strong>Record type: </strong>[% recordtype %]</li>
253         </ul>                <form action="[% script_name %]" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="submit" value="Delete this server" /></form>  <form action="[% script_name %]" method="post"><input type="submit" value="Do not delete" /></form>
254
255
256
257 [% END %]
258
259 [% IF ( delete_confirmed ) %]
260 <h3>Z39.50 server deleted</h3>
261 <form action="[% script_name %]" method="post">
262                 <input type="submit" value="OK" />
263 </form>
264 [% END %]
265
266 [% IF ( else ) %]
267
268 <div id="toolbar" class="btn-toolbar">
269     <a id="newserver" class="btn btn-small" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form"><i class="icon-plus"></i> New Z39.50 server</a>
270 </div>
271
272 <h3>Z39.50 servers administration</h3>
273
274         [% IF ( searchfield ) %]
275                 You searched for [% searchfield %]
276         [% END %]
277 <table id="serverst">
278                 <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th>&nbsp;</th><th>&nbsp;</th>
279                 </tr></thead>
280                 <tbody>[% FOREACH loo IN loop %]
281                 [% UNLESS ( loop.odd ) %]
282                     <tr class="highlight">
283                 [% ELSE %]
284                     <tr>
285                 [% END %]
286 <td><a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.name |uri %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td>
287
288 <td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td><td>[% loo.recordtype %]</td><td><a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.name |uri %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.name |uri %]">Delete</a></td>                </tr>
289                 [% END %]</tbody>
290 </table>
291
292 [% IF ( offsetgtzero ) %]<form action="[% script_name %]" method="get">
293         <input type="hidden" name="offset" value="[% prevpage %]" />
294         <input type="submit" value="&lt;&lt; Previous">
295 </form>[% END %]
296
297 [% IF ( ltcount ) %]<form action="[% script_name %]" method="get">
298         <input type="hidden" name="offset" value="[% nextpage %]" />
299         <input type="submit" value="Next &gt;&gt;" />
300 </form> [% END %]
301  
302
303 [% END %]
304
305 </div>
306 </div>
307 <div class="yui-b">
308 [% INCLUDE 'admin-menu.inc' %]
309 </div>
310 </div>
311 [% INCLUDE 'intranet-bottom.inc' %]