From 6e9948e328c2c6234077d2788062a53887d44961 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 24 Jan 2014 12:33:15 +0100 Subject: [PATCH] Bug 11596: Fix ergonomic issue If you had a warning on preference, the warning on the config file did not appear. To reproduce, without this patch: - switch on OPACPrivacy and set AnonymousPatron to 0. - comment at least 1 zebra_*_index_mode in your config file. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- about.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 59 +++++++++++++----------- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/about.pl b/about.pl index e23e945..c91dd0b 100755 --- a/about.pl +++ b/about.pl @@ -107,7 +107,7 @@ $template->param( warnPrefAnonymousPatron => $warnPrefAnonymousPatron, errZebraConnection => $errZebraConnection, warnIsRootUser => $warnIsRootUser, - xml_config_warnings => \@xml_config_warnings + xml_config_warnings => \@xml_config_warnings ); my @components = (); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 847047b..2129425 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -98,38 +98,41 @@
- [% IF (warnIsRootUser) %] + [% IF warnIsRootUser || warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || xml_config_warnings.size %] + [% IF warnIsRootUser %]

Warning regarding current user

You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.

Please log in instead with a regular staff account. To create a staff account, create a library, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.

- [% END %] -

Warnings regarding the system configuration

- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron %] - - - [% IF (warnPrefBiblioAddsAuthorities) %] - - [% END %] - [% IF (warnPrefEasyAnalyticalRecords) %] - - [% END %] - [% IF warnPrefAnonymousPatron %] - - [% END %] -
Preferences
Warning System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.
Warning System preference 'EasyAnalyticalRecords' set, but UseControlNumber preference is set to 'Use'. Set it to 'Don't use' or else the 'Show analytics' links in the staff client and the OPAC will be broken.
Warning System preference 'OPACPrivacy' set, but AnonymousPatron preference is set to '0'. Set it to a valid borrower number if you want that this feature works correctly.
- [% ELSIF xml_config_warnings.size %] - - - [% FOREACH config_entry IN xml_config_warnings %] - [% IF config_entry.error == 'zebra_bib_index_mode_warn' %] - - [% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %] - - [% END %] - [% END %] -
XML configuration file
Warning The <zebra_bib_index_mode> entry is missing in your configuration file. It should be set to dom or grs1. It will default to grs1 but this could change in the future.
Warning The <zebra_auth_index_mode> entry is missing in your configuration file. It should be set to dom or grs1. It will default to dom but this could change in the future.
+ [% END %] + [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron %] +

Warnings regarding the system configuration

+ + + [% IF (warnPrefBiblioAddsAuthorities) %] + + [% END %] + [% IF (warnPrefEasyAnalyticalRecords) %] + + [% END %] + [% IF warnPrefAnonymousPatron %] + + [% END %] +
Preferences
Warning System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.
Warning System preference 'EasyAnalyticalRecords' set, but UseControlNumber preference is set to 'Use'. Set it to 'Don't use' or else the 'Show analytics' links in the staff client and the OPAC will be broken.
Warning System preference 'OPACPrivacy' set, but AnonymousPatron preference is set to '0'. Set it to a valid borrower number if you want that this feature works correctly.
+ [% END %] + [% IF xml_config_warnings.size %] + + + [% FOREACH config_entry IN xml_config_warnings %] + [% IF config_entry.error == 'zebra_bib_index_mode_warn' %] + + [% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %] + + [% END %] + [% END %] +
XML configuration file
Warning The <zebra_bib_index_mode> entry is missing in your configuration file. It should be set to dom or grs1. It will default to grs1 but this could change in the future.
Warning The <zebra_auth_index_mode> entry is missing in your configuration file. It should be set to dom or grs1. It will default to dom but this could change in the future.
+ [% END %] [% ELSE %] -

No warnings

+

All looks good.

[% END %]
-- 1.8.3.2