From 7ca5bf77eab26ac1d23d296ab78f27f5dac2ebc3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 15 Aug 2014 12:45:10 -0300 Subject: [PATCH] Bug 12745: (QA followup) remove misleading 'No warnings' message Current code displays "No warnings" even if there are actually warnings printed. It is not related to the bug itself, but as it was pointed out by the QAM, I attach a followup to solve that. Regards To+ Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 96 ++++++++++++------------ 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 23b3bb0..6cf42ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -98,64 +98,68 @@
+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || + warnNoActiveCurrency || QueryParserError || warnIsRootUser || 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 || warnNoActiveCurrency || QueryParserError %] - - - [% IF (warnPrefBiblioAddsAuthorities) %] - - [% END %] - [% IF (warnPrefEasyAnalyticalRecords) %] - - [% END %] - [% IF warnPrefAnonymousPatron %] - - [% END %] - [% IF warnNoActiveCurrency %] - - [% END %] - [% IF QueryParserError %] - + [% END %] + [% IF warnPrefAnonymousPatron %] + + [% END %] + [% IF warnNoActiveCurrency %] + + [% END %] + [% IF QueryParserError %] + + + [% END %] +
Preferences and parameters
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.
Warning No active currency is defined. Please go to Administration > Currencies and exchange rates and mark one currency as active.
Warning - You have set UseQueryParser but there was a problem inititializing QueryParser. - [% IF QueryParserError.fallback %] - The 'queryparser_config' entry is missing in your configuration file. - [% QueryParserError.file %] was used instead without success. - [% ELSE %] - The following configuration file was used without success: [% QueryParserError.file %]. +

Warnings regarding the system configuration

+ + + [% IF (warnPrefBiblioAddsAuthorities) %] + [% END %] - - - [% END %] - -
Preferences and parameters
Warning System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.
+ [% IF (warnPrefEasyAnalyticalRecords) %] +
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.
Warning No active currency is defined. Please go to Administration > Currencies and exchange rates and mark one currency as active.
Warning + You have set UseQueryParser but there was a problem inititializing QueryParser. + [% IF QueryParserError.fallback %] + The 'queryparser_config' entry is missing in your configuration file. + [% QueryParserError.file %] was used instead without success. + [% ELSE %] + The following configuration file was used without success: [% QueryParserError.file %]. + [% END %] +
[% 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' %] - - [% ELSIF config_entry.error == 'queryparser_entry_missing' %] - - - - +
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.
WarningYou have set UseQueryParser but the 'queryparser_config' entry is missing in your configuration - file. [% config_entry.file %] is used as a fallback. -
+ + [% 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' %] + + [% ELSIF config_entry.error == 'queryparser_entry_missing' %] + + + + + [% 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.
WarningYou have set UseQueryParser but the 'queryparser_config' entry is missing in your configuration + file. [% config_entry.file %] is used as a fallback. +
[% END %] - - [% ELSE %] -

No warnings

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

No warnings.

+ [% END %]
-- 1.9.1