Lines 18-23
Link Here
|
18 |
[% IF op == 'list' %] |
18 |
[% IF op == 'list' %] |
19 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" /> |
19 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" /> |
20 |
[% END %] |
20 |
[% END %] |
|
|
21 |
|
22 |
<script type="text/javascript"> |
23 |
//<![CDATA[ |
24 |
[% IF ( add_form ) %] |
25 |
$(document).ready(function(){ |
26 |
// Update selects for syntax, encoding and recordtype |
27 |
[% IF server %] |
28 |
$("#syntax").val('[% server.syntax %]'); |
29 |
$("#encoding").val('[% server.encoding %]'); |
30 |
$("#recordtype").val('[% server.recordtype %]'); |
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 %] |
36 |
$( "#serverentry" ).validate({ |
37 |
rules: { |
38 |
servername: { required: true }, |
39 |
host: { required: true }, |
40 |
port: { |
41 |
required: true, |
42 |
number: true |
43 |
}, |
44 |
db: { required: true }, |
45 |
rank: { number: true }, |
46 |
timeout: { number: true } |
47 |
} |
48 |
}); |
49 |
$("#serverentry").submit(function( event ) { |
50 |
// first test if show_sru_fields exists |
51 |
if( $('#show_sru_fields').length && $('#show_sru_fields').val()=='' && !confirm( _("No SRU search field mappings have been defined. This means that all field searches will go through the whole record. Continue?"))) { |
52 |
return false; |
53 |
} |
54 |
// copy show_sru_fields to hidden counterpart |
55 |
$('#sru_fields').val( $('#show_sru_fields').val() ); |
56 |
// enable recordtype to include field in post |
57 |
$('#recordtype').prop('disabled',false); |
58 |
}); |
59 |
$("#servername").on("blur",function(){ |
60 |
toUC(this); |
61 |
}); |
62 |
$("#modify_sru_fields").on("click",function(){ |
63 |
ModMapping(); |
64 |
}); |
65 |
}); |
66 |
function ModMapping () { |
67 |
var map= $('#show_sru_fields').val(); |
68 |
window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map,'popup','width=800,height=400,resizable=yes,toolbar=false,scrollbars=yes,top'); |
69 |
} |
70 |
[% ELSE %] |
71 |
$(document).ready(function() { |
72 |
$("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, { |
73 |
"aoColumnDefs": [ |
74 |
{ "aTargets": [-1], "bSortable": false, "bSearchable": false }, |
75 |
], |
76 |
"sPaginationType": "four_button" |
77 |
})); |
78 |
$(".delete").on("click",function(e){ |
79 |
var servername = $(this).data("servername"); |
80 |
if( confirm( _("Are you sure you want to delete server %s?").format(servername) ) ) { |
81 |
return true; |
82 |
} else { |
83 |
e.preventDefault(); |
84 |
} |
85 |
}); |
86 |
}); |
87 |
[% END %] |
88 |
//]]> |
89 |
</script> |
90 |
|
21 |
</head> |
91 |
</head> |
22 |
|
92 |
|
23 |
<body id="admin_z3950servers" class="admin"> |
93 |
<body id="admin_z3950servers" class="admin"> |
Lines 83-88
Link Here
|
83 |
</li> |
153 |
</li> |
84 |
<li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" /> |
154 |
<li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" /> |
85 |
</li> |
155 |
</li> |
|
|
156 |
[% IF (server.servertype||type) == 'zed' %] |
157 |
<li><label for="attributes">Attributes (additional PQF attributes added to each query): </label><input type="text" name="attributes" id="attributes" size="30" value="[% server.attributes %]" /> |
158 |
</li> |
159 |
[% END %] |
86 |
|
160 |
|
87 |
<li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label> |
161 |
<li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label> |
88 |
<select name="syntax" id="syntax"> |
162 |
<select name="syntax" id="syntax"> |
Lines 159-165
Link Here
|
159 |
You searched for [% searchfield |html %] |
233 |
You searched for [% searchfield |html %] |
160 |
[% END %] |
234 |
[% END %] |
161 |
<table id="serverst"> |
235 |
<table id="serverst"> |
162 |
<thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Preselected</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th></th> |
236 |
|
|
|
237 |
<thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Preselected</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>Record type</th><th>Attributes</th><th>Options</th> |
163 |
</tr></thead> |
238 |
</tr></thead> |
164 |
<tbody> |
239 |
<tbody> |
165 |
[% FOREACH loo IN loop %] |
240 |
[% FOREACH loo IN loop %] |
Lines 172-177
Link Here
|
172 |
<span>Authority</span> |
247 |
<span>Authority</span> |
173 |
[% END %] |
248 |
[% END %] |
174 |
</td> |
249 |
</td> |
|
|
250 |
<td>[% loo.attributes %]</td> |
175 |
<td> |
251 |
<td> |
176 |
<div class="dropdown"> |
252 |
<div class="dropdown"> |
177 |
<a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id %]" role="button" data-toggle="dropdown" href="#"> |
253 |
<a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id %]" role="button" data-toggle="dropdown" href="#"> |
178 |
- |
|
|