In bug 35279 we added code to allow falling back to print when an email address isn't found. However, we neglected to clone the sample email template to print so one still has to define the print version of the notice. We should ship with a default.
Created attachment 172386 [details] [review] Bug 38087: Add print template for WELCOME notice at install time This patch adds a default print template for the welcome notice. It will be installed at install time but will not be added at upgrade time. It will also be available as the default under the notice templates tool. Test plan 1) Apply the patch 2) Under 'Tools > Notices and Slips' select the 'WELCOME' notice to edit 3) Click 'View default' under the 'Print' message transport type 4) Note the new default template is shown 5) Use 'Copy to template' to apply it to the notice 6) Use a user (Henry perhaps under sandboxes) without an email address to test the template by 6a) Under 'more' click 'Send welcome notice' 7) Preview the pending print notice under the patrons notices tab by clicking the notice title. 8) Confirm the notice looks reasonable and sign off
Created attachment 172398 [details] [review] Bug 38087: Add print template for WELCOME notice at install time This patch adds a default print template for the welcome notice. It will be installed at install time but will not be added at upgrade time. It will also be available as the default under the notice templates tool. Test plan 1) Apply the patch 2) Under 'Tools > Notices and Slips' select the 'WELCOME' notice to edit 3) Click 'View default' under the 'Print' message transport type 4) Note the new default template is shown 5) Use 'Copy to template' to apply it to the notice 6) Use a user (Henry perhaps under sandboxes) without an email address to test the template by 6a) Under 'more' click 'Send welcome notice' 7) Preview the pending print notice under the patrons notices tab by clicking the notice title. 8) Confirm the notice looks reasonable and sign off Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Thanks for the testing and signoff Laura
This patch adds a default print template for the welcome notice. It will be installed at install time but will not be added at upgrade time. That is unusual. Please explain why.
Created attachment 178683 [details] [review] Bug 38087: Add print template for WELCOME notice at install time This patch adds a default print template for the welcome notice. It will be installed at install time but will not be added at upgrade time. It will also be available as the default under the notice templates tool. Test plan 1) Apply the patch 2) Under 'Tools > Notices and Slips' select the 'WELCOME' notice to edit 3) Click 'View default' under the 'Print' message transport type 4) Note the new default template is shown 5) Use 'Copy to template' to apply it to the notice 6) Use a user (Henry perhaps under sandboxes) without an email address to test the template by 6a) Under 'more' click 'Send welcome notice' 7) Preview the pending print notice under the patrons notices tab by clicking the notice title. 8) Confirm the notice looks reasonable and sign off Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Created attachment 178684 [details] [review] Bug 38087: Add atomicupdate
Created attachment 179199 [details] [review] Bug 38087: Add print template for WELCOME notice at install time This patch adds a default print template for the welcome notice. It will be installed at install time but will not be added at upgrade time. It will also be available as the default under the notice templates tool. Test plan 1) Apply the patch 2) Under 'Tools > Notices and Slips' select the 'WELCOME' notice to edit 3) Click 'View default' under the 'Print' message transport type 4) Note the new default template is shown 5) Use 'Copy to template' to apply it to the notice 6) Use a user (Henry perhaps under sandboxes) without an email address to test the template by 6a) Under 'more' click 'Send welcome notice' 7) Preview the pending print notice under the patrons notices tab by clicking the notice title. 8) Confirm the notice looks reasonable and sign off Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Created attachment 179200 [details] [review] Bug 38087: Add atomicupdate Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
I am pondering the same as Marcel, but in the other direction. I am pondering to drop the second patch and be happy with the new installations + reset option. OK or am I missing something because it's the print one? When updating Koha installations we try to have the "least surprise" and avoid behavior change. Now that we have the notice reset feature (which honestly is awesome) libraries can add a print notice any time from that and it will be also the translated version in their language. We also discussed on another bug how to make the reset feature more prominent for creating notices from scratch. But another question: I notice a lot of unusual CSS classes in the template, can you explain about these? <div class=\"col-6\"> <div class=\"col-6 text-end\"> <div class=\"row mb-4\"> We don't have any of these in other notices and I believe there is no sample CSS to use them, so maybe we should remove from the sample or add some notes on how to make use of them for formatting? Waiting for feedback - will get back to this asap then.
I wrote this long enough ago that I can't entirely remember the specifics of the classes.. it was written as a way to easy testing some of the CSS bugs and the staff client notices display and print pages bug... the classes are likely referring to those patches.. and as far as I can tell now they're all just standard bootstrap 5.
(In reply to Martin Renvoize (ashimema) from comment #10) > I wrote this long enough ago that I can't entirely remember the specifics of > the classes.. it was written as a way to easy testing some of the CSS bugs > and the staff client notices display and print pages bug... the classes are > likely referring to those patches.. and as far as I can tell now they're all > just standard bootstrap 5. I was wondering because it's for the print layout and I think then they probably won't be applied, but I am not sure. We can still simplify later, I won't change the template for now but leave off the database update.
Created attachment 179586 [details] Screenshot of notice preview with classes as used here.
See screenshot.. that's how the notice looks for the Henry user in KTD with the classes in tact.. personally.. I think that's a reasonable display for a print style notice and would prefer not to remove them.
They are applied correctly in the preview.. I think that's actually what a lot of this we added to test in fact if memory serves
Created attachment 179587 [details] [review] Bug 38087: (follow-up) Add missing div to template We lost a closing div somewhere during the life of this patchset
I agree the display in the preview is quite nice, I was pretty sure it would work in Koha, just not sure it work with the gather_print_notices.pl - I need to do some testing there if I want to find out, but the classes won't hurt.
I've removed the database update, rest left as is.
Pushed for 25.05! Well done everyone, thank you!