From 9fed8f71809e39e4eae1dcaa6e95eb6a162efc9d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 7 Jan 2025 14:16:40 +0100 Subject: [PATCH] Bug 38714: tools/manage-marc-import.tt Signed-off-by: Lucas Gass Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../en/modules/tools/manage-marc-import.tt | 182 +++++++++--------- 1 file changed, 94 insertions(+), 88 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index eabb1846fc..7ff748f85c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -65,13 +65,17 @@

Batch [% import_batch_id | html %]

[% END %] [% FOREACH message IN messages %] + [% SET div_class = '' %] + [% SET div_style = '' %] [% IF message.type == 'success' %] -
+ [% SET div_class="alert alert-info" %] [% ELSIF message.type == 'warning' %] -
+ [% SET div_class="alert alert-warning" %] [% ELSIF message.type == 'error' %] -
+ [% SET div_class="alert alert-warning" %] + [% SET div_style="margin:auto;" %] [% END %] +
[% IF message.code == 'cannot_enqueue_job' %] Cannot enqueue this job. [% END %] @@ -90,10 +94,11 @@ [% ELSIF ( label_batch_msg ) %] [% IF ( alert ) %] -
+ [% SET div_class="alert" %] [% ELSE %] -
+ [% SET div_class="alert alert-info" %] [% END %] +

[% IF ( label_batch_msg == "error" ) %] Error attempting to create label batch. Please ask your system administrator to check the log for more details. @@ -120,14 +125,6 @@ [% END %] [% IF ( batch_info ) %] - [% IF ( can_commit ) %] -

- [% INCLUDE 'csrf-token.inc' %] - - - - [% END %] - [% IF ( rematch_attempted ) %] [% IF ( rematch_failed ) %]
Failed to apply different matching rule
@@ -176,11 +173,16 @@ [% END %] - -
-
    -
  1. - [% IF ( can_commit ) %] +
+ [% IF ( can_commit ) %] + + [% INCLUDE 'csrf-token.inc' %] + + + +
+
    +
  1. Changed. Reset - [% ELSE %] - Matching rule applied: - [% IF ( current_matcher_id ) %] - [% current_matcher_code | html %] ([% current_matcher_description | html %]) - [% ELSE %] - No matching rule in effect - [% END %] - [% END %] -
  2. -
  3. - [% IF ( can_commit ) %] +
  4. +
  5. [% INCLUDE 'tools-overlay-action.inc' %] Changed. Reset - [% ELSE %] - Action if matching record found: - [% IF ( overlay_action == 'replace' ) %] - Replace existing record with incoming record - [% ELSIF ( overlay_action == 'create_new' ) %] - Add incoming record - [% ELSIF ( overlay_action == 'ignore' ) %] - Ignore incoming record (its items may still be processed) - [% ELSE %] - [% overlay_action | html %] - [% END %] - [% END %] -
  6. -
  7. - [% IF ( can_commit ) %] +
  8. +
  9. [% INCLUDE 'tools-nomatch-action.inc' %] Changed. Reset - [% ELSE %] - Action if no match found: - [% IF ( nomatch_action == 'create_new' ) %] - Add incoming record - [% ELSIF ( nomatch_action == 'ignore' ) %] - Ignore incoming record (its items may still be processed) - [% ELSE %] - [% nomatch_action | html %] - [% END %] - [% END %] -
  10. - [% IF ( record_type == 'biblio' ) %] -
  11. - [% IF ( can_commit ) %] +
  12. + [% IF ( record_type == 'biblio' ) %] +
  13. [% INCLUDE 'tools-item-action.inc' %] Changed. Reset - [% ELSE %] - Item processing: - [% IF ( item_action == 'always_add' ) %] - Always add items - [% ELSIF ( item_action == 'add_only_for_matches' ) %] - Add items only if matching bib was found - [% ELSIF ( item_action == 'add_only_for_new' ) %] - Add items only if no matching bib was found - [% ELSIF ( item_action == 'ignore' ) %] - Ignore items - [% ELSE %] - [% item_action | html %] - [% END %] - [% END %] -
  14. - [% ELSE %] - - [% END %] -
- [% IF ( can_commit ) %] -
- - [% END %] -
- -
- [% IF ( can_commit ) %] + + [% ELSE %] + + [% END %] + +
+ + +
[% INCLUDE 'csrf-token.inc' %] @@ -305,7 +256,61 @@
- [% END # /IF can_commit %] +
+ [% END %] + + [% UNLESS can_commit %] +
+
    +
  1. + Matching rule applied: + [% IF ( current_matcher_id ) %] + [% current_matcher_code | html %] ([% current_matcher_description | html %]) + [% ELSE %] + No matching rule in effect + [% END %] +
  2. +
  3. + xAction if matching record found: + [% IF ( overlay_action == 'replace' ) %] + Replace existing record with incoming record + [% ELSIF ( overlay_action == 'create_new' ) %] + Add incoming record + [% ELSIF ( overlay_action == 'ignore' ) %] + Ignore incoming record (its items may still be processed) + [% ELSE %] + [% overlay_action | html %] + [% END %] +
  4. +
  5. + Action if no match found: + [% IF ( nomatch_action == 'create_new' ) %] + Add incoming record + [% ELSIF ( nomatch_action == 'ignore' ) %] + Ignore incoming record (its items may still be processed) + [% ELSE %] + [% nomatch_action | html %] + [% END %] +
  6. + [% IF ( record_type == 'biblio' ) %] +
  7. + Item processing: + [% IF ( item_action == 'always_add' ) %] + Always add items + [% ELSIF ( item_action == 'add_only_for_matches' ) %] + Add items only if matching bib was found + [% ELSIF ( item_action == 'add_only_for_new' ) %] + Add items only if no matching bib was found + [% ELSIF ( item_action == 'ignore' ) %] + Ignore items + [% ELSE %] + [% item_action | html %] + [% END %] +
  8. + [% END %] +
+
+ [% IF ( can_revert ) %]
[% INCLUDE 'csrf-token.inc' %] @@ -314,8 +319,9 @@
[% END # /IF can_revert %] -
- [% END %] + + [% END #/UNLESS can_commit %] + [% END #/UNLESS job_enqueue %] [% END # /IF batch_info %]