From fb1213a3964103163ee5a37dbec21b200ddbe021 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 12 Jan 2022 18:44:28 +0000 Subject: [PATCH] Bug 29867: Reindent authorized values administration template This patch performs general template cleanup to authorized values administration: Make indentation consistent, replace tabs with spaces, and trim trailing whitespace. To test, apply the patch and go to Administration -> Authorized values. Test that all functionality works correctly: - Adding or deleting categories - Adding, editing, and deleting authorized values. Signed-off-by: Lucas Gass Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers --- .../en/modules/admin/authorised_values.tt | 532 +++++++++--------- 1 file changed, 278 insertions(+), 254 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index af17b86a60..2be9bd054d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -3,20 +3,19 @@ [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -[% IF op == 'add_form' %] - [% IF ( action_modify ) %]Modify authorized value › [% END %] - [% IF ( action_add_value ) %]New authorized value › [% END %] - [% IF ( action_add_category ) %]New category › [% END %] -[% END %] - -Authorized values › Administration › Koha + [% IF op == 'add_form' %] + [% IF ( action_modify ) %]Modify authorized value › [% END %] + [% IF ( action_add_value ) %]New authorized value › [% END %] + [% IF ( action_add_category ) %]New category › [% END %] + [% END %] + Authorized values › Administration › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -86,259 +85,284 @@ Authorized values › Administration › Koha
-[% IF op == 'add_form' %] -

- [% IF ( action_modify ) %]Modify authorized value[% END %] - [% IF ( action_add_value ) %]New authorized value[% END %] - [% IF ( action_add_category ) %]New category[% END %] -

- - [% IF ( action_modify ) %]
NOTE: If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately.
[% END %] + [% IF op == 'add_form' %] +

+ [% IF ( action_modify ) %]Modify authorized value[% END %] + [% IF ( action_add_value ) %]New authorized value[% END %] + [% IF ( action_add_category ) %]New category[% END %] +

+ + [% IF ( action_modify ) %] +
+ NOTE: If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately. +
+ [% END %] -
-
    - [% IF action_add_category %] -
  1. - - - Required - -
  2. - [% ELSE %] -
  3. - Category - - [% category_name | html %] -
  4. -
  5. - - [% IF ( action_modify ) %][% END %] - -
  6. -
  7. - - -
  8. -
  9. - - -
  10. -
  11. - + Required + +
  12. +
+ [% ELSE %] +
    +
  1. + Category + + [% category_name | html %] +
  2. +
  3. + + [% IF ( action_modify ) %] + + [% END %] + +
  4. +
  5. + + +
  6. +
  7. + + +
  8. +
  9. + +
    Select 'All libraries' if this authorized value must be displayed all the time. Otherwise select libraries you want to associate with this value.
    +
  10. + +
+ +
+
Choose an icon:
+ +
+
    +
  • + +
  • +
+
+
+ + [% FOREACH imageset IN imagesets %] +
+
    + [% FOREACH image IN imageset.images %] +
  • + +
  • + [% END %] +
+
+
+ [% END %] +
+ [% END %] +
+
+ + + Cancel +
+
[% END %] - -
Select 'All libraries' if this authorized value must be displayed all the time. Otherwise select libraries you want to associate with this value.
- - - -
-
Choose an icon:
- -
    -
  • -
-
- [% FOREACH imageset IN imagesets %] -
    - [% FOREACH image IN imageset.images %] -
  • - -
  • - [% END %]
-
-
- [% END %] -
- [% END %] - -
- Cancel
- -[% END %] -[% IF op == 'list' %] - - - -[% IF ( searchfield ) %] -

Authorized values for category [% category.category_name | html %]

- [% PROCESS category_descriptions code_category = category.category_name %] -[% ELSE %] -

Authorized values

-[% END %] - -[% IF ( searchfield ) %] -
- NOTE: If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately. -
-[% END %] - -[% FOR m IN messages %] -
- [% SWITCH m.code %] - [% CASE 'error_on_update' %] - An error occurred when updating this authorized value. Perhaps the value already exists. - [% CASE 'error_on_insert' %] - An error occurred when inserting this authorized value. Perhaps the value or the category already exists. - [% CASE 'error_on_insert_cat' %] - An error occurred when inserting this authorized value category. Perhaps the category name already exists. - [% CASE 'error_on_delete' %] - An error occurred when deleting this authorized value. Check the logs. - [% CASE 'error_on_delete_category' %] - An error occurred when deleting this authorized value category. Check the logs. - [% CASE 'success_on_update' %] - Authorized value updated successfully. - [% CASE 'success_on_insert' %] - Authorized value added successfully. - [% CASE 'success_on_insert_cat' %] - Authorized value category added successfully. - [% CASE 'success_on_delete' %] - Authorized value deleted successfully. - [% CASE 'success_on_delete_category' %] - Authorized value category deleted successfully. - [% CASE 'cat_already_exists' %] - This authorized value category already exists. - [% CASE 'invalid_category_name' %] - The authorized value category 'branches', 'itemtypes' and 'cn_source' are used internally by Koha and are not valid. - [% CASE %] - [% m.code | html %] - [% END %] -
-[% END %] - -[% IF ( searchfield ) %] - -
-

- - -

-
- - [% IF loop %] - - - - - - - - - - - - [% FOREACH loo IN loop %] - - - - - - - - - [% END # /FOREACH loop %] -
Authorized valueDescriptionDescription (OPAC)IconLibrary limitationsActions
[% loo.authorised_value | html %][% loo.lib | html %][% loo.lib_opac | html %][% IF ( loo.imageurl ) %][% ELSE %] [% END %] - [% IF loo.branches.size > 0 %] - [% branches_str = "" %] - [% FOREACH branch IN loo.branches %] - [%- IF loop.first -%] - [% branches_str = branch.branchname _ " (" _ branch.branchcode _ ")" %] - [% ELSE %] - [% branches_str = branches_str _ "\n" _ branch.branchname _ " (" _ branch.branchcode _ ")" %] - [% END %] - [% END %] - - [% IF loo.branches.size > 1 %] - [% loo.branches.size | html %] library limitations - [% ELSE %] - [% loo.branches.size | html %] library limitation + + [% IF ( searchfield ) %] +
+ NOTE: If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately. +
[% END %] - [% ELSE %] - No limitation - [% END %] -
Edit - Delete
- [% ELSE %] -
-

There are no authorized values defined for [% category.category_name | html %]

-
- - - -
- [% UNLESS category.is_system %] -
- - - -
- [% END %] -
- [% END %] -[% ELSE # category was selected %] - - - - - - - - - - - [% FOR c IN category_names %] - - - - - - [% END %] - -
CategoryDescription 
[% c | html %] - [% PROCESS category_descriptions code_category = c %] - - Add -
-[% END # /IF ( searchfield )%] + [% FOR m IN messages %] +
+ [% SWITCH m.code %] + [% CASE 'error_on_update' %] + An error occurred when updating this authorized value. Perhaps the value already exists. + [% CASE 'error_on_insert' %] + An error occurred when inserting this authorized value. Perhaps the value or the category already exists. + [% CASE 'error_on_insert_cat' %] + An error occurred when inserting this authorized value category. Perhaps the category name already exists. + [% CASE 'error_on_delete' %] + An error occurred when deleting this authorized value. Check the logs. + [% CASE 'error_on_delete_category' %] + An error occurred when deleting this authorized value category. Check the logs. + [% CASE 'success_on_update' %] + Authorized value updated successfully. + [% CASE 'success_on_insert' %] + Authorized value added successfully. + [% CASE 'success_on_insert_cat' %] + Authorized value category added successfully. + [% CASE 'success_on_delete' %] + Authorized value deleted successfully. + [% CASE 'success_on_delete_category' %] + Authorized value category deleted successfully. + [% CASE 'cat_already_exists' %] + This authorized value category already exists. + [% CASE 'invalid_category_name' %] + The authorized value category 'branches', 'itemtypes' and 'cn_source' are used internally by Koha and are not valid. + [% CASE %] + [% m.code | html %] + [% END %] +
+ [% END %] -[% END # /IF op == 'list' %] + [% IF ( searchfield ) %] + +
+

+ + +

+
+ + [% IF loop %] + + + + + + + + + + + + + [% FOREACH loo IN loop %] + + + + + + + + + [% END # /FOREACH loop %] + +
Authorized valueDescriptionDescription (OPAC)IconLibrary limitationsActions
[% loo.authorised_value | html %][% loo.lib | html %][% loo.lib_opac | html %] + [% IF ( loo.imageurl ) %][% ELSE %] [% END %] + [% IF loo.branches.size > 0 %] + [% branches_str = "" %] + [% FOREACH branch IN loo.branches %] + [%- IF loop.first -%] + [% branches_str = branch.branchname _ " (" _ branch.branchcode _ ")" %] + [% ELSE %] + [% branches_str = branches_str _ "\n" _ branch.branchname _ " (" _ branch.branchcode _ ")" %] + [% END %] + [% END %] + + [% IF loo.branches.size > 1 %] + [% loo.branches.size | html %] library limitations + [% ELSE %] + [% loo.branches.size | html %] library limitation + [% END %] + [% ELSE %] + No limitation + [% END %] + Edit + Delete
+ [% ELSE %] +
+

There are no authorized values defined for [% category.category_name | html %]

+
+ + + +
+ [% UNLESS category.is_system %] +
+ + + +
+ [% END %] +
+ [% END %] + + [% ELSE # category was selected %] + + + + + + + + + + + [% FOR c IN category_names %] + + + + + + [% END %] + +
CategoryDescription 
[% c | html %] + [% PROCESS category_descriptions code_category = c %] + + Add +
+ + [% END # /IF ( searchfield )%] + + [% END # /IF op == 'list' %]
-- 2.39.5