diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-11-02 14:22:29 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-11-02 14:22:29 -0500 |
commit | 7491cad2aabb379a0d6b2bb5234634c183b3dba2 (patch) | |
tree | 2f0e91a597adc9f212b2c5913a0bd3fd2ad1990b /demo/more | |
parent | e2d49ed541c49a01cb340908f8b868aa9f21ecae (diff) |
Seeing others' reviews
Diffstat (limited to 'demo/more')
-rw-r--r-- | demo/more/conference.ur | 15 | ||||
-rw-r--r-- | demo/more/conference1.ur | 3 | ||||
-rw-r--r-- | demo/more/conferenceFields.ur | 1 | ||||
-rw-r--r-- | demo/more/conferenceFields.urs | 1 |
4 files changed, 19 insertions, 1 deletions
diff --git a/demo/more/conference.ur b/demo/more/conference.ur index 7de3fc51..3c262e15 100644 --- a/demo/more/conference.ur +++ b/demo/more/conference.ur @@ -348,6 +348,16 @@ functor Make(M : sig FROM review WHERE review.User = {[me.Id]} AND review.Paper = {[id]}); + otherReviews <- queryX (SELECT user.Nam, review.{{map fst M.review}} + FROM review JOIN user ON review.User = user.Id + WHERE review.Paper = {[id]} + AND review.User <> {[me.Id]}) + (fn r => <xml> + <hr/> + <b>User:</b> {[r.User.Nam]}<br/> + {allContent M.review r.Review M.reviewFolder} + </xml>); + case ro of None => error <xml>Paper not found!</xml> | Some r => return <xml><body> @@ -384,6 +394,11 @@ functor Make(M : sig <submit value="Save" action={saveReview}/> </form> </xml>} + + <hr/> + <h2>Other reviews</h2> + + {otherReviews} </body></xml> end diff --git a/demo/more/conference1.ur b/demo/more/conference1.ur index f8272b4f..501788a8 100644 --- a/demo/more/conference1.ur +++ b/demo/more/conference1.ur @@ -3,7 +3,8 @@ open ConferenceFields open Conference.Make(struct val paper = {Title = title, Abstract = abstract} - val review = {Rating = dropdown "Rating" (#"A" :: #"B" :: #"C" :: #"D" :: [])} + val review = {Rating = dropdown "Rating" (#"A" :: #"B" :: #"C" :: #"D" :: []), + CommentsForAuthors = commentsForAuthors} val submissionDeadline = readError "2009-11-22 23:59:59" diff --git a/demo/more/conferenceFields.ur b/demo/more/conferenceFields.ur index ae9ed5a7..d22bd877 100644 --- a/demo/more/conferenceFields.ur +++ b/demo/more/conferenceFields.ur @@ -2,6 +2,7 @@ open Meta val title = string "Title" val abstract = textarea "Abstract" +val commentsForAuthors = textarea "Comments for Authors" fun charIn s = if String.length s = 0 then diff --git a/demo/more/conferenceFields.urs b/demo/more/conferenceFields.urs index d235ec4c..04cf902f 100644 --- a/demo/more/conferenceFields.urs +++ b/demo/more/conferenceFields.urs @@ -1,5 +1,6 @@ val title : Meta.meta (string, string) val abstract : Meta.meta (string, string) +val commentsForAuthors : Meta.meta (string, string) con dropdown :: (Type * Type) val dropdown : string -> list char -> Meta.meta dropdown |