[Koha-devel] Sending orders by email

Edgar Fuß ef at math.uni-bonn.de
Wed Jul 27 17:08:11 CEST 2011


Sorry, there was an error in the template patch (``Send Email'' appearing for closed baskets, not open).
I hope I got it right this time.
-------------- next part --------------
diff -ru a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js
--- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js	2011-07-25 13:29:06.000000000 +0200
+++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js	2011-07-27 15:45:33.000000000 +0200
@@ -388,6 +388,14 @@
 	}
 }
 
+function closeandmail(bs, bg){
+	if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandmail&booksellerid=' + bs + '&basketgroupid=' + bg ){
+		setTimeout("window.location.reload();",3000);
+	}else{
+		alert('Error downloading the file');
+	}
+}
+
 //function that lets the user unclose a basketgroup as long as he hasn't submitted the changes to the page.
 function unclosegroup(bgid){
     var div = document.getElementById('basketgroup-'+bgid+'-closed').parentNode;
diff -ru a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt	2011-07-25 13:29:06.000000000 +0200
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt	2011-07-27 16:55:41.000000000 +0200
@@ -297,6 +297,13 @@
 		        				<li>
 		        					<span class="yui-button yui-link-button">
 		        						<span class="first-child">
+		        							<a href="/cgi-bin/koha/acqui/basketgroup.pl?op=closeandmail&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button">Close & Send Email</a>
+	        							</span>
+        							</span>
+       							</li>
+		        				<li>
+		        					<span class="yui-button yui-link-button">
+		        						<span class="first-child">
 		        							<a href="?op=add&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button" >Edit</a>
 	        							</span>
         							</span>
@@ -333,6 +340,13 @@
 	        								</span>
         								</span>
 			        				</li>
+								<li>
+									<span class="yui-button yui-link-button">
+										<span class="first-child">
+											<a href="/cgi-bin/koha/acqui/basketgroup.pl?op=mail&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button">Send Email</a>
+										</span>
+									</span>
+								</li>
 			        				<li>
 										<span class="yui-button yui-link-button">
 			        						<span class="first-child">
diff -ru a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt	2011-07-25 13:29:06.000000000 +0200
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt	2011-07-27 14:22:21.000000000 +0200
@@ -210,6 +210,11 @@
                                     [% ELSE %]
                                     <option value="reserves">Holds</option>
                                     [% END %]
+                                    [% IF ( orders ) %]
+                                    <option value="orders" selected="selected">Orders</option>
+                                    [% ELSE %]
+                                    <option value="orders">Orders</option>
+                                    [% END %]
                                     [% IF ( members ) %]
                                     <option value="members" selected="selected">Members</option>
                                     [% ELSE %]


More information about the Koha-devel mailing list