# HG changeset patch # User Adam Chlipala # Date 1257189749 18000 # Node ID 53a22f46f3776bb670e9148ebe18e6bdf7263722 # Parent 8b7971e7433573de73aa7f99779be75eaf90a1b4 Seeing others' reviews diff -r 8b7971e74335 -r 53a22f46f377 demo/more/conference.ur --- a/demo/more/conference.ur Mon Nov 02 14:14:32 2009 -0500 +++ b/demo/more/conference.ur Mon Nov 02 14:22:29 2009 -0500 @@ -348,6 +348,16 @@ 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 => +
+ User: {[r.User.Nam]}
+ {allContent M.review r.Review M.reviewFolder} +
); + case ro of None => error Paper not found! | Some r => return @@ -384,6 +394,11 @@ } + +
+

Other reviews

+ + {otherReviews} end diff -r 8b7971e74335 -r 53a22f46f377 demo/more/conference1.ur --- a/demo/more/conference1.ur Mon Nov 02 14:14:32 2009 -0500 +++ b/demo/more/conference1.ur Mon Nov 02 14:22:29 2009 -0500 @@ -3,7 +3,8 @@ 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 -r 8b7971e74335 -r 53a22f46f377 demo/more/conferenceFields.ur --- a/demo/more/conferenceFields.ur Mon Nov 02 14:14:32 2009 -0500 +++ b/demo/more/conferenceFields.ur Mon Nov 02 14:22:29 2009 -0500 @@ -2,6 +2,7 @@ val title = string "Title" val abstract = textarea "Abstract" +val commentsForAuthors = textarea "Comments for Authors" fun charIn s = if String.length s = 0 then diff -r 8b7971e74335 -r 53a22f46f377 demo/more/conferenceFields.urs --- a/demo/more/conferenceFields.urs Mon Nov 02 14:14:32 2009 -0500 +++ b/demo/more/conferenceFields.urs Mon Nov 02 14:22:29 2009 -0500 @@ -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