From d08cfbb5eb8c4bf0b40d48bd0aa639963f5fd3fc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 26 Jun 2019 14:29:24 +0000 Subject: [PATCH] Bug 23221: Reindent tools/manage-marc-import.tt This patch reformats the template for the Manage staged MARC records page. It makes only whitespace changes. It should have no effect on the behavior of the page. In addition to re-indentation, some lines have been broken up. These should be the only changes highlighted when using diff while ignoring whitespace. To test, apply the patch and view the Manage staged MARC records page. The page should look correct and work correctly: - Paging through results - Viewing batches - Cleaning batches - Deleting batches Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize (cherry picked from commit cd66074205b571d1db6acbb57d8d8554d3d4fe85) Signed-off-by: Fridolin Somers --- .../en/modules/tools/manage-marc-import.tt | 910 ++++++++++-------- 1 file changed, 482 insertions(+), 428 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 e384b13fdb..3dc23e9887 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 @@ -3,9 +3,9 @@ [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Manage staged MARC records -[% IF ( import_batch_id ) %] - › Batch [% import_batch_id | html %] -[% END %] + [% IF ( import_batch_id ) %] + › Batch [% import_batch_id | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] + -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - + [% INCLUDE 'header.inc' %] + [% INCLUDE 'cat-search.inc' %] -
-
-
-
+ -

Manage staged MARC records -[% IF ( import_batch_id ) %] - › Batch [% import_batch_id | html %] -[% END %] -

-[% IF ( label_batch_msg ) %] -[% IF ( alert ) %] -
-[% ELSE %] -
-[% END %] -

[% label_batch_msg | html %]

-
-[% END %] +
+
+
+
+

Manage staged MARC records + [% IF ( import_batch_id ) %] + › Batch [% import_batch_id | html %] + [% END %] +

-[% IF ( did_clean ) %] -
Cleaned import batch #[% import_batch_id | html %]
-[% END %] + [% IF ( label_batch_msg ) %] + [% IF ( alert ) %] +
+ [% ELSE %] +
+ [% END %] +

[% label_batch_msg | html %]

+
+ [% END %] -[% IF ( did_delete ) %] -
Import batch deleted successfully
-[% END %] + [% IF ( did_clean ) %] +
Cleaned import batch #[% import_batch_id | html %]
+ [% END %] -[% UNLESS ( batch_list ) %] - [% UNLESS ( batch_info ) %] -
-

No records have been staged.

-

Stage MARC records for import.

-
- [% END %] -[% END %] + [% IF ( did_delete ) %] +
Import batch deleted successfully
+ [% END %] -[% IF ( batch_info ) %] + [% UNLESS ( batch_list ) %] + [% UNLESS ( batch_info ) %] +
+

No records have been staged.

+

Stage MARC records for import.

+
+ [% END %] + [% END %] -[% IF ( can_commit ) %] -
- - - -[% END %] + [% IF ( batch_info ) %] + [% IF ( can_commit ) %] + + + + + [% END %] - [% IF ( rematch_attempted ) %] - [% IF ( rematch_failed ) %] -
Failed to apply different matching rule
- [% ELSE %] -
Applied different matching rule. Number of records matched now - [% num_with_matches | html %] -
- [% END %] - [% END %] - [% IF ( changed_overlay_action ) %] -
Changed action if matching record found
- [% END %] - [% IF ( changed_nomatch_action ) %] -
Changed action if no match found
- [% END %] - [% IF ( changed_item_action ) %] -
Changed item processing option
- [% END %] - -
-
    -
  1. File name: [% file_name | html %]
  2. -
  3. Comments: [% IF ( comments ) %][% comments | html %][% ELSE %](none)[% END %]
  4. -
  5. Type: [% IF ( record_type == 'auth' ) %]Authority records[% ELSE %]Bibliographic records[% END %]
  6. -
  7. Staged: [% upload_timestamp | html %]
  8. -
  9. Status: - [% IF ( import_status == 'cleaned' ) %] - Cleaned - [% ELSIF ( import_status == 'imported' ) %] - Imported - [% ELSIF ( import_status == 'importing' ) %] - Importing - [% ELSIF ( import_status == 'reverted' ) %] - Reverted - [% ELSIF ( import_status == 'reverting' ) %] - Reverting - [% ELSIF ( import_status == 'staged' ) %] - Staged - [% ELSE %] - [% import_status | html %] - [% END %] -
  10. -
  11. -[% IF ( can_commit ) %] 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 %] -
  12. -
  13. - [% IF ( can_commit ) %] - - [% 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 %]
  14. - -
  15. - [% IF ( can_commit ) %] - - [% 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 %] -
  16. + [% IF ( rematch_attempted ) %] + [% IF ( rematch_failed ) %] +
    Failed to apply different matching rule
    + [% ELSE %] +
    Applied different matching rule. Number of records matched now + [% num_with_matches | html %] +
    + [% END %] + [% END %] - [% IF ( record_type == 'biblio' ) %] -
  17. - [% IF ( can_commit ) %] - - [% 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 %] -
  18. - [% END %] -
