From bknr@bknr.net Wed Jan 28 11:09:09 2009 From: BKNR Commits To: bknr-cvs@common-lisp.net Subject: [bknr-cvs] hans changed trunk/projects/bos/ Date: Wed, 28 Jan 2009 12:12:49 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8597136363021124270==" --===============8597136363021124270== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/projects/bos/m2/mail-generator.lisp 2009-01-27 07:12:45 UTC (rev 41= 69) +++ trunk/projects/bos/m2/mail-generator.lisp 2009-01-28 11:12:48 UTC (rev 41= 70) @@ -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))))) =20 (defun mail-print-pdf (contract) (send-system-mail @@ -287,8 +288,9 @@ :encoding :base64 :content (file-contents (contract-pdf-pat= hname 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))))) =20 (defun mail-backoffice-sponsor-data (contract numsqm country email name addr= ess language request-params) (let* ((contract-id (store-object-id contract)) Modified: trunk/projects/bos/payment-website/static/poi-ms/poi-ms.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/projects/bos/payment-website/static/poi-ms/poi-ms.html 2009-01-27 0= 7:12:45 UTC (rev 4169) +++ trunk/projects/bos/payment-website/static/poi-ms/poi-ms.html 2009-01-28 1= 1:12:48 UTC (rev 4170) @@ -1,12 +1,12 @@ - + POI Microsite - + Modified: trunk/projects/bos/web/startup.lisp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 instea= d.~ @@ -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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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) " "))))) =20 +(define-bknr-tag google-maps-script () + (html ((:script :src (format nil "http://maps.google.com/maps?file=3Dapi&a= mp;v=3D2&key=3D~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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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) =20 (defclass bos-website (website) - ()) + ((google-maps-api-key :initarg :google-maps-api-key + :reader website-google-maps-api-key))) =20 (defmethod website-show-page ((website bos-website) fn title) (html Modified: trunk/projects/bos/web/webserver.lisp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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*)) =20 -(defun publish-website (&key website-directory website-url (worldpay-test-mo= de t)) +(defun publish-website (&key website-directory + website-url + (worldpay-test-mode t) + google-maps-api-key) + (setf *website-directory* website-directory) =20 (when website-url @@ -156,6 +160,7 @@ =20 (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-handle= r) --===============8597136363021124270==--