Lines 3-8
Link Here
|
3 |
[% USE Asset %] |
3 |
[% USE Asset %] |
4 |
[% USE Koha %] |
4 |
[% USE Koha %] |
5 |
[% USE KohaSpan %] |
5 |
[% USE KohaSpan %] |
|
|
6 |
[% USE Categories %] |
6 |
[% PROCESS 'i18n.inc' %] |
7 |
[% PROCESS 'i18n.inc' %] |
7 |
[% PROCESS 'i18n.inc' %] |
8 |
[% PROCESS 'i18n.inc' %] |
8 |
[% SET footerjs = 1 %] |
9 |
[% SET footerjs = 1 %] |
Lines 99-105
Link Here
|
99 |
<th> |
100 |
<th> |
100 |
<select name="module"> |
101 |
<select name="module"> |
101 |
<option value="source">Source</option> |
102 |
<option value="source">Source</option> |
102 |
<option value="categorycode">User category</option> |
103 |
<option value="categorycode">Patron category</option> |
103 |
<option value="userid">Username</option> |
104 |
<option value="userid">Username</option> |
104 |
</select> |
105 |
</select> |
105 |
</th> |
106 |
</th> |
Lines 231-238
Link Here
|
231 |
<td></td> |
232 |
<td></td> |
232 |
[% ELSE %] |
233 |
[% ELSE %] |
233 |
<td>[% rule.id | html %]</td> |
234 |
<td>[% rule.id | html %]</td> |
234 |
<td class="rule-module">[% rule.module | html %]</td> |
235 |
<td class="rule-module"> |
235 |
<td class="rule-filter">[% rule.filter | html %]</td> |
236 |
[% SWITCH rule.module %] |
|
|
237 |
[% CASE 'source' %]<span>Source</span> |
238 |
[% CASE 'categorycode' %]<span>Patron category</span> |
239 |
[% CASE 'userid' %]<span>Username</span> |
240 |
[% CASE %]<span>[% rule.module | html %]</span> |
241 |
[% END %] |
242 |
</td> |
243 |
<td class="rule-filter"> |
244 |
[% IF rule.module == "source" %] |
245 |
[% SWITCH rule.filter %] |
246 |
[% CASE 'batchmod' %]<span>Batch record modification</span> |
247 |
[% CASE 'intranet' %]<span>Staff interface MARC editor</span> |
248 |
[% CASE 'batchimport' %]<span>Staged MARC import</span> |
249 |
[% CASE 'z3950' %]<span>Z39.50</span> |
250 |
[% CASE 'bulkmarkimport' %]<span>bulkmarkimport.pl</span> |
251 |
[% CASE 'import_lexile' %]<span>import_lexile.pl</span> |
252 |
[% CASE %]<span>[% rule.filter | html %]</span> |
253 |
[% END %] |
254 |
[% ELSIF rule.module == "categorycode" %] |
255 |
[% IF rule.filter != "*" %] |
256 |
[% Categories.GetName( rule.filter ) | html %] |
257 |
[% ELSE %] |
258 |
[% rule.filter %] |
259 |
[% END %] |
260 |
[% ELSE %] |
261 |
[% rule.filter | html %] |
262 |
[% END %] |
263 |
</td> |
236 |
<td>[% rule.tag | html %]</td> |
264 |
<td>[% rule.tag | html %]</td> |
237 |
<td class="rule-preset"></td> |
265 |
<td class="rule-preset"></td> |
238 |
<td class="rule-operation-action" data-operation="add">[% IF rule.add %]Add[% ELSE %]Skip[% END %]</td> |
266 |
<td class="rule-operation-action" data-operation="add">[% IF rule.add %]Add[% ELSE %]Skip[% END %]</td> |
Lines 371-401
Link Here
|
371 |
})); |
399 |
})); |
372 |
|
400 |
|
373 |
var overlay_rules_presets = {}; |
401 |
var overlay_rules_presets = {}; |
374 |
overlay_rules_presets[_("protect")] = { |
402 |
overlay_rules_presets["protect"] = { |
375 |
'add': 0, |
403 |
'add': 0, |
376 |
'append': 0, |
404 |
'append': 0, |
377 |
'remove': 0, |
405 |
'remove': 0, |
378 |
'delete': 0 |
406 |
'delete': 0 |
379 |
}; |
407 |
}; |
380 |
overlay_rules_presets[_("overwrite")] = { |
408 |
overlay_rules_presets["overwrite"] = { |
381 |
'add': 1, |
409 |
'add': 1, |
382 |
'append': 1, |
410 |
'append': 1, |
383 |
'remove': 1, |
411 |
'remove': 1, |
384 |
'delete': 1 |
412 |
'delete': 1 |
385 |
}; |
413 |
}; |
386 |
overlay_rules_presets[_("add")] = { |
414 |
overlay_rules_presets["add"] = { |
387 |
'add': 1, |
415 |
'add': 1, |
388 |
'append': 0, |
416 |
'append': 0, |
389 |
'remove': 0, |
417 |
'remove': 0, |
390 |
'delete': 0 |
418 |
'delete': 0 |
391 |
}; |
419 |
}; |
392 |
overlay_rules_presets[_("addappend")] = { |
420 |
overlay_rules_presets["addappend"] = { |
393 |
'add': 1, |
421 |
'add': 1, |
394 |
'append': 1, |
422 |
'append': 1, |
395 |
'remove': 0, |
423 |
'remove': 0, |
396 |
'delete': 0 |
424 |
'delete': 0 |
397 |
}; |
425 |
}; |
398 |
overlay_rules_presets[_("protectfromdeletion")] = { |
426 |
overlay_rules_presets["protectfromdeletion"] = { |
399 |
'add': 1, |
427 |
'add': 1, |
400 |
'append': 1, |
428 |
'append': 1, |
401 |
'remove': 1, |
429 |
'remove': 1, |
Lines 403-413
Link Here
|
403 |
}; |
431 |
}; |
404 |
|
432 |
|
405 |
var overlay_rules_label_to_value = {}; |
433 |
var overlay_rules_label_to_value = {}; |
406 |
overlay_rules_label_to_value[_("Add")] = 1; |
434 |
overlay_rules_label_to_value["add"] = 1; |
407 |
overlay_rules_label_to_value[_("Append")] = 1; |
435 |
overlay_rules_label_to_value["append"] = 1; |
408 |
overlay_rules_label_to_value[_("Remove")] = 1; |
436 |
overlay_rules_label_to_value["remove"] = 1; |
409 |
overlay_rules_label_to_value[_("Delete")] = 1; |
437 |
overlay_rules_label_to_value["delete"] = 1; |
410 |
overlay_rules_label_to_value[_("Skip")] = 0; |
438 |
overlay_rules_label_to_value["skip"] = 0; |
411 |
|
439 |
|
412 |
function hash_config(config) { |
440 |
function hash_config(config) { |
413 |
return JSON.stringify(config, Object.keys(config).sort()); |
441 |
return JSON.stringify(config, Object.keys(config).sort()); |
414 |
- |
|
|