Bugzilla – Attachment 178684 Details for
Bug 38087
Ship a default print template for the welcome notice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38087: Add atomicupdate
Bug-38087-Add-atomicupdate.patch (text/plain), 2.87 KB, created by
Martin Renvoize (ashimema)
on 2025-02-25 14:11:17 UTC
(
hide
)
Description:
Bug 38087: Add atomicupdate
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-02-25 14:11:17 UTC
Size:
2.87 KB
patch
obsolete
>From ede915cee54f227a642ea4a2cfe4f7755995a1e9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 25 Feb 2025 14:10:12 +0000 >Subject: [PATCH] Bug 38087: Add atomicupdate > >--- > .../data/mysql/atomicupdate/bug_38087.pl | 20 +++++++++++++++++++ > 1 file changed, 20 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_38087.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_38087.pl b/installer/data/mysql/atomicupdate/bug_38087.pl >new file mode 100755 >index 00000000000..cec5c562324 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_38087.pl >@@ -0,0 +1,20 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "38087", >+ description => "Add print welcome notice", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, message_transport_type, lang, content) >+ VALUES ('members', 'WELCOME', '', 'Welcome notice', 1, '[% USE Koha %][% IF Koha.Preference("LibraryName") %]Welcome to [% Koha.Preference("LibraryName") %][% ELSE %]Welcome to the library[% END %]', 'print', 'default', '[% USE Koha %]\r\n<div class=\"container mt-5\">\r\n<div class=\"row\">\r\n <div class=\"col-6\">\r\n <p>\r\n <strong>[% borrower.firstname %] [% borrower.surname %]</strong><br>\r\n [% borrower.address %]<br>\r\n [% borrower.city %] [% borrower.zipcode %]<br>\r\n [% borrower.country %]<br>\r\n </p>\r\n </div>\r\n <div class=\"col-6 text-end\">\r\n <p>\r\n <strong>[% branch.branchname %]</strong><br>\r\n [% branch.branchaddress1 %]<br>\r\n [% branch.branchaddress2 %]<br>\r\n </p>\r\n </div>\r\n <div class=\"row mb-4\">\r\n <div class=\"col-12\">\r\n <p class=\"text-end\">\r\n <strong>[% today %]</strong>\r\n </p>\r\n </div>\r\n <div class=\"row mb-4\">\r\n <div class=\"col-12\">\r\n <p>Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %]</p>\r\n </div>\r\n </div>\r\n <div class=\"row mb-4\">\r\n <div class=\"col-12\">\r\n <p>\r\n Thank you for joining [% IF Koha.Preference("LibraryName") %][% Koha.Preference("LibraryName") %][% ELSE %]the library[% END %]<br>\r\n </p>\r\n <p>\r\n You can search for all our materials in our <a href="[% Koha.Preference("OPACBaseURL") %]">catalog</a>.<br>\r\n </p>\r\n <p>\r\n Your library card number is [% borrower.cardnumber %]<br>\r\n </p>\r\n <p>\r\n If you have any problems or questions regarding your account, please contact the library.<br>\r\n </p>\r\n </div>\r\n </div>\r\n</div>') >+ } >+ ); >+ >+ say_success( $out, "Added notice 'WELCOME'" ); >+ }, >+}; >-- >2.48.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 38087
:
172386
|
172398
|
178683
|
178684
|
179199
|
179200
|
179586
|
179587