Lines 1-7
Link Here
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
|
|
2 |
|
3 |
[% BLOCK ServerType %] |
4 |
[% IF (server.servertype||type) == 'sru' %] |
5 |
SRU |
6 |
[% ELSIF (server.servertype||type) == 'zed' %] |
7 |
Z39.50 |
8 |
[% END %] |
9 |
[% END %] |
10 |
|
2 |
<title>Koha › Administration › Z39.50 servers |
11 |
<title>Koha › Administration › Z39.50 servers |
3 |
[% IF op == 'edit' %] › Modify Z39.50 server [% server.name %][% END %] |
12 |
[% IF op == 'edit' %] › Modify [% PROCESS ServerType %] server [% server.servername %][% END %] |
4 |
[% IF op == 'add' %] › New Z39.50 server[% END %] |
13 |
[% IF op == 'add' %] › New [% PROCESS ServerType %] server[% END %] |
5 |
</title> |
14 |
</title> |
6 |
[% INCLUDE 'doc-head-close.inc' %] |
15 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
|
16 |
|
Lines 20-25
Link Here
|
20 |
$("#encoding").val('[% server.encoding %]'); |
29 |
$("#encoding").val('[% server.encoding %]'); |
21 |
$("#recordtype").val('[% server.recordtype %]'); |
30 |
$("#recordtype").val('[% server.recordtype %]'); |
22 |
[% END %] |
31 |
[% END %] |
|
|
32 |
// Disable recordtype (and default to bib) for non-Z3950 servers until auth is supported |
33 |
[% UNLESS (server.servertype||type) == 'zed' %] |
34 |
$("#recordtype").prop('disabled',true); |
35 |
[% END %] |
23 |
$( "#serverentry" ).validate({ |
36 |
$( "#serverentry" ).validate({ |
24 |
rules: { |
37 |
rules: { |
25 |
servername: { required: true }, |
38 |
servername: { required: true }, |
Lines 33-39
Link Here
|
33 |
timeout: { number: true } |
46 |
timeout: { number: true } |
34 |
} |
47 |
} |
35 |
}); |
48 |
}); |
|
|
49 |
$("#serverentry").submit(function( event ) { |
50 |
// copy show_sru_fields to hidden counterpart |
51 |
$('#sru_fields').val( $('#show_sru_fields').val() ); |
52 |
// enable recordtype to include field in post |
53 |
$('#recordtype').prop('disabled',false); |
54 |
}); |
36 |
}); |
55 |
}); |
|
|
56 |
function ModMapping () { |
57 |
var map= $('#show_sru_fields').val(); |
58 |
window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map,'popup','width=800,height=400,resizable=no,toolbar=false,scrollbars=no,top'); |
59 |
} |
37 |
[% ELSE %] |
60 |
[% ELSE %] |
38 |
$(document).ready(function() { |
61 |
$(document).ready(function() { |
39 |
$("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, { |
62 |
$("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, { |
Lines 61-68
Link Here
|
61 |
|
84 |
|
62 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › |
85 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › |
63 |
<a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> |
86 |
<a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> |
64 |
[% IF op == 'edit' %]› Modify Z39.50 server [% server.name %][% END %] |
87 |
[% IF op == 'edit' %]› Modify [% PROCESS ServerType %] server [% server.servername %][% END %] |
65 |
[% IF op == 'add' %]› New Z39.50 server[% END %] |
88 |
[% IF op == 'add' %]› New [% PROCESS ServerType %] server[% END %] |
66 |
</div> |
89 |
</div> |
67 |
|
90 |
|
68 |
<div id="doc3" class="yui-t2"> |
91 |
<div id="doc3" class="yui-t2"> |
Lines 83-97
Link Here
|
83 |
[% IF ( add_form ) %] |
106 |
[% IF ( add_form ) %] |
84 |
<form action="[% script_name %]" name="Aform" method="post" id="serverentry"> |
107 |
<form action="[% script_name %]" name="Aform" method="post" id="serverentry"> |
85 |
<input type="hidden" name="op" value="add_validated" /> |
108 |
<input type="hidden" name="op" value="add_validated" /> |
|
|
109 |
<input type="hidden" name="servertype" value="[% server.servertype||type||'zed' %]"/> |
86 |
[% IF op == 'edit' %] |
110 |
[% IF op == 'edit' %] |
87 |
<h1>Modify Z39.50 server</h1> |
111 |
<h1>Modify [% PROCESS ServerType %] server</h1> |
88 |
<input type="hidden" name="id" value="[% server.id %]" /> |
112 |
<input type="hidden" name="id" value="[% server.id %]" /> |
89 |
[% ELSE %] |
113 |
[% ELSE %] |
90 |
<h1>New Z39.50 server</h1> |
114 |
<h1>New [% PROCESS ServerType %] server</h1> |
91 |
[% END %] |
115 |
[% END %] |
92 |
<fieldset class="rows"> |
116 |
<fieldset class="rows"> |
93 |
<ol> |
117 |
<ol> |
94 |
<li><label for="name" class="required">Z39.50 server: </label><input type="text" name="servername" id="servername" size="65" maxlength="100" onblur="toUC(this)" value="[% server.name | html %]" required="required"/> <span class="required">Required</span></li> |
118 |
<li><label for="name">Server name: </label><input type="text" name="servername" id="servername" size="65" maxlength="100" onblur="toUC(this)" value="[% server.servername | html %]"/></li> |
95 |
|
119 |
|
96 |
<li><label for="host" class="required">Hostname: </label> <input type="text" name="host" id="host" size="30" value="[% server.host %]" required="required" /> <span class="required">Required</span> |
120 |
<li><label for="host" class="required">Hostname: </label> <input type="text" name="host" id="host" size="30" value="[% server.host %]" required="required" /> <span class="required">Required</span> |
97 |
</li> |
121 |
</li> |
Lines 151-156
Link Here
|
151 |
<option value="authority">Authority</option> |
175 |
<option value="authority">Authority</option> |
152 |
</select> |
176 |
</select> |
153 |
</li> |
177 |
</li> |
|
|
178 |
[% IF (server.servertype||type) == 'sru' %] |
179 |
<li> |
180 |
<label for="sru_options">Additional SRU options: </label> |
181 |
<input type="text" name="sru_options" id="sru_options" size="50" value="[% server.sru_options %]"/> |
182 |
<span>( Separate options by commas. Example: sru=get,sru_version=1.1. See also http://www.indexdata.com/yaz/doc/zoom.html.)</span> |
183 |
</li> |
184 |
<li> |
185 |
<label for="sru_fields">SRU Search fields mapping: </label> |
186 |
<input type="hidden" name="sru_fields" id="sru_fields" value="[% server.sru_fields %]" /> |
187 |
<input type="text" name="show_sru_fields" id="show_sru_fields" size="100" value="[% server.sru_fields %]" disabled/> <input type="button" value="Modify" onclick="ModMapping()" /> |
188 |
</li> |
189 |
[% END %] |
190 |
<li> |
191 |
<label for="add_xslt">XSLT File(s) for transforming results: </label> |
192 |
<input type="text" name="add_xslt" id="add_xslt" size="100" value="[% server.add_xslt %]"/> |
193 |
<span>( Separate files by commas.)</span> |
194 |
</li> |
195 |
|
154 |
</ol> |
196 |
</ol> |
155 |
</fieldset> |
197 |
</fieldset> |
156 |
|
198 |
|
Lines 160-166
Link Here
|
160 |
|
202 |
|
161 |
[% IF op == 'list' %] |
203 |
[% IF op == 'list' %] |
162 |
<div id="toolbar" class="btn-toolbar"> |
204 |
<div id="toolbar" class="btn-toolbar"> |
163 |
<a id="newserver" class="btn btn-small" href="/cgi-bin/koha/admin/z3950servers.pl?op=add"><i class="icon-plus"></i> New Z39.50 server</a> |
205 |
<a id="newserver" class="btn btn-small" href="/cgi-bin/koha/admin/z3950servers.pl?op=add&type=zed"><i class="icon-plus"></i> New Z39.50 server</a> |
|
|
206 |
<a id="newserver" class="btn btn-small" href="/cgi-bin/koha/admin/z3950servers.pl?op=add&type=sru"><i class="icon-plus"></i> New SRU server</a> |
164 |
</div> |
207 |
</div> |
165 |
<h3>Z39.50 servers administration</h3> |
208 |
<h3>Z39.50 servers administration</h3> |
166 |
[% IF id %] |
209 |
[% IF id %] |
Lines 178-186
Link Here
|
178 |
[% ELSE %] |
221 |
[% ELSE %] |
179 |
<tr> |
222 |
<tr> |
180 |
[% END %] |
223 |
[% END %] |
181 |
<td><a href="[% loo.script_name %]?op=edit&id=[% loo.id %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% IF loo.password %]########[% END %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td> |
224 |
<td><a href="[% loo.script_name %]?op=edit&id=[% loo.id %]">[% loo.servername %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% IF loo.password %]########[% END %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td> |
182 |
<td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td><td>[% loo.recordtype %]</td> |
225 |
<td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td><td>[% loo.recordtype %]</td> |
183 |
<td><a href="[% loo.script_name %]?op=edit&id=[% loo.id %]">Edit</a> <a href="[% loo.script_name %]?op=add&id=[% loo.id %]">Copy</a> <a href="javascript:void(0);" onclick="ConfirmDelete('[% loo.name | replace("['\"]","") %]','[% loo.id %]');">Delete</a></td> |
226 |
<td><a href="[% loo.script_name %]?op=edit&id=[% loo.id %]">Edit</a> <a href="[% loo.script_name %]?op=add&id=[% loo.id %]">Copy</a> <a href="javascript:void(0);" onclick="ConfirmDelete('[% loo.servername | replace("['\"]","") %]','[% loo.id %]');">Delete</a></td> |
184 |
</tr> |
227 |
</tr> |
185 |
[% END %] |
228 |
[% END %] |
186 |
</tbody> |
229 |
</tbody> |
187 |
- |
|
|