1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Record matching rules
3 [% IF ( matching_rule_form ) %]
4 [% IF ( edit_matching_rule ) %]
5 › Modify record matching rule
7 › Add record matching rule
10 [% IF ( delete_matching_rule_form ) %]
11 › Confirm deletion of record matching rule "[% code %]"
14 [% INCLUDE 'doc-head-close.inc' %]
16 [% BLOCK norms_text %]
19 [% CASE 'remove_spaces' %]Remove spaces
20 [% CASE 'upper_case' %]Uppercase
21 [% CASE 'lower_case' %]Lowercase
22 [% CASE 'legacy_default' %]Legacy default
27 [% BLOCK norms_options %]
28 [%# PARAMS: selected_norm %]
29 [% FOREACH norm IN valid_norms %]
30 [% IF ( norm == selected_norm ) %]
31 <option value="[% norm %]" selected="selected">[% PROCESS norms_text norm=norm %]</option>
33 <option value="[% norm %]">[% PROCESS norms_text norm=norm %]</option>
38 [% BLOCK norms_select %]
39 [%# PARAMS: selected_norm, id, name %]
40 [% UNLESS valid_norms.grep(selected_norm).size %]
41 [%# Fallback to 'none' %]
42 [% selected_norm = 'none' %]
44 <select id="[% id %]" name="[% name %]">
45 [% PROCESS norms_options selected_norm=selected_norm %]
49 <script type="text/javascript">
52 var maxMatchPoint = [% max_matchpoint %];
53 var maxMatchCheck = [% max_matchcheck %];
55 function InsertMatchpoint(loc, index) {
56 var original= $("#"+index);
57 var clone = original.clone();
60 // update IDs and form names
62 clone.attr('id', 'mp_' + maxMatchPoint);
63 $("span.counter",clone).html(maxMatchPoint);
64 $("label",clone).each(function(){
65 var s = $(this).attr("for");
66 if (s.match(/mp_num/)) {
67 $(this).attr("for",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
71 $("div",clone).each(function(){
72 var s = $(this).attr("id");
73 if (s.match(/mp_num/)) {
74 $(this).attr("id",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
77 $("input",clone).each(function(){
78 var s = $(this).attr("id");
79 if(s.match(/mp_num/)){
80 $(this).attr("id",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
83 var s = $(this).attr("name");
84 if(s.match(/mp_num/)){
85 $(this).attr("name",s.replace(/mp_num/, 'mp_' + maxMatchPoint));
88 $("#match_points").append(clone);
91 function InsertMatchcheck(loc, index) {
92 var original= $("#"+index);
93 var clone = original.clone();
96 // update IDs and form names
98 clone.attr('id', 'mc_' + maxMatchCheck);
99 $("span.counter",clone).html(maxMatchCheck);
100 $("label",clone).each(function(){
101 var s = $(this).attr("for");
102 if (s.match(/mc_num/)) {
103 $(this).attr("for",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
107 $("div",clone).each(function(){
108 var s = $(this).attr("id");
109 if (s.match(/mc_num/)) {
110 $(this).attr("id",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
113 $("input",clone).each(function(){
114 var s = $(this).attr("id");
115 if(s.match(/mc_num/)){
116 $(this).attr("id",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
119 var s = $(this).attr("name");
120 if(s.match(/mc_num/)){
121 $(this).attr("name",s.replace(/mc_num/, 'mc_' + maxMatchCheck));
124 $("#match_checks").append(clone);
127 function DeleteMatchpoint(loc) {
128 $(loc).parent().parent().parent().remove();
129 if($(".matchgroup",$("#match_points")).length == 0){
131 $("#addMatchPoint").show();
135 function DeleteMatchcheck(loc) {
136 $(loc).parent().parent().parent().remove();
137 if($(".matchgroup",$("#match_checks")).length == 0){
139 $("#addMatchCheck").show();
143 function DoCancel(f) {
145 document.Aform.submit();
148 function CheckMatchingRuleForm(f) {
152 if (f.code.value.length==0) {
153 _alertString += "\n- " + _("Matching rule code missing");
155 if (f.description.value.length==0) {
156 _alertString += "\n- " + _("Description missing");
158 if (f.threshold.value.length==0) {
159 _alertString += "\n- " + _("Threshold missing");
161 if (_alertString.length==0) {
162 document.Aform.submit();
164 alertString2 = _("Form not submitted because of the following problem(s)");
165 alertString2 += "\n------------------------------------------------------------------------------------\n";
166 alertString2 += _alertString;
171 function CheckRuleForm(f) {
175 if (f.sort_rule.value.length==0) {
176 _alertString += "\n- " + _("Filing rule code missing");
178 if (f.description.value.length==0) {
179 _alertString += "\n- " + _("Description missing");
181 if (f.sort_routine.value.length==0) {
182 _alertString += "\n- " + _("Sort routine missing");
184 if (_alertString.length==0) {
185 document.Aform.submit();
187 alertString2 = _("Form not submitted because of the following problem(s)");
188 alertString2 += "\n------------------------------------------------------------------------------------\n";
189 alertString2 += _alertString;
196 <style type="text/css">
197 fieldset.rows fieldset.rows { border-width : 0; }
198 fieldset.rows fieldset.rows fieldset.rows { border-width : 1px; }
199 fieldset, fieldset.rows { width : 90%; padding: .3em .6em .3em .6em; }
200 fieldset.rows fieldset {font-size:100%;}
201 div.matchgroup { border:1px solid #DDD; border-left-width: 15px; padding:.4em; margin-bottom:.6em;}
204 <body id="admin_matching-rules" class="admin">
205 [% INCLUDE 'header.inc' %]
206 [% INCLUDE 'prefs-admin-search.inc' %]
208 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( display_list ) %]Record matching rules[% ELSE %]<a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a>[% END %]
209 [% IF ( matching_rule_form ) %]
210 [% IF ( edit_matching_rule ) %]
211 › Modify record matching rule
213 › Add record matching rule
216 [% IF ( delete_matching_rule_form ) %]
217 › Confirm deletion of record matching rule "[% code %]"
221 <div id="doc3" class="yui-t2">
227 [% IF ( matching_rule_form ) %]
228 [% IF ( edit_matching_rule ) %]
229 <h2>Modify record matching rule</h2>
231 <h2>Add record matching rule</h2>
233 <form action="[% script_name %]" name="Aform" method="post">
234 <input type="hidden" name="op" value="[% confirm_op %]" />
235 <fieldset class="rows">
238 [% IF ( edit_matching_rule ) %]
239 <span class="label">Matching rule code: </span>
240 <input type="hidden" name="matcher_id" value="[% matcher_id %]" />
241 <input type="hidden" name="code" value="[% code %]" />
244 <label for="code" class="required">Matching rule code: </label>
245 <input type="text" id="code" name="code" size="10" maxlength="10" /> <span class="required">Required</span>
248 <li><label for="description" class="required">Description: </label>
249 <input type="text" id="description" name="description" size="50" maxlength="250"
250 value="[% description |html %]" /> <span class="required">Required</span>
252 <li><label for="threshold" class="required">Match threshold: </label>
253 <input type="text" id="threshold" name="threshold" size="5" maxlength="5"
254 value="[% threshold |html %]" /> <span class="required">Required</span>
256 <li><label for="record_type" class="required">Record type: </label>
257 <select id="record_type" name="record_type">
258 [% IF ( record_type == "authority" ) %]
259 <option value="biblio">Bibliographic record</option>
260 <option value="authority" selected="selected">Authority record</option>
262 <option value="biblio" selected="selected">Bibliographic record</option>
263 <option value="authority">Authority record</option>
265 </select><span class="required">Required</span>
270 <fieldset class="rows" id="match_points">
271 <h4>Match points</h4>
272 [% IF ( edit_matching_rule ) %]
273 [% IF ( matchpoints ) %]<p id="addMatchPoint" style="display:none;">[% ELSE %]<p id="addMatchPoint">[% END %]<a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a></p>
274 [% ELSE %]<p id="addMatchPoint" style="display:none;"><a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a></p>[% END %]
275 [% IF ( edit_matching_rule ) %]
276 [% FOREACH matchpoint IN matchpoints %]
277 <div id="mp_[% matchpoint.mp_num %]" class="matchgroup">
278 <fieldset class="rows">
279 <legend>Match point [% matchpoint.mp_num %] | <a href="#" class="button" onclick="InsertMatchpoint('mp_[% matchpoint.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>
282 <label for="mp_[% matchpoint.mp_num %]_search_index">Search index: </label>
283 <input type ="text" id="mp_[% matchpoint.mp_num %]_search_index"
284 name="mp_[% matchpoint.mp_num %]_search_index" size="20"
285 value="[% matchpoint.index |html %]"
289 <label for="mp_[% matchpoint.mp_num %]_score">Score: </label>
290 <input type ="text" id="mp_[% matchpoint.mp_num %]_score"
291 name="mp_[% matchpoint.mp_num %]_score" size="5"
292 value="[% matchpoint.score |html %]"
296 [% FOREACH component IN matchpoint.components %]
297 <fieldset class="rows" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]">
298 <legend>Matchpoint components</legend>
301 <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_tag">Tag: </label>
302 <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_tag"
303 name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_tag"
304 value="[% component.tag |html %]"
305 size="3" maxlength="3" />
308 <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_subfields">Subfields: </label>
309 <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_subfields"
310 name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_subfields"
311 value="[% component.subfields |html %]"
312 size="10" maxlength="40" />
315 <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_offset">Offset: </label>
316 <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_offset"
317 name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_offset"
318 value="[% component.offset |html %]"
319 size="5" maxlength="5" />
322 <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_length">Length: </label>
323 <input type="text" id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_length"
324 name="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_length"
325 value="[% component.length |html %]"
326 size="5" maxlength="5" />
328 [% FOREACH norm IN component.norms %]
329 <li id="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_n_[% norm.norm_num %]">
330 <label for="mp_[% matchpoint.mp_num %]_c_[% component.comp_num %]_n__[% norm.norm_num %]_norm">Normalization rule: </label>
331 [% PROCESS norms_select
332 selected_norm=norm.norm
333 id="mp_${norm.mp_num}_c_${component.comp_num}_n__${norm.norm_num}_norm"
334 name="mp_${matchpoint.mp_num}_c_${component.comp_num}_n_${norm.norm_num}_norm"
342 <br style="clear:both;" />
348 <div id="mp_1" class="matchgroup">
349 <fieldset class="rows">
350 <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>
353 <label for="mp_1_search_index">Search index: </label>
354 <input type ="text" id="mp_1_search_index" name="mp_1_search_index" size="20"
358 <label for="mp_1_score">Score: </label>
359 <input type ="text" id="mp_1_score" name="mp_1_score" size="5" maxlength="5" />
362 <fieldset class="rows" id="mp_1_c_1">
363 <legend>Matchpoint components</legend>
366 <label for="mp_1_c_1_tag">Tag: </label>
367 <input type="text" id="mp_1_c_1_tag" name="mp_1_c_1_tag" size="3" maxlength="3" />
370 <label for="mp_1_c_1_subfields">Subfields: </label>
371 <input type="text" id="mp_1_c_1_subfields" name="mp_1_c_1_subfields" size="10" maxlength="40" />
374 <label for="mp_1_c_1_offset">Offset: </label>
375 <input type="text" id="mp_1_c_1_offset" name="mp_1_c_1_offset" size="5" maxlength="5" />
378 <label for="mp_1_c_1_length">Length: </label>
379 <input type="text" id="mp_1_c_1_length" name="mp_1_c_1_length" size="5" maxlength="5" />
381 <li id="mp_1_c_1_n_1">
382 <label for="mp_1_c_1_n_1_norm">Normalization rule: </label>
383 [% PROCESS norms_select
385 id="mp_1_c_1_n_1_norm"
386 name="mp_1_c_1_n_1_norm"
392 <br style="clear:both;" />
398 <fieldset class="rows" id="match_checks">
399 <h4>Required match checks</h4>
400 [% IF ( edit_matching_rule ) %]
401 [% IF ( matchchecks ) %]<p id="addMatchCheck" style="display:none;">[% ELSE %]<p id="addMatchCheck">[% END %]<a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p>
402 [% ELSE %]<p id="addMatchCheck" style="display:none;"><a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p>[% END %]
403 [% IF ( edit_matching_rule ) %]
404 [% FOREACH matchcheck IN matchchecks %]
405 <div id="mc_[% matchcheck.mc_num %]" class="matchgroup">
406 <fieldset class="rows">
407 <legend>Match check [% matchcheck.mc_num %]<a href="#" class="button" onclick="InsertMatchcheck('mc_[% matchcheck.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>
408 <input type="hidden" id="mc_[% matchcheck.mc_num %]_id" name="mc_[% matchcheck.mc_num %]_id" value="1" />
409 [% FOREACH src_component IN matchcheck.src_components %]
410 <fieldset class="rows" id="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]">
411 <legend>Source (incoming) record check field</legend>
414 <label for="mc_[% src_component.mc_num %]_src_c_[% src_component.comp_num %]_tag">Tag: </label>
415 <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_tag"
416 name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_tag"
417 value="[% src_component.tag |html %]"
418 size="3" maxlength="3" />
421 <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_subfields">Subfields: </label>
422 <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_subfields"
423 name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_subfields"
424 value="[% src_component.subfields |html %]"
425 size="10" maxlength="40" />
428 <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_offset">Offset: </label>
429 <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_offset"
430 name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_offset"
431 value="[% src_component.offset |html %]"
432 size="5" maxlength="5" />
435 <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_length">Length: </label>
436 <input type="text" id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_length"
437 name="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_length"
438 value="[% src_component.length |html %]"
439 size="5" maxlength="5" />
441 [% FOREACH norm IN src_component.norms %]
442 <li id="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]">
443 <label for="mc_[% matchcheck.mc_num %]_src_c_[% src_component.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label>
444 [% PROCESS norms_select
445 selected_norm=norm.norm
446 id="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm"
447 name="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm"
454 [% FOREACH tgt_component IN matchcheck.tgt_components %]
455 <fieldset class="rows" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]">
456 <legend>Target (database) record check field</legend>
459 <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag">Tag: </label>
460 <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag"
461 name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_tag"
462 value="[% tgt_component.tag |html %]"
463 size="3" maxlength="3" />
466 <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields">Subfields: </label>
467 <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields"
468 name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_subfields"
469 value="[% tgt_component.subfields |html %]"
470 size="10" maxlength="40" />
473 <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset">Offset: </label>
474 <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset"
475 name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_offset"
476 value="[% tgt_component.offset |html %]"
477 size="5" maxlength="5" />
480 <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length">Length: </label>
481 <input type="text" id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length"
482 name="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_length"
483 value="[% tgt_component.length |html %]"
484 size="5" maxlength="5" />
486 [% FOREACH norm IN tgt_component.norms %]
487 <li id="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]">
488 <label for="mc_[% matchcheck.mc_num %]_tgt_c_[% tgt_component.comp_num %]_n_[% norm.norm_num %]_norm">Normalization rule: </label>
489 [% PROCESS norms_select
490 selected_norm=norm.norm
491 id="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm"
492 name="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm"
500 <br style="clear:both;" />
504 <div id="mc_1" class="matchgroup">
505 <fieldset class="rows">
506 <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>
507 <input type="hidden" id="mc_1_id" name="mc_1_id" value="1" />
508 <fieldset class="rows" id="mc_1_src_c_1">
509 <legend>Source (incoming) record check field</legend>
512 <label for="mc_1_src_c_1_tag">Tag: </label>
513 <input type="text" id="mc_1_src_c_1_tag" name="mc_1_src_c_1_tag" size="3" maxlength="3" />
516 <label for="mc_1_src_c_1_subfields">Subfields: </label>
517 <input type="text" id="mc_1_src_c_1_subfields" name="mc_1_src_c_1_subfields" size="10" maxlength="40" />
520 <label for="mc_1_src_c_1_offset">Offset: </label>
521 <input type="text" id="mc_1_src_c_1_offset" name="mc_1_src_c_1_offset" size="5" maxlength="5" />
524 <label for="mc_1_src_c_1_length">Length: </label>
525 <input type="text" id="mc_1_src_c_1_length" name="mc_1_src_c_1_length" size="5" maxlength="5" />
527 <li id="mc_1_src_c_1_n_1">
528 <label for="mc_1_src_c_1_n_1_norm">Normalization rule: </label>
529 [% PROCESS norms_select
531 id="mc_1_src_c_1_n_1_norm"
532 name="mc_1_src_c_1_n_1_norm"
538 <fieldset class="rows" id="mc_1_tgt_c_1">
539 <legend>Target (database) record check field</legend>
542 <label for="mc_1_tgt_c_1_tag">Tag: </label>
543 <input type="text" id="mc_1_tgt_c_1_tag" name="mc_1_tgt_c_1_tag" size="3" maxlength="3" />
546 <label for="mc_1_tgt_c_1_subfields">Subfields: </label>
547 <input type="text" id="mc_1_tgt_c_1_subfields" name="mc_1_tgt_c_1_subfields" size="10" maxlength="40" />
550 <label for="mc_1_tgt_c_1_offset">Offset: </label>
551 <input type="text" id="mc_1_tgt_c_1_offset" name="mc_1_tgt_c_1_offset" size="5" maxlength="5" />
554 <label for="mc_1_tgt_c_1_length">Length: </label>
555 <input type="text" id="mc_1_tgt_c_1_length" name="mc_1_tgt_c_1_length" size="5" maxlength="5" />
557 <li id="mc_1_tgt_c_1_n_1">
558 <label for="mc_1_tgt_c_1_n_1_norm">Normalization rule: </label>
559 [% PROCESS norms_select
561 id="mc_1_tgt_c_1_n_1_norm"
562 name="mc_1_tgt_c_1_n_1_norm"
568 <br style="clear:both;" />
572 <fieldset class="action">
573 [% IF ( edit_matching_rule ) %]
574 <input type="button" value="Save"
575 onclick="CheckMatchingRuleForm(this.form)" />
577 <input type="button" value="Save"
578 onclick="CheckMatchingRuleForm(this.form)" />
580 <a class="cancel" href="/cgi-bin/koha/admin/matching-rules.pl">Cancel</a>
585 [% IF ( delete_matching_rule_form ) %]
586 <div class="dialog alert">
587 <h3>Confirm deletion of record matching rule <span class="ex">'[% code %]' ([% description %])</span>?</h3>
588 <form action="[% script_name %]" name="Aform" method="post">
589 <input type="hidden" name="op" value="[% confirm_op %]" />
590 <input type="hidden" name="matcher_id" value="[% matcher_id %]" />
591 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete record matching rule</button>
593 <form action="[% script_name %]" method="get">
594 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
599 [% IF ( display_list ) %]
601 <div id="toolbar" class="btn-toolbar">
602 <a class="btn btn-default btn-sm" id="newrule" href="[% script_name %]?op=add_matching_rule"><i class="fa fa-plus"></i> New record matching rule</a>
605 <h2>Record matching rules</h2>
606 [% IF ( added_matching_rule ) %]
607 <div class="dialog message">Added record matching rule "[% added_matching_rule %]"</div>
609 [% IF ( edited_matching_rule ) %]
610 <div class="dialog message">Modified record matching rule "[% edited_matching_rule %]"</div>
612 [% IF ( deleted_matching_rule ) %]
613 <div class="dialog message">Deleted record matching rule "[% deleted_matching_rule %]"</div>
615 [% IF ( available_matching_rules ) %]<table>
622 [% FOREACH available_matching_rule IN available_matching_rules %]
624 <td>[% available_matching_rule.matcher_id %]</td>
625 <td>[% available_matching_rule.code %]</td>
626 <td>[% available_matching_rule.description %]</td>
628 <a class="btn btn-default btn-xs" href="[% available_matching_rule.script_name %]?op=edit_matching_rule&matcher_id=[% available_matching_rule.matcher_id |html %]"><i class="fa fa-pencil"></i> Edit</a>
629 <a class="btn btn-default btn-xs" href="[% available_matching_rule.script_name %]?op=delete_matching_rule&matcher_id=[% available_matching_rule.matcher_id |html %]"><i class="fa fa-trash"></i> Delete</a>
633 </table>[% ELSE %]<p>There are no saved matching rules.</p>[% END %]
635 <div class="pages">[% pagination_bar %]</div>
638 [% IF ( matching_rule_form ) %]
639 <div id="mp_template" class="matchgroup" style="display:none;">
640 <fieldset class="rows">
641 <legend>Match point <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
644 <label for="mp_num_search_index">Search index: </label>
645 <input type ="text" id="mp_num_search_index" name="mp_num_search_index" size="20"
649 <label for="mp_num_score">Score: </label>
650 <input type ="text" id="mp_num_score" name="mp_num_score" size="5" maxlength="5" />
653 <fieldset id="mp_num_c_1" class="rows">
654 <legend>Matchpoint components</legend>
657 <label for="mp_num_c_1_tag">Tag: </label>
658 <input type="text" id="mp_num_c_1_tag" name="mp_num_c_1_tag" size="3" maxlength="3" />
661 <label for="mp_num_c_1_subfields">Subfields: </label>
662 <input type="text" id="mp_num_c_1_subfields" name="mp_num_c_1_subfields" size="10" maxlength="40" />
665 <label for="mp_num_c_1_offset">Offset: </label>
666 <input type="text" id="mp_num_c_1_offset" name="mp_num_c_1_offset" size="5" maxlength="5" />
669 <label for="mp_num_c_1_length">Length: </label>
670 <input type="text" id="mp_num_c_1_length" name="mp_num_c_1_length" size="5" maxlength="5" />
672 <li id="mp_num_c_1_n_1">
673 <label for="mp_num_c_1_n_1_norm">Normalization rule: </label>
674 [% PROCESS norms_select
676 id="mp_num_c_1_n_1_norm"
677 name="mp_num_c_1_n_1_norm"
683 <br style="clear:both;" />
686 <div id="mc_template" class="matchgroup" style="display:none">
687 <fieldset class="rows">
688 <legend>Match check <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
689 <input type="hidden" id="mc_num_id" name="mc_num_id" value="1" />
690 <fieldset class="rows" id="mc_num_src_c_1">
691 <legend>Source (incoming) record check field</legend>
694 <label for="mc_num_src_c_1_tag">Tag: </label>
695 <input type="text" id="mc_num_src_c_1_tag" name="mc_num_src_c_1_tag" size="3" maxlength="3" />
698 <label for="mc_num_src_c_1_subfields">Subfields: </label>
699 <input type="text" id="mc_num_src_c_1_subfields" name="mc_num_src_c_1_subfields" size="10" maxlength="40" />
702 <label for="mc_num_src_c_1_offset">Offset: </label>
703 <input type="text" id="mc_num_src_c_1_offset" name="mc_num_src_c_1_offset" size="5" maxlength="5" />
706 <label for="mc_num_src_c_1_length">Length: </label>
707 <input type="text" id="mc_num_src_c_1_length" name="mc_num_src_c_1_length" size="5" maxlength="5" />
709 <li id="mc_num_src_c_1_n_1">
710 <label for="mc_num_src_c_1_n_1_norm">Normalization rule: </label>
711 [% PROCESS norms_select
713 id="mc_num_src_c_1_n_1_norm"
714 name="mc_num_src_c_1_n_1_norm"
719 <fieldset class="rows" id="mc_num_tgt_c_1">
720 <legend>Target (database) record check field</legend>
723 <label for="mc_num_tgt_c_1_tag">Tag: </label>
724 <input type="text" id="mc_num_tgt_c_1_tag" name="mc_num_tgt_c_1_tag" size="3" maxlength="3" />
727 <label for="mc_num_tgt_c_1_subfields">Subfields: </label>
728 <input type="text" id="mc_num_tgt_c_1_subfields" name="mc_num_tgt_c_1_subfields" size="10" maxlength="40" />
731 <label for="mc_num_tgt_c_1_offset">Offset: </label>
732 <input type="text" id="mc_num_tgt_c_1_offset" name="mc_num_tgt_c_1_offset" size="5" maxlength="5" />
735 <label for="mc_num_tgt_c_1_length">Length: </label>
736 <input type="text" id="mc_num_tgt_c_1_length" name="mc_num_tgt_c_1_length" size="5" maxlength="5" />
738 <li id="mc_num_tgt_c_1_n_1">
739 <label for="mc_num_tgt_c_1_n_1_norm">Normalization rule: </label>
740 [% PROCESS norms_select
742 id="mc_num_tgt_c_1_n_1_norm"
743 name="mc_num_tgt_c_1_n_1_norm"
749 <br style="clear:both;" />
756 [% INCLUDE 'admin-menu.inc' %]
759 [% INCLUDE 'intranet-bottom.inc' %]