Revision: 4170 Author: hans URL: http://bknr.net/trac/changeset/4170
checkpoint google maps work U trunk/projects/bos/m2/mail-generator.lisp U trunk/projects/bos/payment-website/static/poi-ms/poi-ms.html U trunk/projects/bos/web/startup.lisp U trunk/projects/bos/web/tags.lisp U trunk/projects/bos/web/web-utils.lisp U trunk/projects/bos/web/webserver.lisp
Modified: trunk/projects/bos/m2/mail-generator.lisp =================================================================== --- trunk/projects/bos/m2/mail-generator.lisp 2009-01-27 07:12:45 UTC (rev 4169) +++ trunk/projects/bos/m2/mail-generator.lisp 2009-01-28 11:12:48 UTC (rev 4170) @@ -261,8 +261,9 @@ :subtype "mixed" :content parts) t t)))) - (ignore-errors - (delete-file (contract-pdf-pathname contract :print t)))) + (when *enable-mails* + (ignore-errors + (delete-file (contract-pdf-pathname contract :print t)))))
(defun mail-print-pdf (contract) (send-system-mail @@ -287,8 +288,9 @@ :encoding :base64 :content (file-contents (contract-pdf-pathname contract :print t))))) t t))) - (ignore-errors - (delete-file (contract-pdf-pathname contract :print t)))) + (when *enable-mails* + (ignore-errors + (delete-file (contract-pdf-pathname contract :print t)))))
(defun mail-backoffice-sponsor-data (contract numsqm country email name address language request-params) (let* ((contract-id (store-object-id contract))
Modified: trunk/projects/bos/payment-website/static/poi-ms/poi-ms.html =================================================================== --- trunk/projects/bos/payment-website/static/poi-ms/poi-ms.html 2009-01-27 07:12:45 UTC (rev 4169) +++ trunk/projects/bos/payment-website/static/poi-ms/poi-ms.html 2009-01-28 11:12:48 UTC (rev 4170) @@ -1,12 +1,12 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:bos="http://headcraft.de/bos"> <head> <title>POI Microsite </title> <link rel="stylesheet" type="text/css" href="poi-ms.css"/> <script src="/static/MochiKit/MochiKit.js" type="text/javascript"> </script> <script src="/static/jquery-nightly.js" type="text/javascript"> </script> <script src="poi-ms.js" type="text/javascript"> </script> - <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA5meUSZ1F7u46UjJHEXSlJhSjRafg-mK9ocVykr2yWZT0eqYCERSER_a6AB49FBiDXdm_NDfIDZUmIg" type="text/javascript"> </script> + bos:google-maps-script/ <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <body>
Modified: trunk/projects/bos/web/startup.lisp =================================================================== --- trunk/projects/bos/web/startup.lisp 2009-01-27 07:12:45 UTC (rev 4169) +++ trunk/projects/bos/web/startup.lisp 2009-01-28 11:12:48 UTC (rev 4170) @@ -23,6 +23,7 @@ (website-url (format nil "http://~A" host) website-url-given) worldpay-test-mode (google-analytics-account "UA-3432041-1") + google-maps-api-key start-frontend) (when website-url-given (warn "Specifying :website-url in web.rc is deprecated. Use :host instead.~ @@ -37,7 +38,8 @@ (unpublish) (bos.web::publish-website :website-directory *website-directory* :website-url *website-url* - :worldpay-test-mode *worldpay-test-mode*) + :worldpay-test-mode *worldpay-test-mode* + :google-maps-api-key google-maps-api-key) (format t "~&; Starting hunchentoot.~%") (force-output) (when *webserver*
Modified: trunk/projects/bos/web/tags.lisp =================================================================== --- trunk/projects/bos/web/tags.lisp 2009-01-27 07:12:45 UTC (rev 4169) +++ trunk/projects/bos/web/tags.lisp 2009-01-28 11:12:48 UTC (rev 4170) @@ -13,6 +13,11 @@ (html ((:option :value (format nil "/~a/index" language-symbol) :selected "selected") " " (:princ language-name) " ")) (html ((:option :value (format nil "/~a/index" language-symbol)) " " (:princ language-name) " ")))))
+(define-bknr-tag google-maps-script () + (html ((:script :src (format nil "http://maps.google.com/maps?file=api&v=2&key=~A" + (website-google-maps-api-key *website*)) + :type "text/javascript") ""))) + (define-bknr-tag language-chooser (name) (html ((:select :name name) (language-options-1 (request-language)))))
Modified: trunk/projects/bos/web/web-utils.lisp =================================================================== --- trunk/projects/bos/web/web-utils.lisp 2009-01-27 07:12:45 UTC (rev 4169) +++ trunk/projects/bos/web/web-utils.lisp 2009-01-28 11:12:48 UTC (rev 4170) @@ -3,7 +3,8 @@ (enable-interpol-syntax)
(defclass bos-website (website) - ()) + ((google-maps-api-key :initarg :google-maps-api-key + :reader website-google-maps-api-key)))
(defmethod website-show-page ((website bos-website) fn title) (html
Modified: trunk/projects/bos/web/webserver.lisp =================================================================== --- trunk/projects/bos/web/webserver.lisp 2009-01-27 07:12:45 UTC (rev 4169) +++ trunk/projects/bos/web/webserver.lisp 2009-01-28 11:12:48 UTC (rev 4170) @@ -144,7 +144,11 @@ (defun publish-directory (&key prefix destination) (push (hunchentoot:create-folder-dispatcher-and-handler prefix destination) hunchentoot:*dispatch-table*))
-(defun publish-website (&key website-directory website-url (worldpay-test-mode t)) +(defun publish-website (&key website-directory + website-url + (worldpay-test-mode t) + google-maps-api-key) + (setf *website-directory* website-directory)
(when website-url @@ -156,6 +160,7 @@
(make-instance 'bos-website :name "create-rainforest.org CMS" + :google-maps-api-key google-maps-api-key :handler-definitions `(("/edit-poi-medium" edit-poi-medium-handler) ("/edit-poi" edit-poi-handler) ("/edit-sponsor" edit-sponsor-handler)