From 7491cad2aabb379a0d6b2bb5234634c183b3dba2 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 2 Nov 2009 14:22:29 -0500 Subject: Seeing others' reviews --- demo/more/conference.ur | 15 +++++++++++++++ demo/more/conference1.ur | 3 ++- demo/more/conferenceFields.ur | 1 + demo/more/conferenceFields.urs | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) (limited to 'demo/more') 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 => +
+ 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 @@ functor Make(M : sig } + +
+

Other reviews

+ + {otherReviews} 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 -- cgit v1.2.3