From 7ed41b65a4704d03dc78ec76e14732b5d28e01b2 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 29 Oct 2023 16:10:25 +0000 Subject: [PATCH] Bug 35187: Make sure HTML notices use explicit line breaks When a notices is marked as HTML, we need to use block elements (p, div, li, etc.) or explicit line breaks. This adds the line breaks where required. Affects: * ISSUEQSLIP * ISSUESLIP * TRANSFERSLIP * CHECKINSLIP * HOLD_SLIP * WELCOME The biggest change is the WELCOME notices. With this patch it appears no longer on only one line, but properly formatted. To test: WELCOME * Without patch * Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress) * Make sure your patron has an email set * In patron account, use "More > Welcome email" * Verify all text is on one line * Apply patch * reset_all to install new sample notice templates * Repeat test, verify welcome notice is now nice ISSUESLIP, ISSUEQSLIP * Checkout at least 2 items * Print > Print slip * Print > Print quick slip * Verify both look nice! CHECKINSLIP * Return both items * Print checkin slip (button in list of checkouts) * Verfiy... you know, that it looks nice! TRANSFERSLIP * Checkin an item from another library * "Print transfer slip" * Verify again. HOLD_SLIP * Place a hold on a record * Return an item that can fill the hold * "Print slip and confirm" * Verify. * Note: if you compare to before, this also removes a <> appearing instead of the city. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../mysql/en/mandatory/sample_notices.yml | 48 +++++++++---------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 657e78c515..5fed36a67e 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -536,7 +536,6 @@ tables: - "Chapters: <>" - "Notes: <>" - "Format: [% IF article_request.format == 'PHOTOCOPY' %]Copy[% ELSIF article_request.format == 'SCAN' %]Scan[% END %]" - - "" - module: circulation code: CHECKIN @@ -681,17 +680,17 @@ tables: lang: default content: - "
Date: <>
" - - "" + - "
" - "

Transfer to/Hold in <>

" - - "" + - "
" - "

<>, <>

" - - "" + - "
" - "
    " - "
  • <>
  • " - "
  • <>
  • " - "
  • <>
    " - " <>
    " - - " <> <>" + - " <> <>" - "
  • " - "
  • <>
  • " - "
" @@ -707,7 +706,6 @@ tables: - "

Notes:" - "

<>
" - "

" - - "" - module: circulation code: ISSUEQSLIP @@ -722,9 +720,9 @@ tables: - "

<>

" - "Checked out to <> <> <> <>
" - "(<>)
" - - "" + - "
" - "<>
" - - "" + - "
" - "

Checked out today

" - "" - "

" @@ -746,9 +744,9 @@ tables: - "

<>

" - "Checked out to <> <> <> <>
" - "(<>)
" - - "" + - "
" - "<>
" - - "" + - "
" - "

Checked out

" - "" - "

" @@ -757,7 +755,7 @@ tables: - "Date due: <>
" - "

" - "
" - - "" + - "
" - "

Overdues

" - "" - "

" @@ -766,9 +764,9 @@ tables: - "Date due: <>
" - "

" - "
" - - "" + - "
" - "
" - - "" + - "
" - "[% IF additional_contents.count %]" - "

News

" - "[% FOREACH content IN additional_contents %]" @@ -937,9 +935,9 @@ tables: lang: default content: - "
Date: <>
" - - "" + - "
" - "

Transfer to <>

" - - "" + - "
" - "

ITEM

" - "

<>

" - "
<>
" @@ -1441,14 +1439,14 @@ tables: lang: default content: - "[% USE Koha %]" - - "Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %]." - - "" - - "Thank you for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]" - - "" - - "You can search for all our materials in our catalog." - - "" - - "Your library card number is [% borrower.cardnumber %]" - - "" + - "Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %].
" + - "
" + - "Thank you for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]
" + - "
" + - "You can search for all our materials in our catalog.
" + - "
" + - "Your library card number is [% borrower.cardnumber %]
" + - "
" - "If you have any problems or questions regarding your account, please contact the library." - module: members @@ -2180,9 +2178,9 @@ tables: - "

[% branch.branchname %]

" - "Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %]
" - "([% borrower.cardnumber %])
" - - "" + - "
" - "[% today | $KohaDates %]
" - - "" + - "
" - "

Checked in today

" - "[% FOREACH checkin IN old_checkouts %]" - "[% SET item = checkin.item %]" -- 2.39.5