[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6485 - Checkout slip should be more useful

Nicole C. Engard nengard at bywatersolutions.com
Sun Jun 12 09:59:33 CEST 2011


From: Jesse Weaver <pianohacker at gmail.com>

This patch makes the following improvements to the checkout slip:

* Does not show the branchname if it is the same as the global
LibraryName, which is useful for single-library catalogs.
* Shows branchaddress* information. This is wrapped in a <div> with
class .slip-address-info, making it easy to disable with
intranetuserjs...
* ... which has been added to the checkout slip.

Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
 .../prog/en/modules/members/moremember-receipt.tt  |   17 +++++++++++++++++
 members/moremember.pl                              |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt
index 4a85ccb..0ef561c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tt
@@ -6,10 +6,18 @@
 
 <script language="javascript">
     function printThenClose() {
+        return;
         window.print();
         window.close();
     }
 </script>
+[% IF ( intranetuserjs ) %]
+    <script type="text/javascript">
+    //<![CDATA[
+    [% intranetuserjs %]
+    //]]>
+    </script>
+[% END %]
 </head>
 <body onload="printThenClose();">
 
@@ -17,6 +25,15 @@
 
 <h3>[% LibraryName %]</h3>
 [% IF ( branchname ) %][% branchname %]<br />[% END %]
+<div class="slip-address-info">
+[% IF ( branchphone ) %][% branchphone %]<br />[% END %]
+[% IF ( branchaddress1 ) %][% branchaddress1 %]<br />[% END %]
+[% IF ( branchaddress2 ) %][% branchaddress2 %]<br />[% END %]
+[% IF ( branchaddress3 ) %][% branchaddress3 %]<br />[% END %]
+[% IF ( branchcity ) %][% branchcity %], [% branchstate %] [% branchzip %]<br />[% END %]
+<br />
+</div>
+
 Checked out to [% firstname %] [% surname %] <br />
 (<a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% cardnumber %]">[% cardnumber %]</a>)<br />
 
diff --git a/members/moremember.pl b/members/moremember.pl
index b766f2f..f8e3dfb 100755
--- a/members/moremember.pl
+++ b/members/moremember.pl
@@ -428,6 +428,9 @@ $template->param( picture => 1 ) if $picture;
 my $branch=C4::Context->userenv->{'branch'};
 
 $template->param(%$data);
+if (C4::Context->preference('LibraryName') eq $branchdetail->{'branchname'}) {
+	$template->param(branchname => '');
+}
 
 if (C4::Context->preference('ExtendedPatronAttributes')) {
     $template->param(ExtendedPatronAttributes => 1);
-- 
1.7.2.3



More information about the Koha-patches mailing list