Bugzilla – Attachment 144865 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), 4.01 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-12-28 14:20:53 UTC
(
hide
)
Description:
Bug 14251: Add warning in about.pl for missing weasyprint
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-12-28 14:20:53 UTC
Size:
4.01 KB
patch
obsolete
>From 51c723657e913d19286d4a8b1be4722528795b6d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 28 Dec 2022 11:14:24 -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> >--- > about.pl | 5 +++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 8 ++++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/about.pl b/about.pl >index f4d1c7a9598..db9f9a314fd 100755 >--- a/about.pl >+++ b/about.pl >@@ -24,6 +24,7 @@ use Modern::Perl; > > use CGI qw ( -utf8 ); > use DateTime::TimeZone; >+use IPC::Cmd qw(can_run); > use File::Slurp qw( read_file ); > use List::MoreUtils qw( any ); > use Module::Load::Conditional qw( can_load ); >@@ -325,6 +326,10 @@ if ( C4::Context->preference('ILLModule') ) { > $template->param( warnILLConfiguration => $warnILLConfiguration ); > } > >+unless ( can_run('weasyprint') ) { >+ $template->param( weasyprint_missing => 1 ); >+} >+ > { > # XSLT sysprefs > my @xslt_prefs = qw( >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 5b7834a434a..30e1b11a1d5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -219,7 +219,7 @@ > </div> > > <div role="tabpanel" class="tab-pane" id="sysinfo"> >- [% IF warnRequireChoosingExistingAuthority || 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 %] >+ [% IF warnRequireChoosingExistingAuthority || 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 || weasyprint_missing %] > [% 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> >@@ -412,7 +412,11 @@ > Elasticsearch version 5.x is not supported in Koha 20.11 and greater. Please upgrade your Elasticsearch cluster > </td></tr> > [% END %] >- >+ [% IF weasyprint_missing %] >+ <tr><th scope="row"><strong>Warning</strong> </th><td> >+ The <strong>weasyprint</strong> tool is not installed. >+ </td></tr> >+ [% END %] > </table> > [% END %] > >-- >2.34.1
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