Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1006:5a0f6ec208ce | 1007:d3af9e54c828 |
---|---|
1 open Meta | 1 open Meta |
2 | 2 |
3 functor Make(M : sig | 3 functor Make(M : sig |
4 con paper :: {(Type * Type)} | 4 con paper :: {(Type * Type)} |
5 constraint [Id, Title] ~ paper | 5 constraint [Id] ~ paper |
6 val paper : $(map meta paper) | 6 val paper : $(map meta paper) |
7 val paperFolder : folder paper | |
7 | 8 |
8 con review :: {(Type * Type)} | 9 con review :: {(Type * Type)} |
9 constraint [Paper, User] ~ review | 10 constraint [Paper, User] ~ review |
10 val review : $(map meta review) | 11 val review : $(map meta review) |
11 | 12 |
15 table user : {Id : int, Nam : string, Password : string, Chair : bool, OnPc : bool} | 16 table user : {Id : int, Nam : string, Password : string, Chair : bool, OnPc : bool} |
16 PRIMARY KEY Id, | 17 PRIMARY KEY Id, |
17 CONSTRAINT Nam UNIQUE Nam | 18 CONSTRAINT Nam UNIQUE Nam |
18 sequence userId | 19 sequence userId |
19 | 20 |
20 con paper = [Id = int, Title = string] ++ map fst M.paper | 21 con paper = [Id = int] ++ map fst M.paper |
21 table paper : paper | 22 table paper : paper |
22 PRIMARY KEY Id | 23 PRIMARY KEY Id |
23 sequence paperId | 24 sequence paperId |
24 | 25 |
25 con review = [Paper = int, User = int] ++ map fst M.review | 26 con review = [Paper = int, User = int] ++ map fst M.review |
120 <xml><li><a link={Users.main ()}>Manage users</a></li></xml> | 121 <xml><li><a link={Users.main ()}>Manage users</a></li></xml> |
121 else | 122 else |
122 <xml/>} | 123 <xml/>} |
123 | 124 |
124 {if now < M.submissionDeadline then | 125 {if now < M.submissionDeadline then |
125 <xml><li>Submit</li></xml> | 126 <xml><li><a link={submit ()}>Submit</a></li></xml> |
126 else | 127 else |
127 <xml/>} | 128 <xml/>} |
128 </xml>} | 129 </xml>} |
129 </ul></xml> | 130 </ul></xml> |
130 | 131 |
131 and main () = | 132 and main () = |
132 m <- main' (); | 133 m <- main' (); |
133 return <xml><body>{m}</body></xml> | 134 return <xml><body>{m}</body></xml> |
134 | 135 |
136 and submit () = return <xml><body> | |
137 <h1>Submit a Paper</h1> | |
138 | |
139 <form> | |
140 {allWidgets M.paper M.paperFolder} | |
141 </form> | |
142 </body></xml> | |
143 | |
135 end | 144 end |