View | Details | Raw Unified | Return to bug 31694
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt (-14 / +6 lines)
Lines 263-272 Link Here
263
                                    </td>
263
                                    </td>
264
                                    <td>[% rule.tag | html %]</td>
264
                                    <td>[% rule.tag | html %]</td>
265
                                    <td class="rule-preset"></td>
265
                                    <td class="rule-preset"></td>
266
                                    <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" data-value="[% rule.add %]">[% IF rule.add %]Add[% ELSE %]Skip[% END %]</td>
267
                                    <td class="rule-operation-action" data-operation="append">[% IF rule.append %]Append[% ELSE %]Skip[% END %]</td>
267
                                    <td class="rule-operation-action" data-operation="append" data-value="[% rule.append %]">[% IF rule.append %]Append[% ELSE %]Skip[% END %]</td>
268
                                    <td class="rule-operation-action" data-operation="remove">[% IF rule.remove %]Remove[% ELSE %]Skip[% END %]</td>
268
                                    <td class="rule-operation-action" data-operation="remove" data-value="[% rule.remove %]">[% IF rule.remove %]Remove[% ELSE %]Skip[% END %]</td>
269
                                    <td class="rule-operation-action" data-operation="delete">[% IF rule.delete %]Delete[% ELSE %]Skip[% END %]</td>
269
                                    <td class="rule-operation-action" data-operation="delete" data-value="[% rule.delete %]">[% IF rule.delete %]Delete[% ELSE %]Skip[% END %]</td>
270
                                    <td class="actions">
270
                                    <td class="actions">
271
                                        <a href="?op=remove&id=[% rule.id | uri %]" title="Delete" class="btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</a>
271
                                        <a href="?op=remove&id=[% rule.id | uri %]" title="Delete" class="btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</a>
272
                                        <a href="?op=edit&id=[% rule.id | uri %]" title="Edit" class="btn btn-default btn-xs"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
272
                                        <a href="?op=edit&id=[% rule.id | uri %]" title="Edit" class="btn btn-default btn-xs"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
Lines 430-442 Link Here
430
          'delete': 0
430
          'delete': 0
431
        };
431
        };
432
432
433
        var overlay_rules_label_to_value = {};
434
        overlay_rules_label_to_value[_("Add")] = 1;
435
        overlay_rules_label_to_value[_("Append")] = 1;
436
        overlay_rules_label_to_value[_("Remove")] = 1;
437
        overlay_rules_label_to_value[_("Delete")] = 1;
438
        overlay_rules_label_to_value[_("Skip")] = 0;
439
440
        function hash_config(config) {
433
        function hash_config(config) {
441
          return JSON.stringify(config, Object.keys(config).sort());
434
          return JSON.stringify(config, Object.keys(config).sort());
442
        }
435
        }
Lines 456-465 Link Here
456
          var operations_config = {};
449
          var operations_config = {};
457
          $('.rule-operation-action', $this).each(function() {
450
          $('.rule-operation-action', $this).each(function() {
458
            var $operation = $(this);
451
            var $operation = $(this);
459
            operations_config[$operation.data('operation')] = overlay_rules_label_to_value[$operation.text()];
452
            operations_config[$operation.data('operation')] = $operation.data('value');
460
          });
453
          });
461
          $('.rule-preset', $this).text(
454
          $('.rule-preset', $this).text(
462
            $('option[value="' + operations_config_overlay_rule_preset(operations_config) + '"]').text() || _("Custom")
455
            $('select[name="preset"] option[value="' + operations_config_overlay_rule_preset(operations_config) + '"]').text()
463
          );
456
          );
464
        });
457
        });
465
458
466
- 

Return to bug 31694