[bknr-cvs] r1872 - in branches/xml-class-rework/projects/lisp-ecoop: src website/templates

bknr at bknr.net bknr at bknr.net
Thu Feb 23 06:38:33 UTC 2006


Author: hhubner
Date: 2006-02-23 00:38:33 -0600 (Thu, 23 Feb 2006)
New Revision: 1872

Modified:
   branches/xml-class-rework/projects/lisp-ecoop/src/
   branches/xml-class-rework/projects/lisp-ecoop/src/macros.lisp
   branches/xml-class-rework/projects/lisp-ecoop/src/packages.lisp
   branches/xml-class-rework/projects/lisp-ecoop/src/participant.lisp
   branches/xml-class-rework/projects/lisp-ecoop/src/tags.lisp
   branches/xml-class-rework/projects/lisp-ecoop/src/webserver.lisp
   branches/xml-class-rework/projects/lisp-ecoop/website/templates/edit-submission.xml
   branches/xml-class-rework/projects/lisp-ecoop/website/templates/toplevel.xml
Log:
Prepared the website to work under Apache and mod_proxy.  Started to
change the application class schema to allow for multiple documents
in one submission.



Property changes on: branches/xml-class-rework/projects/lisp-ecoop/src
___________________________________________________________________
Name: svn:ignore
   + participants.txt


Modified: branches/xml-class-rework/projects/lisp-ecoop/src/macros.lisp
===================================================================
--- branches/xml-class-rework/projects/lisp-ecoop/src/macros.lisp	2006-02-23 06:35:29 UTC (rev 1871)
+++ branches/xml-class-rework/projects/lisp-ecoop/src/macros.lisp	2006-02-23 06:38:33 UTC (rev 1872)
@@ -36,8 +36,9 @@
     ;; the eval-when is there to create the index access functions at compile time
     `(eval-when (:compile-toplevel :load-toplevel :execute)
       (defclass ,class ,superclasses
-	,slots
+	((bknr.datastore::id :attribute t)
+         , at slots)
 	(:metaclass persistent-xml-class)
-	(:dtd-name *dtd*)
+        (:unique-id-slot bknr.datastore::id)
 	, at class-options))))
 

Modified: branches/xml-class-rework/projects/lisp-ecoop/src/packages.lisp
===================================================================
--- branches/xml-class-rework/projects/lisp-ecoop/src/packages.lisp	2006-02-23 06:35:29 UTC (rev 1871)
+++ branches/xml-class-rework/projects/lisp-ecoop/src/packages.lisp	2006-02-23 06:38:33 UTC (rev 1872)
@@ -32,6 +32,7 @@
 	:bknr.indices
 	:bknr.user
 	:bknr.images
+        :bknr.impex
 	:lisp-ecoop.config
 	:net.aserve
 	:net.post-office
@@ -56,6 +57,7 @@
 	   #:submission-add-submitter
 	   #:submission-remove-submitter
 	   #:submission-timeslot
+           #:submission-documents
 	   #:timeslot))
 
 (defpackage :lisp-ecoop.tags

Modified: branches/xml-class-rework/projects/lisp-ecoop/src/participant.lisp
===================================================================
--- branches/xml-class-rework/projects/lisp-ecoop/src/participant.lisp	2006-02-23 06:35:29 UTC (rev 1871)
+++ branches/xml-class-rework/projects/lisp-ecoop/src/participant.lisp	2006-02-23 06:38:33 UTC (rev 1872)
@@ -2,12 +2,16 @@
 
 (enable-interpol-syntax)
 
-(define-lisp-ecoop-class submission (blob)
+(define-lisp-ecoop-class document (blob)
+  ((info :update :documentation "Short information for the document (e.g. 'Slides' or 'Draft Paper')"))
+  (:default-initargs :type "application/pdf"))
+
+(define-lisp-ecoop-class submission ()
   ((title :update :documentation "Title of the submission" :initform nil :attribute t)
    (abstract :update :documentation "Abstract or short description" :initform nil :element t)
-   (submitters :update :documentation "List of participants who submitted this" :initform nil :element t)
-   (timeslot :update :documentation "Timeslot scheduled for this submission" :initform nil :attribute t))
-  (:default-initargs :type "application/pdf"))
+   (submitters :update :documentation "List of participants who submitted this" :initform nil :element t :containment :+)
+   (timeslot :update :documentation "Timeslot scheduled for this submission" :initform nil :attribute t)
+   (documents :update :documentation "List of documents attached to this submission" :initform nil :element t)))
 
 (defmethod destroy-object :before ((timeslot timeslot))
   (when (subtypep (type-of (timeslot-content timeslot)) 'submission)
@@ -44,6 +48,7 @@
 
 (define-lisp-ecoop-class participant (user)
   ((login :read :attribute t)
+   (email :read :attribute t)
    (url :update :documentation "Personal Website URL" :initform nil :attribute t)
    (picture :update :documentation "Photo of the participant" :element t)
    (submissions :update :documentation "Submitted documents" :initform nil :element t)

Modified: branches/xml-class-rework/projects/lisp-ecoop/src/tags.lisp
===================================================================
--- branches/xml-class-rework/projects/lisp-ecoop/src/tags.lisp	2006-02-23 06:35:29 UTC (rev 1871)
+++ branches/xml-class-rework/projects/lisp-ecoop/src/tags.lisp	2006-02-23 06:38:33 UTC (rev 1872)
@@ -93,10 +93,11 @@
 
 (defun submission-info (submission)
   (if submission
-      (with-open-file (submission-file (blob-pathname submission))
-	(format nil "(~D bytes, uploaded ~A)"
-		(file-length submission-file)
-		(format-date-time (file-write-date submission-file))))
+      (dolist (document (submission-documents submission))
+        (with-open-file (submission-file (blob-pathname document))
+          (format nil "(~D bytes, uploaded ~A)"
+                  (file-length submission-file)
+                  (format-date-time (file-write-date submission-file)))))
       "[no submission uploaded]"))
 
 (defvar *submission*)
@@ -314,6 +315,7 @@
 
 (define-bknr-tag page (&key children name)
   (setf (get-template-var :title) name)
+  (setf (get-template-var :base) (website-base-href *website*))
   (let* ((expander bknr.web::*template-expander*)
          (pathname (find-template-pathname expander "toplevel"))
          (toplevel (bknr.web::get-cached-template pathname expander))

Modified: branches/xml-class-rework/projects/lisp-ecoop/src/webserver.lisp
===================================================================
--- branches/xml-class-rework/projects/lisp-ecoop/src/webserver.lisp	2006-02-23 06:35:29 UTC (rev 1871)
+++ branches/xml-class-rework/projects/lisp-ecoop/src/webserver.lisp	2006-02-23 06:38:33 UTC (rev 1872)
@@ -8,7 +8,7 @@
 (defun make-daily-statistics ()
   (bknr.stats::make-yesterdays-stats :delete-events t :remove-referer-hosts '("lisp-ecoop.bknr.net")))
 
-(defun publish-lisp-ecoop (&key (port *webserver-port*) (listeners 20))
+(defun publish-lisp-ecoop (&key (port *webserver-port*) (listeners 20) (base-href "/"))
 
   (unless (bknr.cron:cron-job-with-name "daily webserver statistics")
     (bknr.cron:make-cron-job "daily webserver statistics" 'make-daily-statistics
@@ -16,6 +16,7 @@
 
   (make-instance 'website
 		 :name "LISP ECOOP CMS"
+                 :base-href base-href
 		 :handler-definitions `(("/" redirect-handler
 					 :to "news")
 					("/" template-handler
@@ -33,7 +34,7 @@
 				     ("logout" . "/logout"))
 
 		 :authorizer (make-instance 'bknr-authorizer)
-		 :style-sheet-urls '("static/styles.css")
-		 :javascript-urls '("static/javascript.js"))
+		 :style-sheet-urls (list (format nil "~Astatic/styles.css" base-href))
+		 :javascript-urls (list (format nil "~Astatic/javascript.js" base-href)))
 
   (start :port port :listeners listeners))