-[% IF ( can_commit ) %]
[% END %] -
- - -
- [% IF ( can_commit ) %] -
- - - - -
- [% IF ( record_type != 'auth' ) %] - Add new bibliographic records into this framework: - - [% END %] -
- -
-
-
Job progress:
0%
-
- [% END %] - [% IF ( can_revert ) %] -
- - - - -
-
-
Job progress:
0%
-
- [% END %] -
- [% IF ( did_commit ) %] -
Completed import of records
- - - - - [% IF ( record_type == 'biblio' ) %] - - - - [% END %] -
Number of records added[% num_added | html %]
Number of records updated[% num_updated | html %]
Number of records ignored[% num_ignored | html %]
Number of items added[% num_items_added | html %]
Number of items replaced[% num_items_replaced | html %]
Number of items ignored because of duplicate barcode[% num_items_errored | html %]
- [% END %] - [% IF ( did_revert ) %] -
Success: Import reversed
- - - [% IF ( record_type == 'biblio' ) %] - - - [% END %] - - -
Number of records deleted[% num_deleted | html %]
Number of items deleted[% num_items_deleted | html %]
Number of records not deleted due to items on loan[% num_errors | html %]
Number of records changed back[% num_reverted | html %]
Number of records ignored[% num_ignored | html %]
- [% END %] -[% END %] -
- -[% IF ( batch_list ) %] - [% IF ( pages ) %] -
- [% FOREACH page IN pages %] - [% IF ( page.current_page ) %] - [% page.page_number | html %] - [% ELSE %] - [% page.page_number | html %] - [% END %] - [% END %] -
- [% END %] - - - - - - - - - - - - - [% FOREACH batch_lis IN batch_list %] - - - - - - - - - - - - [% END %] -
#File nameCommentsTypeStatusStaged# Records# ItemsAction
[% batch_lis.import_batch_id | html %][% batch_lis.file_name | html %][% batch_lis.comments | html %][% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %] - [% IF ( batch_lis.import_status == 'cleaned' ) %] - Cleaned - [% ELSIF ( batch_lis.import_status == 'imported' ) %] - Imported - [% ELSIF ( batch_lis.import_status == 'importing' ) %] - Importing - [% ELSIF ( batch_lis.import_status == 'reverted' ) %] - Reverted - [% ELSIF ( batch_lis.import_status == 'reverting' ) %] - Reverting - [% ELSIF ( batch_lis.import_status == 'staged' ) %] - Staged - [% ELSE %] - [% batch_lis.import_status | html %] - [% END %] - [% batch_lis.upload_timestamp | html %][% batch_lis.num_records | html %][% batch_lis.num_items | html %][% IF ( batch_lis.num_items ) %] (Create label batch)[% END %] - [% IF ( batch_lis.can_clean ) %] -
- - - -
- [% ELSIF ( batch_lis.import_status == 'cleaned' ) %] -
- - - -
- [% END %] -
- [% IF ( pages ) %] -
- [% FOREACH page IN pages %] - [% IF ( page.current_page ) %] - [% page.page_number | html %] - [% ELSE %] - [% page.page_number | html %] - [% END %] - [% END %] -
- [% END %] -[% END %] + [% IF ( changed_overlay_action ) %] +
Changed action if matching record found
+ [% END %] -[% IF import_batch_id %] - - - - - - - - - - - - -
#CitationStatusMatch typeMatch detailsDiffRecord
- - -[% END %] + [% IF ( changed_nomatch_action ) %] +
Changed action if no match found
+ [% END %] + + [% IF ( changed_item_action ) %] +
Changed item processing option
+ [% END %] + +
+
    +
  1. File name: [% file_name | html %]
  2. +
  3. Comments: [% IF ( comments ) %][% comments | html %][% ELSE %](none)[% END %]
  4. +
  5. Type: [% IF ( record_type == 'auth' ) %]Authority records[% ELSE %]Bibliographic records[% END %]
  6. +
  7. Staged: [% upload_timestamp | html %]
  8. +
  9. Status: + [% IF ( import_status == 'cleaned' ) %] + Cleaned + [% ELSIF ( import_status == 'imported' ) %] + Imported + [% ELSIF ( import_status == 'importing' ) %] + Importing + [% ELSIF ( import_status == 'reverted' ) %] + Reverted + [% ELSIF ( import_status == 'reverting' ) %] + Reverting + [% ELSIF ( import_status == 'staged' ) %] + Staged + [% ELSE %] + [% import_status | html %] + [% END %] +
  10. +
  11. + [% IF ( can_commit ) %] + + + 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 %] +
  12. +
  13. + [% IF ( can_commit ) %] + + [% 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 %] +
  14. +
  15. + [% IF ( can_commit ) %] + + [% 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 %] +
  16. + [% IF ( record_type == 'biblio' ) %] +
  17. + [% IF ( can_commit ) %] + + [% 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 %] +
  18. + [% END %] +
