From f04d2accf8a99ffa390ef38cdf2101d04acbe73f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 18 Mar 2020 19:14:40 +0000 Subject: [PATCH] Bug 24899: Reindent record matching rules template This patch reindents the template the record matching rules template. The only non-whitespace changes where lines were combined or split. The diff using the '-w' flag to ignore whitespace should highlight only moved lines. Test that functionality is unaffected: Administration -> Record matching rules. Test adding, editing, and deleting record matching rules. Test adding, editing, and deleting match points and match checks. Confirm that changes are saved correctly. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/admin/matching-rules.tt | 1451 ++++++++++---------- 1 file changed, 719 insertions(+), 732 deletions(-) rewrite koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt (80%) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt dissimilarity index 80% index 9eccfaa329..08dc372b1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt @@ -1,732 +1,719 @@ -[% USE raw %] -[% USE Asset %] -[% SET footerjs = 1 %] -[% INCLUDE 'doc-head-open.inc' %] -Koha › Administration › Record matching rules -[% IF ( matching_rule_form ) %] - [% IF ( edit_matching_rule ) %] - › Modify record matching rule - [% ELSE %] - › Add record matching rule - [% END %] -[% END %] -[% IF ( delete_matching_rule_form ) %] - › Confirm deletion of record matching rule "[% code | html %]" -[% END %] - -[% INCLUDE 'doc-head-close.inc' %] - -[% BLOCK norms_text %] -[% SWITCH norm %] -[% CASE 'none' %]None -[% CASE 'remove_spaces' %]Remove spaces -[% CASE 'upper_case' %]Uppercase -[% CASE 'lower_case' %]Lowercase -[% CASE 'legacy_default' %]Legacy default -[% CASE 'ISBN' %]ISBN -[% CASE %][% norm | html %] -[% END %] -[% END %] - -[% BLOCK norms_options %] -[%# PARAMS: selected_norm %] -[% FOREACH norm IN valid_norms %] -[% IF ( norm == selected_norm ) %] - -[% ELSE %] - -[% END %] -[% END %] -[% END %] - -[% BLOCK norms_select %] -[%# PARAMS: selected_norm, id, name %] -[% UNLESS valid_norms.grep(selected_norm).size %] -[%# Fallback to 'none' %] -[% selected_norm = 'none' %] -[% END %] - -[% END %] - - - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'prefs-admin-search.inc' %] - - - -
-
-
-
- -[% IF ( matching_rule_form ) %] - [% IF ( edit_matching_rule ) %] -

Modify record matching rule

- [% ELSE %] -

Add record matching rule

- [% END %] -
- -
-
    -
  1. - [% IF ( edit_matching_rule ) %] - Matching rule code: - - - [% code | html %] - [% ELSE %] - - Required - [% END %] -
  2. -
  3. - Required -
  4. -
  5. - Required -
  6. -
  7. - Required -
  8. -
-
- -
-

Match points

- [% IF ( edit_matching_rule ) %] - [% IF ( matchpoints ) %]

[% END %]Add match point

- [% ELSE %][% END %] - [% IF ( edit_matching_rule ) %] - [% FOREACH matchpoint IN matchpoints %] -
-
- Match point [% matchpoint.mp_num | html %] | Add match point | Remove this match point -
    -
  1. - - -
  2. -
  3. - - -
  4. -
- [% FOREACH component IN matchpoint.components %] -
- Matchpoint components -
    -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - -
  6. -
  7. - - -
  8. - [% FOREACH norm IN component.norms %] -
  9. - - [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] - [% PROCESS norms_select selected_norm=norm.norm id="mp_${norm.mp_num}_c_${component.comp_num}_n__${norm.norm_num}_norm" name="mp_${matchpoint.mp_num}_c_${component.comp_num}_n_${norm.norm_num}_norm" %] -
  10. - [% END %] -
-
- [% END %] -
-
-
-
- - [% END %] - [% ELSE %] -
-
- Match point 1 | Add match point | Remove this match point -
    -
  1. - - -
  2. -
  3. - - -
  4. -
-
- Matchpoint components -
    -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - -
  6. -
  7. - - -
  8. -
  9. - - [% PROCESS norms_select selected_norm="none" id="mp_1_c_1_n_1_norm" name="mp_1_c_1_n_1_norm" %] -
  10. -
-
-
-
-
- - - [% END %] - -
-

Required match checks

- [% IF ( edit_matching_rule ) %] - [% IF ( matchchecks ) %]

[% END %]Add match check

- [% ELSE %][% END %] - [% IF ( edit_matching_rule ) %] - [% FOREACH matchcheck IN matchchecks %] -
-
- Match check [% matchcheck.mc_num | html %]Add match check | Remove this match check - - [% FOREACH src_component IN matchcheck.src_components %] -
- Source (incoming) record check field -
    -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - -
  6. -
  7. - - -
  8. - [% FOREACH norm IN src_component.norms %] -
  9. - - [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] - [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" %] -
  10. - [% END %] -
-
- [% END %] - [% FOREACH tgt_component IN matchcheck.tgt_components %] -
- Target (database) record check field -
    -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - -
  6. -
  7. - - -
  8. - [% FOREACH norm IN tgt_component.norms %] -
  9. - - [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] - [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" %] -
  10. - [% END %] -
-
- [% END %] -
-
-
- [% END %] - [% ELSE %] -
-
- Match check 1 | Add match check | Remove this match check - -
- Source (incoming) record check field -
    -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - -
  6. -
  7. - - -
  8. -
  9. - - [% PROCESS norms_select selected_norm="none" id="mc_1_src_c_1_n_1_norm" name="mc_1_src_c_1_n_1_norm" %] -
  10. -
-
- -
- Target (database) record check field -
    -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - -
  6. -
  7. - - -
  8. -
  9. - - [% PROCESS norms_select selected_norm="none" id="mc_1_tgt_c_1_n_1_norm" name="mc_1_tgt_c_1_n_1_norm" %] -
  10. -
-
-
-
-
- [% END %] -
-
- [% IF ( edit_matching_rule ) %] - - [% ELSE %] - - [% END %] - Cancel -
-
-[% END %] - -[% IF ( delete_matching_rule_form ) %] -
-

Confirm deletion of record matching rule '[% code | html %]' ([% description | html %])?

-
- - - -
-
- -
-
-[% END %] - -[% IF ( display_list ) %] - - - -

Record matching rules

-[% IF ( added_matching_rule ) %] -
Added record matching rule "[% added_matching_rule | html %]"
-[% END %] -[% IF ( edited_matching_rule ) %] -
Modified record matching rule "[% edited_matching_rule | html %]"
-[% END %] -[% IF ( deleted_matching_rule ) %] -
Deleted record matching rule "[% deleted_matching_rule | html %]"
-[% END %] -[% IF ( available_matching_rules ) %] - - - - - - - [% FOREACH available_matching_rule IN available_matching_rules %] - - - - - - - [% END %] -
#CodeDescriptionActions
[% available_matching_rule.matcher_id | html %][% available_matching_rule.code | html %][% available_matching_rule.description | html %] - Edit - Delete -
[% ELSE %]

There are no saved matching rules.

[% END %] - -
[% pagination_bar | $raw %]
- -[% END %] - [% IF ( matching_rule_form ) %] - - - -[% END %] - -
-
- -
- -
-
- -[% MACRO jsinclude BLOCK %] - [% Asset.js("js/admin-menu.js") | $raw %] - -[% END %] -[% INCLUDE 'intranet-bottom.inc' %] +[% USE raw %] +[% USE Asset %] +[% SET footerjs = 1 %] +[% INCLUDE 'doc-head-open.inc' %] +Koha › Administration › Record matching rules +[% IF ( matching_rule_form ) %] + [% IF ( edit_matching_rule ) %] + › Modify record matching rule + [% ELSE %] + › Add record matching rule + [% END %] +[% END %] +[% IF ( delete_matching_rule_form ) %] + › Confirm deletion of record matching rule "[% code | html %]" +[% END %] + +[% INCLUDE 'doc-head-close.inc' %] + +[% BLOCK norms_text %] + [% SWITCH norm %] + [% CASE 'none' %]None + [% CASE 'remove_spaces' %]Remove spaces + [% CASE 'upper_case' %]Uppercase + [% CASE 'lower_case' %]Lowercase + [% CASE 'legacy_default' %]Legacy default + [% CASE 'ISBN' %]ISBN + [% CASE %][% norm | html %] + [% END %] +[% END %] + +[% BLOCK norms_options %] + [%# PARAMS: selected_norm %] + [% FOREACH norm IN valid_norms %] + [% IF ( norm == selected_norm ) %] + + [% ELSE %] + + [% END %] + [% END %] +[% END %] + +[% BLOCK norms_select %] + [%# PARAMS: selected_norm, id, name %] + [% UNLESS valid_norms.grep(selected_norm).size %] + [%# Fallback to 'none' %] + [% selected_norm = 'none' %] + [% END %] + +[% END %] + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'prefs-admin-search.inc' %] + + + +
+
+
+
+ + [% IF ( matching_rule_form ) %] + [% IF ( edit_matching_rule ) %] +

Modify record matching rule

+ [% ELSE %] +

Add record matching rule

+ [% END %] +
+ +
+
    +
  1. + [% IF ( edit_matching_rule ) %] + Matching rule code: + + + [% code | html %] + [% ELSE %] + + Required + [% END %] +
  2. +
  3. + + Required +
  4. +
  5. + + Required +
  6. +
  7. + + Required +
  8. +
+
+ +
+

Match points

+ [% IF ( edit_matching_rule ) %] + [% IF ( matchpoints ) %] +

+ [% END %] + Add match point +

+ [% ELSE %] + + [% END %] + + [% IF ( edit_matching_rule ) %] + [% FOREACH matchpoint IN matchpoints %] +
+
+ Match point [% matchpoint.mp_num | html %] | Add match point | Remove this match point +
    +
  1. + + +
  2. +
  3. + + +
  4. +
+ [% FOREACH component IN matchpoint.components %] +
+ Matchpoint components +
    +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. + [% FOREACH norm IN component.norms %] +
  9. + + [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] + [% PROCESS norms_select selected_norm=norm.norm id="mp_${norm.mp_num}_c_${component.comp_num}_n__${norm.norm_num}_norm" name="mp_${matchpoint.mp_num}_c_${component.comp_num}_n_${norm.norm_num}_norm" %] +
  10. + [% END %] +
+
+ [% END %] +
+
+
+ [% END %] + [% ELSE %] +
+
+ Match point 1 | Add match point | Remove this match point +
    +
  1. + + +
  2. +
  3. + + +
  4. +
+
+ Matchpoint components +
    +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. +
  9. + + [% PROCESS norms_select selected_norm="none" id="mp_1_c_1_n_1_norm" name="mp_1_c_1_n_1_norm" %] +
  10. +
+
+
+
+
+ [% END %] +
+ +
+

Required match checks

+ [% IF ( edit_matching_rule ) %] + [% IF ( matchchecks ) %] +

+ [% END %] + Add match check

+ [% ELSE %] + + [% END %] + + [% IF ( edit_matching_rule ) %] + [% FOREACH matchcheck IN matchchecks %] +
+
+ Match check [% matchcheck.mc_num | html %]Add match check | Remove this match check + + [% FOREACH src_component IN matchcheck.src_components %] +
+ Source (incoming) record check field +
    +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. + [% FOREACH norm IN src_component.norms %] +
  9. + + [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] + [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" %] +
  10. + [% END %] +
+
+ [% END %] + + [% FOREACH tgt_component IN matchcheck.tgt_components %] +
+ Target (database) record check field +
    +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. + [% FOREACH norm IN tgt_component.norms %] +
  9. + + [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %] + [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" %] +
  10. + [% END %] +
+
+ [% END %] +
+
+
+ [% END %] + [% ELSE %] +
+
+ Match check 1 | Add match check | Remove this match check + +
+ Source (incoming) record check field +
    +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. +
  9. + + [% PROCESS norms_select selected_norm="none" id="mc_1_src_c_1_n_1_norm" name="mc_1_src_c_1_n_1_norm" %] +
  10. +
+
+ +
+ Target (database) record check field +
    +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. +
  9. + + [% PROCESS norms_select selected_norm="none" id="mc_1_tgt_c_1_n_1_norm" name="mc_1_tgt_c_1_n_1_norm" %] +
  10. +
+
+
+
+
+ [% END %] +
+
+ [% IF ( edit_matching_rule ) %] + + [% ELSE %] + + [% END %] + Cancel +
+
+ [% END %] + + [% IF ( delete_matching_rule_form ) %] +
+

Confirm deletion of record matching rule '[% code | html %]' ([% description | html %])?

+
+ + + +
+
+ +
+
+ [% END %] + + [% IF ( display_list ) %] + + + +

Record matching rules

+ + [% IF ( added_matching_rule ) %] +
Added record matching rule "[% added_matching_rule | html %]"
+ [% END %] + [% IF ( edited_matching_rule ) %] +
Modified record matching rule "[% edited_matching_rule | html %]"
+ [% END %] + [% IF ( deleted_matching_rule ) %] +
Deleted record matching rule "[% deleted_matching_rule | html %]"
+ [% END %] + [% IF ( available_matching_rules ) %] + + + + + + + + [% FOREACH available_matching_rule IN available_matching_rules %] + + + + + + + [% END %] +
#CodeDescriptionActions
[% available_matching_rule.matcher_id | html %][% available_matching_rule.code | html %][% available_matching_rule.description | html %] + Edit + Delete +
+ [% ELSE %] +

There are no saved matching rules.

+ [% END %] + +
[% pagination_bar | $raw %]
+ [% END %] + + [% IF ( matching_rule_form ) %] + + + + [% END %] + +
+
+ +
+ +
+
+ +[% MACRO jsinclude BLOCK %] + [% Asset.js("js/admin-menu.js") | $raw %] + +[% END %] +[% INCLUDE 'intranet-bottom.inc' %] -- 2.11.4.GIT