1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Administration › Record Matching Rules
3 <!-- TMPL_IF name="matching_rule_form" -->
4 <!-- TMPL_IF name="edit_matching_rule" -->
5 › Modify record matching rule
7 › Add record matching rule
10 <!-- TMPL_IF name="delete_matching_rule_form" -->
11 › Confirm deletion of record matching rule "<!-- TMPL_VAR name="code" -->"
14 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
16 <script type="text/javascript">
19 var maxMatchPoint = <!-- TMPL_VAR name="max_matchpoint" -->;
20 var maxMatchCheck = <!-- TMPL_VAR name="max_matchcheck" -->;
22 function InsertMatchpoint(loc, index) {
23 var original= $("#"+index);
24 var clone = original.clone();
27 // update IDs and form names
29 clone.attr('id', 'mp_' + maxMatchPoint);
30 $("span.counter",clone).html(maxMatchPoint);
31 $("label",clone).each(function(){
32 var s = $(this).attr("for");
33 if (s.match(/mp_num/)) {
34 $(this).attr("for",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
38 $("div",clone).each(function(){
39 var s = $(this).attr("id");
40 if (s.match(/mp_num/)) {
41 $(this).attr("id",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
44 $("input",clone).each(function(){
45 var s = $(this).attr("id");
46 if(s.match(/mp_num/)){
47 $(this).attr("id",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
50 var s = $(this).attr("name");
51 if(s.match(/mp_num/)){
52 $(this).attr("name",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
55 $("#match_points").append(clone);
58 function InsertMatchcheck(loc, index) {
59 var original= $("#"+index);
60 var clone = original.clone();
63 // update IDs and form names
65 clone.attr('id', 'mc_' + maxMatchCheck);
66 $("span.counter",clone).html(maxMatchCheck);
67 $("label",clone).each(function(){
68 var s = $(this).attr("for");
69 if (s.match(/mc_num/)) {
70 $(this).attr("for",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
74 $("div",clone).each(function(){
75 var s = $(this).attr("id");
76 if (s.match(/mc_num/)) {
77 $(this).attr("id",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
80 $("input",clone).each(function(){
81 var s = $(this).attr("id");
82 if(s.match(/mc_num/)){
83 $(this).attr("id",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
86 var s = $(this).attr("name");
87 if(s.match(/mc_num/)){
88 $(this).attr("name",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
91 $("#match_checks").append(clone);
94 function DeleteMatchpoint(loc) {
95 $(loc).parent().parent().parent().remove();
96 if($(".matchgroup",$("#match_points")).length == 0){
98 $("#addMatchPoint").show();
102 function DeleteMatchcheck(loc) {
103 $(loc).parent().parent().parent().remove();
104 if($(".matchgroup",$("#match_checks")).length == 0){
106 $("#addMatchCheck").show();
110 function DoCancel(f) {
112 document.Aform.submit();
115 function CheckMatchingRuleForm(f) {
119 if (f.code.value.length==0) {
120 _alertString += "\n- " + _("Matching rule code missing");
122 if (f.description.value.length==0) {
123 _alertString += "\n- " + _("Description missing");
125 if (f.threshold.value.length==0) {
126 _alertString += "\n- " + _("Threshold missing");
128 if (_alertString.length==0) {
129 document.Aform.submit();
131 alertString2 = _("Form not submitted because of the following problem(s)");
132 alertString2 += "\n------------------------------------------------------------------------------------\n";
133 alertString2 += _alertString;
138 function CheckRuleForm(f) {
142 if (f.sort_rule.value.length==0) {
143 _alertString += "\n- " + _("Filing rule code missing");
145 if (f.description.value.length==0) {
146 _alertString += "\n- " + _("Description missing");
148 if (f.sort_routine.value.length==0) {
149 _alertString += "\n- " + _("Sort routine missing");
151 if (_alertString.length==0) {
152 document.Aform.submit();
154 alertString2 = _("Form not submitted because of the following problem(s)");
155 alertString2 += "\n------------------------------------------------------------------------------------\n";
156 alertString2 += _alertString;
163 <style type="text/css">
164 fieldset.rows fieldset.rows { border-width : 0; }
165 fieldset.rows fieldset.rows fieldset.rows { border-width : 1px; }
166 fieldset, fieldset.rows { width : 90%; padding: .3em .6em .3em .6em; }
167 fieldset.rows fieldset {font-size:100%;}
168 div.matchgroup { border:1px solid #DDD; border-left-width: 15px; padding:.4em; margin-bottom:.6em;}
172 <!-- TMPL_INCLUDE NAME="header.inc" -->
173 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
175 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <!-- TMPL_IF name="display_list" -->Record Matching Rules<!-- TMPL_ELSE --><a href="/cgi-bin/koha/admin/matching-rules.pl">Record Matching Rules</a><!-- /TMPL_IF -->
176 <!-- TMPL_IF name="matching_rule_form" -->
177 <!-- TMPL_IF name="edit_matching_rule" -->
178 › Modify record matching rule
180 › Add record matching rule
183 <!-- TMPL_IF name="delete_matching_rule_form" -->
184 › Confirm deletion of record matching rule "<!-- TMPL_VAR name="code" -->"
188 <div id="doc3" class="yui-t2">
194 <!-- TMPL_IF name="matching_rule_form" -->
195 <!-- TMPL_IF name="edit_matching_rule" -->
196 <h2>Modify record matching rule</h2>
198 <h2>Add record matching rule</h2>
200 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
201 <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
202 <fieldset class="rows">
205 <!-- TMPL_IF name="edit_matching_rule" -->
206 <span class="label">Matching rule code: </span>
207 <input type="hidden" name="matcher_id" value="<!-- TMPL_VAR name="matcher_id" -->" />
208 <input type="hidden" name="code" value="<!-- TMPL_VAR name="code" -->" />
209 <!-- TMPL_VAR name="code" -->
211 <label for="code" class="required">Matching rule code: </label>
212 <input type="text" id="code" name="code" size="10" maxlength="10" /> <span class="required">Required</span>
215 <li><label for="description" class="required">Description: </label>
216 <input type="text" id="description" name="description" size="50" maxlength="250"
217 value="<!-- TMPL_VAR name="description" escape="HTML" -->" /> <span class="required">Required</span>
219 <li><label for="threshold" class="required">Match threshold: </label>
220 <input type="text" id="threshold" name="threshold" size="5" maxlength="5"
221 value="<!-- TMPL_VAR name="threshold" escape="HTML" -->" /> <span class="required">Required</span>
226 <fieldset class="rows" id="match_points">
227 <h4>Match points</h4>
228 <!-- TMPL_IF name="edit_matching_rule" -->
229 <!-- TMPL_IF NAME="matchpoints" --><p id="addMatchPoint" style="display:none;"><!-- TMPL_ELSE --><p id="addMatchPoint"><!-- /TMPL_IF --><a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a></p>
230 <!-- TMPL_ELSE --><p id="addMatchPoint" style="display:none;"><a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a></p><!-- /TMPL_IF -->
231 <!-- TMPL_IF name="edit_matching_rule" -->
232 <!-- TMPL_LOOP name="matchpoints" -->
233 <div id="mp_<!-- TMPL_VAR name="mp_num" -->" class="matchgroup">
234 <fieldset class="rows">
235 <legend>Match Point <!-- TMPL_VAR NAME="mp_num" --> | <a href="#" class="button" onclick="InsertMatchpoint('mp_<!-- TMPL_VAR NAME="mp_num" -->', 'mp_template'); return false;">Add match point</a> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
238 <label for="mp_<!-- TMPL_VAR name="mp_num" -->_search_index">Search index: </label>
239 <input type ="text" id="mp_<!-- TMPL_VAR name="mp_num" -->_search_index"
240 name="mp_<!-- TMPL_VAR name="mp_num" -->_search_index" size="20"
241 value="<!-- TMPL_VAR name="index" escape="HTML" -->"
245 <label for="mp_<!-- TMPL_VAR name="mp_num" -->_score">Score: </label>
246 <input type ="text" id="mp_<!-- TMPL_VAR name="mp_num" -->_score"
247 name="mp_<!-- TMPL_VAR name="mp_num" -->_score" size="5"
248 value="<!-- TMPL_VAR name="score" escape="HTML" -->"
252 <!-- TMPL_LOOP name="components" -->
253 <fieldset class="rows" id="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->">
254 <legend>Matchpoint components</legend>
257 <label for="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_tag">Tag: </label>
258 <input type="text" id="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_tag"
259 name="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_tag"
260 value="<!-- TMPL_VAR name="tag" escape="HTML" -->"
261 size="3" maxlength="3" />
264 <label for="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_subfields">Subfields: </label>
265 <input type="text" id="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_subfields"
266 name="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_subfields"
267 value="<!-- TMPL_VAR name="subfields" escape="HTML" -->"
268 size="10" maxlength="40" />
271 <label for="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_offset">Offset: </label>
272 <input type="text" id="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_offset"
273 name="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_offset"
274 value="<!-- TMPL_VAR name="offset" escape="HTML" -->"
275 size="5" maxlength="5" />
278 <label for="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_length">Length: </label>
279 <input type="text" id="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_length"
280 name="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_length"
281 value="<!-- TMPL_VAR name="length" escape="HTML" -->"
282 size="5" maxlength="5" />
284 <!-- TMPL_LOOP name="norms" -->
285 <li id="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num"-->">
286 <label for="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_n__<!-- TMPL_VAR name="norm_num"-->_norm">Normalization rule: </label>
287 <input type="text" id="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_n__<!-- TMPL_VAR name="norm_num"-->_norm"
288 name="mp_<!-- TMPL_VAR name="mp_num" -->_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num"-->_norm"
289 value="<!-- TMPL_VAR name="norm" escape="HTML" -->"
290 size="20" maxlength="50" />
297 <br style="clear:both;" />
303 <div id="mp_1" class="matchgroup">
304 <fieldset class="rows">
305 <legend>Match Point 1 | <a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
308 <label for="mp_1_search_index">Search index: </label>
309 <input type ="text" id="mp_1_search_index" name="mp_1_search_index" size="20"
313 <label for="mp_1_score">Score: </label>
314 <input type ="text" id="mp_1_score" name="mp_1_score" size="5" maxlength="5" />
317 <fieldset class="rows" id="mp_1_c_1">
318 <legend>Matchpoint components</legend>
321 <label for="mp_1_c_1_tag">Tag: </label>
322 <input type="text" id="mp_1_c_1_tag" name="mp_1_c_1_tag" size="3" maxlength="3" />
325 <label for="mp_1_c_1_subfields">Subfields: </label>
326 <input type="text" id="mp_1_c_1_subfields" name="mp_1_c_1_subfields" size="10" maxlength="40" />
329 <label for="mp_1_c_1_offset">Offset: </label>
330 <input type="text" id="mp_1_c_1_offset" name="mp_1_c_1_offset" size="5" maxlength="5" />
333 <label for="mp_1_c_1_length">Length: </label>
334 <input type="text" id="mp_1_c_1_length" name="mp_1_c_1_length" size="5" maxlength="5" />
336 <li id="mp_1_c_1_n_1">
337 <label for="mp_1_c_1_n_1_norm">Normalization rule: </label>
338 <input type="text" id="mp_1_c_1_n_1_norm" name="mp_1_c_1_n_1_norm" size="20" maxlength="50" />
343 <br style="clear:both;" />
349 <fieldset class="rows" id="match_checks">
350 <h4>Required match checks</h4>
351 <!-- TMPL_IF name="edit_matching_rule" -->
352 <!-- TMPL_IF NAME="matchchecks" --><p id="addMatchCheck" style="display:none;"><!-- TMPL_ELSE --><p id="addMatchCheck"><!-- /TMPL_IF --><a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p>
353 <!-- TMPL_ELSE --><p id="addMatchCheck" style="display:none;"><a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p><!-- /TMPL_IF -->
354 <!-- TMPL_IF name="edit_matching_rule" -->
355 <!-- TMPL_LOOP name="matchchecks" -->
356 <fieldset class="rows" id="mc_<!-- TMPL_VAR name="mc_num" -->">
357 <legend>Match check <!-- TMPL_VAR NAME="mc_num" --><a href="#" class="button" onclick="InsertMatchcheck('mc_<!-- TMPL_VAR NAME="mc_num" -->', 'mc_template'); return false;">Add match check</a> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
358 <input type="hidden" id="mc_<!-- TMPL_VAR name="mc_num" -->_id" name="mc_<!-- TMPL_VAR name="mc_num" -->_id" value="1" />
359 <!-- TMPL_LOOP name="src_components" -->
360 <fieldset class="rows" id="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->">
361 <legend>Source (incoming) record check field</legend>
364 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_tag">Tag: </label>
365 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_tag"
366 name="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_tag"
367 value="<!-- TMPL_VAR name="tag" escape="HTML" -->"
368 size="3" maxlength="3" />
371 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_subfields">Subfields: </label>
372 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_subfields"
373 name="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_subfields"
374 value="<!-- TMPL_VAR name="subfields" escape="HTML" -->"
375 size="10" maxlength="40" />
378 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_offset">Offset: </label>
379 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_offset"
380 name="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_offset"
381 value="<!-- TMPL_VAR name="offset" escape="HTML" -->"
382 size="5" maxlength="5" />
385 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_length">Length: </label>
386 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_length"
387 name="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_length"
388 value="<!-- TMPL_VAR name="length" escape="HTML" -->"
389 size="5" maxlength="5" />
391 <!-- TMPL_LOOP name="norms" -->
392 <li id="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->">
393 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->_norm">Normalization rule: </label>
394 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->_norm"
395 name="mc_<!-- TMPL_VAR name="mc_num" -->_src_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->_norm"
396 value="<!-- TMPL_VAR name="norm" escape="HTML" -->"
397 size="20" maxlength="50" />
403 <!-- TMPL_LOOP name="tgt_components" -->
404 <fieldset class="rows" id="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->">
405 <legend>Target (database) record check field</legend>
408 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_tag">Tag: </label>
409 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_tag"
410 name="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_tag"
411 value="<!-- TMPL_VAR name="tag" escape="HTML" -->"
412 size="3" maxlength="3" />
415 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_subfields">Subfields: </label>
416 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_subfields"
417 name="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_subfields"
418 value="<!-- TMPL_VAR name="subfields" escape="HTML" -->"
419 size="10" maxlength="40" />
422 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_offset">Offset: </label>
423 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_offset"
424 name="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_offset"
425 value="<!-- TMPL_VAR name="offset" escape="HTML" -->"
426 size="5" maxlength="5" />
429 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_length">Length: </label>
430 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_length"
431 name="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_length"
432 value="<!-- TMPL_VAR name="length" escape="HTML" -->"
433 size="5" maxlength="5" />
435 <!-- TMPL_LOOP name="norms" -->
436 <li id="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->">
437 <label for="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->_norm">Normalization rule: </label>
438 <input type="text" id="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->_norm"
439 name="mc_<!-- TMPL_VAR name="mc_num" -->_tgt_c_<!-- TMPL_VAR name="comp_num" -->_n_<!-- TMPL_VAR name="norm_num" -->_norm"
440 value="<!-- TMPL_VAR name="norm" escape="HTML" -->"
441 size="20" maxlength="50" />
450 <div id="mc_1" class="matchgroup">
451 <fieldset class="rows">
452 <legend>Match check 1 | <a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
453 <input type="hidden" id="mc_1_id" name="mc_1_id" value="1" />
454 <fieldset class="rows" id="mc_1_src_c_1">
455 <legend>Source (incoming) record check field</legend>
458 <label for="mc_1_src_c_1_tag">Tag: </label>
459 <input type="text" id="mc_1_src_c_1_tag" name="mc_1_src_c_1_tag" size="3" maxlength="3" />
462 <label for="mc_1_src_c_1_subfields">Subfields: </label>
463 <input type="text" id="mc_1_src_c_1_subfields" name="mc_1_src_c_1_subfields" size="10" maxlength="40" />
466 <label for="mc_1_src_c_1_offset">Offset: </label>
467 <input type="text" id="mc_1_src_c_1_offset" name="mc_1_src_c_1_offset" size="5" maxlength="5" />
470 <label for="mc_1_src_c_1_length">Length: </label>
471 <input type="text" id="mc_1_src_c_1_length" name="mc_1_src_c_1_length" size="5" maxlength="5" />
473 <li id="mc_1_src_c_1_n_1">
474 <label for="mc_1_src_c_1_n_1_norm">Normalization rule: </label>
475 <input type="text" id="mc_1_src_c_1_n_1_norm" name="mc_1_src_c_1_n_1_norm" size="20" maxlength="50" />
480 <fieldset class="rows" id="mc_1_tgt_c_1">
481 <legend>Target (database) record check field</legend>
484 <label for="mc_1_tgt_c_1_tag">Tag: </label>
485 <input type="text" id="mc_1_tgt_c_1_tag" name="mc_1_tgt_c_1_tag" size="3" maxlength="3" />
488 <label for="mc_1_tgt_c_1_subfields">Subfields: </label>
489 <input type="text" id="mc_1_tgt_c_1_subfields" name="mc_1_tgt_c_1_subfields" size="10" maxlength="40" />
492 <label for="mc_1_tgt_c_1_offset">Offset: </label>
493 <input type="text" id="mc_1_tgt_c_1_offset" name="mc_1_tgt_c_1_offset" size="5" maxlength="5" />
496 <label for="mc_1_tgt_c_1_length">Length: </label>
497 <input type="text" id="mc_1_tgt_c_1_length" name="mc_1_tgt_c_1_length" size="5" maxlength="5" />
499 <li id="mc_1_tgt_c_1_n_1">
500 <label for="mc_1_tgt_c_1_n_1_norm">Normalization rule: </label>
501 <input type="text" id="mc_1_tgt_c_1_n_1_norm" name="mc_1_tgt_c_1_n_1_norm" size="20" maxlength="50" />
506 <br style="clear:both;" />
510 <fieldset class="action">
511 <!-- TMPL_IF name="edit_matching_rule" -->
512 <input type="button" value="Save"
513 onclick="CheckMatchingRuleForm(this.form)" />
515 <input type="button" value="Save"
516 onclick="CheckMatchingRuleForm(this.form)" />
518 <a class="cancel" href="/cgi-bin/koha/admin/matching-rules.pl">Cancel</a>
523 <!-- TMPL_IF name="delete_matching_rule_form" -->
524 <div class="dialog alert"><h3>Confirm deletion of record matching rule <span class="ex">'<!-- TMPL_VAR name="code" -->' (<!-- TMPL_VAR name="description" -->)</span>?</h3>
525 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
526 <input type="hidden" name="op" value="<!-- TMPL_VAR name="confirm_op"-->" />
527 <input type="hidden" name="matcher_id" value="<!-- TMPL_VAR name="matcher_id" -->" />
528 <input type="submit" value="Delete record matching rule" class="approve" /></form>
529 <form action="<!-- TMPL_VAR name="script_name" -->" method="get">
530 <input type="submit" value="No, Do Not Delete" class="deny" />
534 <!-- TMPL_IF name="display_list" -->
537 <script type="text/javascript">
539 // prepare DOM for YUI Toolbar
540 $(document).ready(function() {
543 // YUI Toolbar Functions
544 function yuiToolbar() {
545 new YAHOO.widget.Button("newrule");
549 <li><a id="newrule" href="<!-- TMPL_VAR name="script_name" -->?op=add_matching_rule">New Record Matching Rule</a></li>
552 <h2>Record Matching Rules</h2>
553 <!-- TMPL_IF name="added_matching_rule" -->
554 <div class="dialog message">Added record matching rule "<!-- TMPL_VAR name="added_matching_rule" -->"</div>
556 <!-- TMPL_IF name="edited_matching_rule" -->
557 <div class="dialog message">Modified record matching rule "<!-- TMPL_VAR name="edited_matching_rule" -->"</div>
559 <!-- TMPL_IF name="deleted_matching_rule" -->
560 <div class="dialog message">Deleted record matching rule "<!-- TMPL_VAR name="deleted_matching_rule" -->"</div>
562 <!-- TMPL_IF NAME="available_matching_rules" --><table>
569 <!-- TMPL_LOOP name="available_matching_rules" -->
571 <td><!-- TMPL_VAR name="matcher_id" --></td>
572 <td><!-- TMPL_VAR name="code" --></td>
573 <td><!-- TMPL_VAR name="description" --></td>
575 <a href="<!-- TMPL_VAR name="script_name" -->?op=edit_matching_rule&matcher_id=<!-- TMPL_VAR name="matcher_id" escape="HTML" -->">Edit</a>
576 <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_matching_rule&matcher_id=<!-- TMPL_VAR name="matcher_id" escape="HTML" -->">Delete</a>
580 </table><!-- TMPL_ELSE --><p>There are no saved matching rules.</p><!-- /TMPL_IF -->
582 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
585 <!-- TMPL_IF name="matching_rule_form" -->
586 <div id="mp_template" class="matchgroup" style="display:none;">
587 <fieldset class="rows">
588 <legend>Match point <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
591 <label for="mp_num_search_index">Search index: </label>
592 <input type ="text" id="mp_num_search_index" name="mp_num_search_index" size="20"
596 <label for="mp_num_score">Score: </label>
597 <input type ="text" id="mp_num_score" name="mp_num_score" size="5" maxlength="5" />
600 <fieldset id="mp_num_c_1" class="rows">
601 <legend>Matchpoint components</legend>
604 <label for="mp_num_c_1_tag">Tag: </label>
605 <input type="text" id="mp_num_c_1_tag" name="mp_num_c_1_tag" size="3" maxlength="3" />
608 <label for="mp_num_c_1_subfields">Subfields: </label>
609 <input type="text" id="mp_num_c_1_subfields" name="mp_num_c_1_subfields" size="10" maxlength="40" />
612 <label for="mp_num_c_1_offset">Offset: </label>
613 <input type="text" id="mp_num_c_1_offset" name="mp_num_c_1_offset" size="5" maxlength="5" />
616 <label for="mp_num_c_1_length">Length: </label>
617 <input type="text" id="mp_num_c_1_length" name="mp_num_c_1_length" size="5" maxlength="5" />
619 <li id="mp_num_c_1_n_1">
620 <label for="mp_num_c_1_n_1_norm">Normalization rule: </label>
621 <input type="text" id="mp_num_c_1_n_1_norm" name="mp_num_c_1_n_1_norm" size="20" maxlength="50" />
626 <br style="clear:both;" />
629 <div id="mc_template" class="matchgroup" style="display:none">
630 <fieldset class="rows">
631 <legend>Match check <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
632 <input type="hidden" id="mc_num_id" name="mc_num_id" value="1" />
633 <fieldset class="rows" id="mc_num_src_c_1">
634 <legend>Source (incoming) record check field</legend>
637 <label for="mc_num_src_c_1_tag">Tag: </label>
638 <input type="text" id="mc_num_src_c_1_tag" name="mc_num_src_c_1_tag" size="3" maxlength="3" />
641 <label for="mc_num_src_c_1_subfields">Subfields: </label>
642 <input type="text" id="mc_num_src_c_1_subfields" name="mc_num_src_c_1_subfields" size="10" maxlength="40" />
645 <label for="mc_num_src_c_1_offset">Offset: </label>
646 <input type="text" id="mc_num_src_c_1_offset" name="mc_num_src_c_1_offset" size="5" maxlength="5" />
649 <label for="mc_num_src_c_1_length">Length: </label>
650 <input type="text" id="mc_num_src_c_1_length" name="mc_num_src_c_1_length" size="5" maxlength="5" />
652 <li id="mc_num_src_c_1_n_1">
653 <label for="mc_num_src_c_1_n_1_norm">Normalization rule: </label>
654 <input type="text" id="mc_num_src_c_1_n_1_norm" name="mc_num_src_c_1_n_1_norm" size="20" maxlength="50" />
658 <fieldset class="rows" id="mc_num_tgt_c_1">
659 <legend>Target (database) record check field</legend>
662 <label for="mc_num_tgt_c_1_tag">Tag: </label>
663 <input type="text" id="mc_num_tgt_c_1_tag" name="mc_num_tgt_c_1_tag" size="3" maxlength="3" />
666 <label for="mc_num_tgt_c_1_subfields">Subfields: </label>
667 <input type="text" id="mc_num_tgt_c_1_subfields" name="mc_num_tgt_c_1_subfields" size="10" maxlength="40" />
670 <label for="mc_num_tgt_c_1_offset">Offset: </label>
671 <input type="text" id="mc_num_tgt_c_1_offset" name="mc_num_tgt_c_1_offset" size="5" maxlength="5" />
674 <label for="mc_num_tgt_c_1_length">Length: </label>
675 <input type="text" id="mc_num_tgt_c_1_length" name="mc_num_tgt_c_1_length" size="5" maxlength="5" />
677 <li id="mc_num_tgt_c_1_n_1">
678 <label for="mc_num_tgt_c_1_n_1_norm">Normalization rule: </label>
679 <input type="text" id="mc_num_tgt_c_1_n_1_norm" name="mc_num_tgt_c_1_n_1_norm" size="20" maxlength="50" />
684 <br style="clear:both;" />
691 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
694 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->