diff demo/more/conference.ur @ 1007:d3af9e54c828

Title and abstract
author Adam Chlipala <adamc@hcoop.net>
date Thu, 22 Oct 2009 11:37:58 -0400
parents 5a0f6ec208ce
children 1911e84df461
line wrap: on
line diff
--- a/demo/more/conference.ur	Thu Oct 22 11:15:37 2009 -0400
+++ b/demo/more/conference.ur	Thu Oct 22 11:37:58 2009 -0400
@@ -2,8 +2,9 @@
 
 functor Make(M : sig
                  con paper :: {(Type * Type)}
-                 constraint [Id, Title] ~ paper
+                 constraint [Id] ~ paper
                  val paper : $(map meta paper)
+                 val paperFolder : folder paper
 
                  con review :: {(Type * Type)}
                  constraint [Paper, User] ~ review
@@ -17,7 +18,7 @@
           CONSTRAINT Nam UNIQUE Nam
     sequence userId
 
-    con paper = [Id = int, Title = string] ++ map fst M.paper
+    con paper = [Id = int] ++ map fst M.paper
     table paper : paper
           PRIMARY KEY Id
     sequence paperId
@@ -122,7 +123,7 @@
                     <xml/>}
 
                {if now < M.submissionDeadline then
-                    <xml><li>Submit</li></xml>
+                    <xml><li><a link={submit ()}>Submit</a></li></xml>
                 else
                     <xml/>}
              </xml>}
@@ -132,4 +133,12 @@
         m <- main' ();
         return <xml><body>{m}</body></xml>
 
+    and submit () = return <xml><body>
+      <h1>Submit a Paper</h1>
+
+      <form>
+        {allWidgets M.paper M.paperFolder}
+      </form>
+    </body></xml>
+
 end