Bugzilla – Attachment 160411 Details for
Bug 35682
Provide ability to specify color in DB upgrades
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35682: WIP Attemp to move colors from terminal into nice HTML
Bug-35682-WIP-Attemp-to-move-colors-from-terminal-.patch (text/plain), 2.10 KB, created by
Pedro Amorim
on 2024-01-02 16:04:11 UTC
(
hide
)
Description:
Bug 35682: WIP Attemp to move colors from terminal into nice HTML
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-01-02 16:04:11 UTC
Size:
2.10 KB
patch
obsolete
>From 3a778f2b19e73a0f9e5262eae968ad46e7f2af38 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 2 Jan 2024 15:57:56 +0000 >Subject: [PATCH] Bug 35682: WIP Attemp to move colors from terminal into nice > HTML > >You need to manually set version in Koha.pm to something before the test dbrev here. >Version systempreference also needs to match the above (no action needed if testing for the first time) >--- > C4/Installer.pm | 12 +++++++++++- > .../intranet-tmpl/prog/en/modules/installer/step3.tt | 2 +- > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/C4/Installer.pm b/C4/Installer.pm >index 7e248a17aa..1fb6b24043 100644 >--- a/C4/Installer.pm >+++ b/C4/Installer.pm >@@ -26,6 +26,7 @@ use YAML::XS; > use File::Slurp qw( read_file ); > use DBI; > >+use HTML::FromANSI (); > use C4::Context; > use Koha::Schema; > use Koha; >@@ -818,8 +819,17 @@ sub generate_output_db_entry { > push @output, sprintf "\t%s", $line; > } > } >+ my @coutput; >+ foreach my $line ( @output ) { > >- return \@output; >+ my $h = HTML::FromANSI->new( >+ tt => 0, >+ font_face => '', >+ style => '', >+ ); >+ push @coutput, $h->ansi2html($line); >+ } >+ return \@coutput; > } > > sub get_atomic_updates { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >index 3198cddd9d..c55f4d1ab4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -381,7 +381,7 @@ > <ul> > [% FOR s IN atomic_updates.success %] > [% FOR o IN s.output %] >- <li>[% o | html %]</li> >+ <li>[% o %]</li> > [% IF s.output.size > 1 %] > [% IF loop.first %]<ul>[% ELSIF loop.last %]</ul>[% END %] > [% END %] >-- >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 35682
:
160409
|
160410
| 160411