+ [% IF ( can_commit ) %] +
+ + [% END %] +
+ +
+ [% IF ( can_commit ) %] +
+ + + + +
+ [% IF ( record_type != 'auth' ) %] + Add new bibliographic records into this framework: + + [% END %] +
+ +
+
+
+
Job progress:
0%
+
+
+ [% END %] + [% IF ( can_revert ) %] +
+ + + + +
+
+
+
Job progress:
0%
+
+
+ [% END %] +
+ + [% IF ( did_commit ) %] +
Completed import of records
+ + + + + + + + + + + + + + [% IF ( record_type == 'biblio' ) %] + + + + + + + + + + + + + [% END %] +
Number of records added[% num_added | html %]
Number of records updated[% num_updated | html %]
Number of records ignored[% num_ignored | html %]
Number of items added[% num_items_added | html %]
Number of items replaced[% num_items_replaced | html %]
Number of items ignored because of duplicate barcode[% num_items_errored | html %]
+ [% END %] + + [% IF ( did_revert ) %] +
Success: Import reversed
+ + + + + + [% IF ( record_type == 'biblio' ) %] + + + + + + + + + [% END %] + + + + + + + + +
Number of records deleted[% num_deleted | html %]
Number of items deleted[% num_items_deleted | html %]
Number of records not deleted due to items on loan[% num_errors | html %]
Number of records changed back[% num_reverted | html %]
Number of records ignored[% num_ignored | html %]
+ [% END %] + + [% END %] -
-
+
-
- -
-
+ [% IF ( batch_list ) %] + [% IF ( pages ) %] +
+ [% FOREACH page IN pages %] + [% IF ( page.current_page ) %] + [% page.page_number | html %] + [% ELSE %] + [% page.page_number | html %] + [% END %] + [% END %] +
+ [% END %] + + + + + + + + + + + + + + [% FOREACH batch_lis IN batch_list %] + + + + + + + + + + + + [% END %] +
#File nameCommentsTypeStatusStaged# Records# ItemsAction
[% batch_lis.import_batch_id | html %][% batch_lis.file_name | html %][% batch_lis.comments | html %][% IF ( batch_lis.record_type == 'auth' ) %]Authority[% ELSE %]Bibliographic[% END %] + [% IF ( batch_lis.import_status == 'cleaned' ) %] + Cleaned + [% ELSIF ( batch_lis.import_status == 'imported' ) %] + Imported + [% ELSIF ( batch_lis.import_status == 'importing' ) %] + Importing + [% ELSIF ( batch_lis.import_status == 'reverted' ) %] + Reverted + [% ELSIF ( batch_lis.import_status == 'reverting' ) %] + Reverting + [% ELSIF ( batch_lis.import_status == 'staged' ) %] + Staged + [% ELSE %] + [% batch_lis.import_status | html %] + [% END %] + [% batch_lis.upload_timestamp | html %][% batch_lis.num_records | html %][% batch_lis.num_items | html %][% IF ( batch_lis.num_items ) %] (Create label batch)[% END %] + [% IF ( batch_lis.can_clean ) %] +
+ + + +
+ [% ELSIF ( batch_lis.import_status == 'cleaned' ) %] +
+ + + +
+ [% END %] +
+ + [% IF ( pages ) %] +
+ [% FOREACH page IN pages %] + [% IF ( page.current_page ) %] + [% page.page_number | html %] + [% ELSE %] + [% page.page_number | html %] + [% END %] + [% END %] +
+ [% END %] + [% END %] + + [% IF import_batch_id %] + + + + + + + + + + + + +
#CitationStatusMatch typeMatch detailsDiffRecord
+ + + [% END %] +
+ +
+
+ +
+
[% MACRO jsinclude BLOCK %] [% Asset.js("js/tools-menu.js") | $raw %] [% Asset.js("js/background-job-progressbar.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% END %] - [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5