[bknr-cvs] r2000 - in branches/xml-class-rework/projects/bos: payment-website/infosystem worldpay-test

bknr at bknr.net bknr at bknr.net
Sun Oct 15 14:14:22 UTC 2006


Author: hhubner
Date: 2006-10-15 10:14:22 -0400 (Sun, 15 Oct 2006)
New Revision: 2000

Modified:
   branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js
   branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp
   branches/xml-class-rework/projects/bos/worldpay-test/reports-xml-handler.lisp
   branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp
Log:
Include more info in XML contracts file.
Provide download link for contracts file in admin menu.


Modified: branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js
===================================================================
--- branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js	2006-10-15 13:42:29 UTC (rev 1999)
+++ branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js	2006-10-15 14:14:22 UTC (rev 2000)
@@ -8,7 +8,7 @@
 
 // Debugger anzeigen?
 
-var show_debugger = true;
+var show_debugger = false;
 
 // var http_pfad = "http:// createrainforest.org:8080";
 var http_pfad = "";

Modified: branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp	2006-10-15 13:42:29 UTC (rev 1999)
+++ branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp	2006-10-15 14:14:22 UTC (rev 2000)
@@ -4,12 +4,16 @@
 (enable-interpol-syntax)
 
 (defmacro with-xml-response (req &body body)
-  `(with-http-response (req *ent* :content-type "text/xml")
-    (with-http-body (req *ent*)
-      (let ((*xml-sink* (make-character-stream-sink net.html.generator:*html-stream* :canonical nil)))
-	(with-xml-output *xml-sink*
-	  (with-element "response"
-	    , at body))))))
+  `(with-http-response (,req *ent* :content-type "text/xml")
+     (with-query-params (,req download)
+       (when download
+	 (setf (reply-header-slot-value ,req :content-disposition)
+	       (format nil "attachment; filename=~A" download))))
+     (with-http-body (,req *ent*)
+       (let ((*xml-sink* (make-character-stream-sink net.html.generator:*html-stream* :canonical nil)))
+	 (with-xml-output *xml-sink*
+	   (with-element "response"
+	     , at body))))))
 
 (defmacro with-xml-error-handler (req &body body)
   `(handler-case

Modified: branches/xml-class-rework/projects/bos/worldpay-test/reports-xml-handler.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/reports-xml-handler.lisp	2006-10-15 13:42:29 UTC (rev 1999)
+++ branches/xml-class-rework/projects/bos/worldpay-test/reports-xml-handler.lisp	2006-10-15 14:14:22 UTC (rev 2000)
@@ -37,7 +37,10 @@
 (defreport all-contracts ()
   (dolist (contract *contracts-to-process*)
     (with-element "contract"
+      (attribute "id" (store-object-id contract))
+      (attribute "sponsor-id" (store-object-id (contract-sponsor contract)))
       (attribute "universal-time" (contract-date contract))
+      (attribute "paid" (contract-paidp contract))
       (attribute "date-time" (format-date-time (contract-date contract) :xml-style t))
       (attribute "country" (sponsor-country (contract-sponsor contract)))
       (attribute "sqm-count" (length (contract-m2s contract))))))

Modified: branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp	2006-10-15 13:42:29 UTC (rev 1999)
+++ branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp	2006-10-15 14:14:22 UTC (rev 2000)
@@ -63,6 +63,7 @@
        (:tr (:td "Show new sponsors (enter count)")
 	    (:td (text-field "count" :size 4)))
        (:tr (:td (submit-button "search" "search")))
+       (:tr (:td "") (:td ((:a :href "/reports-xml/all-contracts?download=contracts.xls") "Download complete sponsor DB in XML format")))
        (:tr ((:th :colspan "2" :align "left")
 	     (:h2 "Create sponsor")))
        (:tr (:td "Date (DD.MM.YYYY)")




More information about the Bknr-cvs mailing list