Bugzilla – Attachment 147732 Details for
Bug 14251
Allow use of CSS in discharge letter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14251: Add warning in about.pl for missing weasyprint
Bug-14251-Add-warning-in-aboutpl-for-missing-weasy.patch (text/plain), 6.28 KB, created by
Kyle M Hall (khall)
on 2023-03-03 19:55:14 UTC
(
hide
)
Description:
Bug 14251: Add warning in about.pl for missing weasyprint
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-03-03 19:55:14 UTC
Size:
6.28 KB
patch
obsolete
>From 2c10f2cbfb7f50140a41c2d7282c681f30421176 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 3 Feb 2023 15:18:13 -0300 >Subject: [PATCH] Bug 14251: Add warning in about.pl for missing weasyprint > >To test: >1. Have weasyprint installed >2. Go to the About > System information page >=> SUCCESS: No warning about weasyprint >3. Uninstall weasyprint >4. Repeat 2 >=> SUCCESS: A warning is displayed and makes sense >5. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > about.pl | 4 ++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 10 ++++++++-- > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/about.pl b/about.pl >index f4d1c7a959..dfebe5ded0 100755 >--- a/about.pl >+++ b/about.pl >@@ -25,6 +25,7 @@ use Modern::Perl; > use CGI qw ( -utf8 ); > use DateTime::TimeZone; > use File::Slurp qw( read_file ); >+use IPC::Cmd qw(can_run); > use List::MoreUtils qw( any ); > use Module::Load::Conditional qw( can_load ); > use Config qw( %Config ); >@@ -324,6 +325,9 @@ if ( C4::Context->preference('ILLModule') ) { > > $template->param( warnILLConfiguration => $warnILLConfiguration ); > } >+unless ( can_run('weasyprint') ) { >+ $template->param( weasyprint_missing => 1 ); >+} > > { > # XSLT sysprefs >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index bfde0eca10..1ba35d513e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -267,7 +267,7 @@ > [% SET warnMissingCompiledFiles = 1 %] > [% END %] > [% WRAPPER tab_panel tabname= "sysinfo" %] >- [% IF warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing || warnMissingCompiledFiles%] >+ [% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing || warnMissingCompiledFiles%] > [% IF (warnIsRootUser) %] > <h2>Warning regarding current user</h2> > <p>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.</p> >@@ -382,7 +382,7 @@ > Contact your system administrator. > [% END # /IF warnConnectBroker %] > >- [% IF warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %] >+ [% IF weasyprint_missing || warnPrefRequireChoosingExistingAuthority || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %] > <h2>Warnings regarding the system configuration</h2> > <table> > <caption>Preferences and parameters</caption> >@@ -520,6 +520,12 @@ > [% END %] > [% END %] > >+ [% IF weasyprint_missing %] >+ <tr><th scope="row"><strong>Warning</strong> </th><td> >+ The <strong>weasyprint</strong> tool is not installed. >+ </td></tr> >+ [% END %] >+ > [% IF oauth2_missing_deps %] > <tr> > <th scope="row"><strong>Warning</strong> </th> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14251
:
39365
|
144863
|
144864
|
144865
|
144866
|
146168
|
146169
|
146170
|
146295
|
146296
|
146297
|
146310
|
146311
|
146312
|
147731
| 147732 |
147733