comparison demo/more/decision.ur @ 1031:5dccff15fa62

Decision status placeholder
author Adam Chlipala <adamc@hcoop.net>
date Mon, 02 Nov 2009 15:54:22 -0500
parents 6bcc1020d5cd
children 5d9f47124c4c
comparison
equal deleted inserted replaced
1030:6bcc1020d5cd 1031:5dccff15fa62
9 functor Make(M : sig 9 functor Make(M : sig
10 con paperOther :: {Type} 10 con paperOther :: {Type}
11 constraint [Id, Decision] ~ paperOther 11 constraint [Id, Decision] ~ paperOther
12 include Conference.INPUT 12 include Conference.INPUT
13 where con paper = [Decision = option bool] ++ paperOther 13 where con paper = [Decision = option bool] ++ paperOther
14
15 val status : ctx ::: {Unit} -> [[Body] ~ ctx] => $paperOther -> xml ([Body] ++ ctx) [] []
14 end) = struct 16 end) = struct
15 open M 17 open M
16 18
17 val linksForChair = 19 val linksForChair =
18 let 20 let
20 ps <- queryX (SELECT paper.Id, paper.Decision, paper.{{M.paperOther}} 22 ps <- queryX (SELECT paper.Id, paper.Decision, paper.{{M.paperOther}}
21 FROM paper 23 FROM paper
22 ORDER BY paper.Id) 24 ORDER BY paper.Id)
23 (fn r => <xml><tr> 25 (fn r => <xml><tr>
24 <td>{useMore (summarizePaper (r.Paper -- #Id))}</td> 26 <td>{useMore (summarizePaper (r.Paper -- #Id))}</td>
27 <td>{useMore (status (r.Paper -- #Id -- #Decision))}</td>
25 <td><entry> 28 <td><entry>
26 <hidden{#Paper} value={show r.Paper.Id}/> 29 <hidden{#Paper} value={show r.Paper.Id}/>
27 <select{#Decision}> 30 <select{#Decision}>
28 <option selected={r.Paper.Decision = None}>?</option> 31 <option selected={r.Paper.Decision = None}>?</option>
29 <option selected={r.Paper.Decision = Some True}>Accept</option> 32 <option selected={r.Paper.Decision = Some True}>Accept</option>
33 return <xml><body> 36 return <xml><body>
34 <h1>Make acceptance decisions</h1> 37 <h1>Make acceptance decisions</h1>
35 38
36 <form><subforms{#Papers}> 39 <form><subforms{#Papers}>
37 <table> 40 <table>
38 <tr> <th>Paper</th> <th>Decision</th> </tr> 41 <tr> <th>Paper</th> <th>Status</th> <th>Decision</th> </tr>
39 {ps} 42 {ps}
40 </table> 43 </table>
41 </subforms></form> 44 </subforms></form>
42 </body></xml> 45 </body></xml>
43 in 46 in