Bugzilla – Attachment 77357 Details for
Bug 19743
Header and Footer should be updated on each item for checkin / checkout / renewal notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19743: Update header and footer on each item for checkin / checkout / renewal notices
Bug-19743-Update-header-and-footer-on-each-item-fo.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2018-07-31 20:12:47 UTC
(
hide
)
Description:
Bug 19743: Update header and footer on each item for checkin / checkout / renewal notices
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-07-31 20:12:47 UTC
Size:
2.22 KB
patch
obsolete
>From e7b09d70ab1b6bf529fc8144279df1075aecc593 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 4 Dec 2017 16:16:52 +0000 >Subject: [PATCH] Bug 19743: Update header and footer on each item for checkin > / checkout / renewal notices > >When generating the checkout notice for a patron we only update the >section in between the '---' tags > >For template toolkit purposes it means we cannot affect the content >based on more than a single item. For instance, we want to add the total >cost of all items checked out. > >Test Plan: >1) Add "Thank you for visiting <<branches.branchname>>." to the bottom of the checkout notice. Below the second '----'. >2) Check out an item to a patron to generate that notice >3) Note the branch name in the notice >4) Update the branch name in the branches editor, change it to something else >5) Check out a 2nd item to that patron >6) Notice the items list updated, but the branch name did not >7) Apply this patch >8) Check out a 3rd item to that patron >9) Notice the branch name updated this time > >Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Message.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/Message.pm b/C4/Message.pm >index 30b71c827c..3783ce85b9 100644 >--- a/C4/Message.pm >+++ b/C4/Message.pm >@@ -311,10 +311,12 @@ If passed a string, it'll append the string to the message. > # $object->append($letter_or_item) -- add a new item to a message's content > sub append { > my ($self, $letter_or_item, $format) = @_; >- my $item; >+ my ( $item, $header, $footer ); > if (ref($letter_or_item)) { > my $letter = $letter_or_item; > my $metadata = _metadata($letter); >+ $header = $metadata->{header}; >+ $footer = $metadata->{footer}; > $item = $metadata->{body}->[0]; > } else { > $item = $letter_or_item; >@@ -325,6 +327,8 @@ sub append { > } > my $metadata = $self->metadata; > push @{$metadata->{body}}, $item; >+ $metadata->{header} = $header; >+ $metadata->{footer} = $footer; > $self->metadata($metadata); > my $new_content = $self->render_metadata($format); > return $self->content($new_content); >-- >2.11.0
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 19743
:
69482
|
69484
|
70533
|
70534
|
77252
|
77253
| 77357 |
77358