Modified: branches/xml-class-rework/projects/lisp-ecoop/website/templates/edit-submission.xml
===================================================================
--- branches/xml-class-rework/projects/lisp-ecoop/website/templates/edit-submission.xml	2006-02-23 06:35:29 UTC (rev 1871)
+++ branches/xml-class-rework/projects/lisp-ecoop/website/templates/edit-submission.xml	2006-02-23 06:38:33 UTC (rev 1872)
@@ -1,13 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<bknr:toplevel
-  template="toplevel"
-  title="Edit Submission"
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:bknr="http://bknr.net"
-  xmlns:lisp-ecoop="http://lisp-ecoop06.bknr.net"
-  >
+<lisp-ecoop:page name="edit submission"
+  xmlns:lisp-ecoop="http://lisp-ecoop06.bknr.net">
 
 <h1>Submission Editor</h1>
 <p>
@@ -44,4 +39,4 @@
     </table>
   </form>
 </lisp-ecoop:submission-editor>
-</bknr:toplevel>
+</lisp-ecoop:page>

Modified: branches/xml-class-rework/projects/lisp-ecoop/website/templates/toplevel.xml
===================================================================
--- branches/xml-class-rework/projects/lisp-ecoop/website/templates/toplevel.xml	2006-02-23 06:35:29 UTC (rev 1871)
+++ branches/xml-class-rework/projects/lisp-ecoop/website/templates/toplevel.xml	2006-02-23 06:38:33 UTC (rev 1872)
@@ -9,8 +9,9 @@
   >
   <head>
     <title>LISP-ECOOP06 - $(title)</title>
-    <link rel="stylesheet" type="text/css" href="static/styles.css" />
-    <script src="static/javascript.js" language="javascript" type="text/javascript"> </script>
+    <base href="$(base)"/>
+    <link rel="stylesheet" type="text/css" href="$(base)static/styles.css" />
+    <script src="$(base)static/javascript.js" language="javascript" type="text/javascript"> </script>
   </head>
 
   <body>




More information about the Bknr-cvs mailing list