331 lines
13 KiB
Text
331 lines
13 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration › [% IF ( else ) %]Z39.50 Servers[% END %]
|
|
[% IF ( add_form ) %] Z39.50 Servers › [% IF ( searchfield ) %]Modify Z39.50 Server [% searchfield %][% ELSE %]New Z39.50 Server[% END %][% END %]
|
|
[% IF ( delete_confirm ) %]Z39.50 Servers › Confirm Deletion[% END %]
|
|
[% IF ( add_validate ) %]Z39.50 Servers › Z39.50 Server Added[% END %]
|
|
[% IF ( delete_confirmed ) %]Z39.50 Servers › Z39.50 Server Deleted[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
|
|
[% IF ( add_form ) %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
//
|
|
function isNotNull(f,noalert) {
|
|
if (f.value.length ==0) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
//
|
|
function toUC(f) {
|
|
var x=f.value.toUpperCase();
|
|
f.value=x;
|
|
return true;
|
|
}
|
|
//
|
|
function isNum(v,maybenull) {
|
|
var n = new Number(v.value);
|
|
if (isNaN(n)) {
|
|
return false;
|
|
}
|
|
if (maybenull==0 && v.value=='') {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
//
|
|
function isDate(f) {
|
|
var t = Date.parse(f.value);
|
|
if (isNaN(t)) {
|
|
return false;
|
|
}
|
|
}
|
|
//
|
|
function Check(f) {
|
|
var ok=1;
|
|
var _alertString="";
|
|
var alertString2;
|
|
if (f.searchfield.value.length==0) {_alertString += "- target name missing\n";
|
|
}
|
|
if (f.host.value.length==0) {_alertString += "- host missing\n";
|
|
}
|
|
if (f.port.value.length==0) {_alertString += "- port missing\n";
|
|
}
|
|
if (f.db.value.length==0) {_alertString += "- database missing\n";
|
|
}
|
|
if (isNaN(f.port.value)) {_alertString += "- port must be a number\n";
|
|
}
|
|
if (isNaN(f.rank.value)) {_alertString += "- rank must be a number\n";
|
|
}
|
|
if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {_alertString += "- checked must be 0 or 1\n";
|
|
}
|
|
if (_alertString.length==0) {document.Aform.submit();
|
|
} else {alertString2 = "Form not submitted because of the following problem(s)\n";alertString2 += "------------------------------------------------------------------------------------\n\n";alertString2 += _alertString;alert(alertString2);
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
[% END %]
|
|
</head>
|
|
<body>
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'z3950-admin-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( else ) %]Z39.50 Servers[% END %]
|
|
[% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> › [% IF ( searchfield ) %]Modify Z39.50 Server [% searchfield %][% ELSE %]New Z39.50 Server[% END %][% END %]
|
|
[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> › Confirm Deletion[% END %]
|
|
[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> › Z39.50 Server Added[% END %]
|
|
[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> › Z39.50 Server Deleted[% END %]</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% IF ( add_form ) %]
|
|
|
|
<form action="[% script_name %]" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
[% IF ( searchfield ) %]
|
|
<h1>Modify Z39.50 Server</h1>
|
|
[% ELSE %]
|
|
<h1>New Z39.50 Server</h1>
|
|
[% END %]
|
|
<fieldset class="rows">
|
|
<ol>[% IF ( searchfield ) %]
|
|
<li><span class="label">Z39.50 Server: </span> <input type="hidden" name="searchfield" value="[% searchfield %]" />[% searchfield %]</li>
|
|
[% ELSE %]
|
|
<li><label for="searchfield">Z39.50 Server: </label> <input type="text" name="searchfield" id="searchfield" size="65" maxlength="100" onblur="toUC(this)" /></li>
|
|
[% END %]
|
|
|
|
<li><label for="host">Hostname: </label> <input type="text" name="host" id="host" size="30" value="[% host %]" />
|
|
</li>
|
|
<li><label for="port">Port: </label> <input type="text" name="port" id="port" size="5" value="[% port %]" onblur="isNum(this)" />
|
|
</li>
|
|
<li><label for="db">Database: </label> <input type="text" name="db" id="db" value="[% db %]" />
|
|
</li>
|
|
<li><label for="userid">Userid: </label> <input type="text" name="userid" id="userid" value="[% userid %]" />
|
|
</li>
|
|
<li><label for="password">Password: </label> <input type="text" name="password" id="password" value="[% password %]" />
|
|
</li>
|
|
<li><label for="checked">Checked (searched by default): </label> <input type="text" size="1" name="checked" id="checked" value="[% checked %]" onblur="isNum(this)" /> </li>
|
|
<li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% rank %]" onblur="isNum(this)" />
|
|
</li>
|
|
<li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
|
|
<select name="syntax">
|
|
[% IF ( syntaxUNIMARC ) %]
|
|
<option value="UNIMARC" selected="selected">UNIMARC</option>
|
|
[% ELSE %]
|
|
<option value="UNIMARC">UNIMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxINTERMARC ) %]
|
|
<option value="INTERMARC" selected="selected">INTERMARC</option>
|
|
[% ELSE %]
|
|
<option value="INTERMARC">INTERMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxCCF ) %]
|
|
<option value="CCF" selected="selected">CCF</option>
|
|
[% ELSE %]
|
|
<option value="CCF">CCF</option>
|
|
[% END %]
|
|
[% IF ( syntaxUSMARC ) %]
|
|
<option value="USMARC" selected="selected">MARC21/USMARC</option>
|
|
[% ELSE %]
|
|
<option value="USMARC">MARC21/USMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxUKMARC ) %]
|
|
<option value="UKMARC" selected="selected">UKMARC</option>
|
|
[% ELSE %]
|
|
<option value="UKMARC">UKMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxNORMARC ) %]
|
|
<option value="NORMARC" selected="selected">NORMARC</option>
|
|
[% ELSE %]
|
|
<option value="NORMARC">NORMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxLIBRISMARC ) %]
|
|
<option value="LIBRISMARC" selected="selected">LIBRISMARC</option>
|
|
[% ELSE %]
|
|
<option value="LIBRISMARC">LIBRISMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxDANMARC ) %]
|
|
<option value="DANMARC" selected="selected">DANMARC</option>
|
|
[% ELSE %]
|
|
<option value="DANMARC">DANMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxFINMARC ) %]
|
|
<option value="FINMARC" selected="selected">FINMARC</option>
|
|
[% ELSE %]
|
|
<option value="FINMARC">FINMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxCANMARC ) %]
|
|
<option value="CANMARC" selected="selected">CANMARC</option>
|
|
[% ELSE %]
|
|
<option value="CANMARC">CANMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxSBN ) %]
|
|
<option value="SBN" selected="selected">SBN</option>
|
|
[% ELSE %]
|
|
<option value="SBN">SBN</option>
|
|
[% END %]
|
|
[% IF ( syntaxPICAMARC ) %]
|
|
<option value="PICAMARC" selected="selected">PICAMARC</option>
|
|
[% ELSE %]
|
|
<option value="PICAMARC">PICAMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxAUSMARC ) %]
|
|
<option value="AUSMARC" selected="selected">AUSMARC</option>
|
|
[% ELSE %]
|
|
<option value="AUSMARC">AUSMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxIBERMARC ) %]
|
|
<option value="IBERMARC" selected="selected">IBERMARC</option>
|
|
[% ELSE %]
|
|
<option value="IBERMARC">IBERMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxCATMARC ) %]
|
|
<option value="CATMARC" selected="selected">CATMARC</option>
|
|
[% ELSE %]
|
|
<option value="CATMARC">CATMARC</option>
|
|
[% END %]
|
|
[% IF ( syntaxMALMARC ) %]
|
|
<option value="MALMARC" selected="selected">MALMARC</option>
|
|
[% ELSE %]
|
|
<option value="MALMARC">MALMARC</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li><label for="encoding">Encoding (z3950 can send<br /> records in various encodings. Choose one): </label>
|
|
<select name="encoding">
|
|
[% IF ( encodingutf8 ) %]
|
|
<option value="utf8" selected="selected">UTF-8</option>
|
|
[% ELSE %]
|
|
<option value="utf8">UTF-8</option>
|
|
[% END %]
|
|
[% IF ( encodingEUC_KR ) %]
|
|
<option value="EUC-KR" selected="selected">EUC-KR</option>
|
|
[% ELSE %]
|
|
<option value="EUC-KR">EUC-KR</option>
|
|
[% END %]
|
|
[% IF ( encodingISO_5426 ) %]
|
|
<option value="ISO_5426" selected="selected">ISO_5426</option>
|
|
[% ELSE %]
|
|
<option value="ISO_5426">ISO_5426</option>
|
|
[% END %]
|
|
[% IF ( encodingISO_6937 ) %]
|
|
<option value="ISO_6937" selected="selected">ISO_6937</option>
|
|
[% ELSE %]
|
|
<option value="ISO_6937">ISO_6937</option>
|
|
[% END %]
|
|
[% IF ( encodingMARC_8 ) %]
|
|
<option value="MARC-8" selected="selected">MARC-8</option>
|
|
[% ELSE %]
|
|
<option value="MARC-8">MARC-8</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action"><input type="button" value="Save" onclick="Check(this.form)" /> <a class="cancel" href="/cgi-bin/koha/admin/z3950servers.pl">Cancel</a></fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( add_validate ) %]
|
|
<h3>Z39.50 Server Added</h3>
|
|
<form action="[% script_name %]" method="post">
|
|
<input type="submit" value="OK" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( delete_confirm ) %]
|
|
[% reqsel %]
|
|
<h3>Confirm Deletion of Server [% searchfield %]</h3>
|
|
<ul>
|
|
<li><strong>Target: </strong> [% searchfield %]</li>
|
|
<li><strong>Hostname: </strong>[% host %]</li>
|
|
<li><strong>Port: </strong>[% port %]</li>
|
|
<li><strong>Database: </strong>[% db %]</li>
|
|
<li><strong>Userid: </strong>[% userid %]</li>
|
|
<li><strong>Password: </strong>[% password %]</li>
|
|
<li><strong>Checked: </strong>[% checked %]</li>
|
|
<li><strong>Rank: </strong>[% rank %]</li>
|
|
<li><strong>Syntax: </strong>[% syntax %]</li>
|
|
<li><strong>Encoding: </strong>[% encoding %]</li>
|
|
</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>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
[% IF ( delete_confirmed ) %]
|
|
<h3>Z39.50 Server Deleted</h3>
|
|
<form action="[% script_name %]" method="post">
|
|
<input type="submit" value="OK" />
|
|
</form>
|
|
[% END %]
|
|
|
|
[% IF ( else ) %]
|
|
|
|
<div id="toolbar">
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
// prepare DOM for YUI Toolbar
|
|
$(document).ready(function() {
|
|
yuiToolbar();
|
|
[% IF ( loop ) %]$.tablesorter.defaults.widgets = ['zebra'];
|
|
$("#serverst").tablesorter({
|
|
sortList: [[0,0]],
|
|
headers: { 2: {sorter:false},3: { sorter: false },4: { sorter: false },7: { sorter: false },8: { sorter: false },9: { sorter: false },10: { sorter: false }}
|
|
});[% END %]
|
|
});
|
|
// YUI Toolbar Functions
|
|
function yuiToolbar() {
|
|
new YAHOO.widget.Button("newserver");
|
|
} //]]>
|
|
</script>
|
|
<ul class="toolbar">
|
|
<li><a id="newserver" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form">New Z39.50 Server</a></li>
|
|
</ul></div>
|
|
|
|
<h3>Z39.50 Servers Administration</h3>
|
|
|
|
[% IF ( searchfield ) %]
|
|
You searched for [% searchfield %]
|
|
[% END %]
|
|
<table id="serverst">
|
|
<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 colspan="2"> </th>
|
|
</tr></thead>
|
|
<tbody>[% FOREACH loo IN loop %]
|
|
[% UNLESS ( loop.odd ) %]
|
|
<tr class="highlight">
|
|
[% ELSE %]
|
|
<tr>
|
|
[% END %]
|
|
<td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% loo.checked %]</td><td>[% loo.rank %]</td> <td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.name |url %]">Delete</a></td> </tr>
|
|
[% END %]</tbody>
|
|
</table>
|
|
|
|
[% IF ( offsetgtzero ) %]<form action="[% script_name %]" method="get">
|
|
<input type="hidden" name="offset" value="[% prevpage %]" />
|
|
<input type="submit" value="<< Previous">
|
|
</form>[% END %]
|
|
|
|
[% IF ( ltcount ) %]<form action="[% script_name %]" method="get">
|
|
<input type="hidden" name="offset" value="[% nextpage %]" />
|
|
<input type="submit" value="Next >>" />
|
|
</form> [% END %]
|
|
|
|
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|