Add LIBRARY_PHONE, LIBRARY_EMAIL receipt macros user/jeff/receipt_library_phone_and_email
authorJeff Godin <jgodin@tadl.org>
Mon, 10 Oct 2011 20:30:38 +0000 (16:30 -0400)
committerJeff Godin <jgodin@tadl.org>
Mon, 10 Oct 2011 20:30:38 +0000 (16:30 -0400)
Add two new receipt template macros:
%LIBRARY_PHONE%
%LIBRARY_EMAIL%

These correspond with the phone and email attributes for the
workstation's OU -- the same OU used by the existing %LIBRARY%
and %SHORTNAME% macros.

Open-ILS/xul/staff_client/chrome/content/util/print.js
Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js

index bb3b611..4df451d 100644 (file)
@@ -329,6 +329,10 @@ util.print.prototype = {
 
             try{b = s; s = s.replace(/%LIBRARY%/g,this.escape_html(params.lib.name()));}
                 catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
+            try{b = s; s = s.replace(/%LIBRARY_PHONE%/g,this.escape_html(params.lib.phone()));}
+                catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
+            try{b = s; s = s.replace(/%LIBRARY_EMAIL%/g,this.escape_html(params.lib.email()));}
+                catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
             try{b = s; s = s.replace(/%PINES_CODE%/g,this.escape_html(params.lib.shortname()));}
                 catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}
             try{b = s; s = s.replace(/%SHORTNAME%/g,this.escape_html(params.lib.shortname()));}
index 352d0c6..b7e3123 100644 (file)
@@ -262,7 +262,7 @@ circ.print_list_template_editor.prototype = {
                                             + '<h1>' 
                                             + document.getElementById('circStrings').getString('staff.circ.print_list_template.window.heading')
                                             + '</h1>'
-                                            + '<p>%LIBRARY%, %SHORTNAME%, %LINE_NO%, '
+                                            + '<p>%LIBRARY%, %LIBRARY_PHONE%, %LIBRARY_EMAIL%, %SHORTNAME%, %LINE_NO%, '
                                             + '%STAFF_FIRSTNAME%, %STAFF_LASTNAME%, %STAFF_BARCODE%, %STAFF_PROFILE%, '
                                             + '%PATRON_FIRSTNAME%, %PATRON_ALIAS%, %PATRON_ALIAS_OR_FIRSTNAME%, %PATRON_LASTNAME%, '
                                             + '%PATRON_BARCODE%, %patron_barcode%, '