-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreview.urs
40 lines (33 loc) · 1.62 KB
/
review.urs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(* Abstraction of submitting evaluations of database objects *)
functor Make(M : sig
con reviewer :: Name
con reviewed :: {Type}
con other :: {(Type * Type * Type)}
constraint reviewed ~ other
constraint [reviewer] ~ [When]
constraint [reviewer, When] ~ reviewed
constraint [reviewer, When] ~ other
constraint [Channel] ~ reviewed
table tab : ([When = time, reviewer = string] ++ reviewed ++ map fst3 other)
val widgets : $(map Widget.t' other)
val reviewedFl : folder reviewed
val otherFl : folder other
val reviewedInj : $(map sql_injectable reviewed)
val otherInj : $(map (fn p => sql_injectable p.1) other)
val labels : $(map (fn _ => string) other)
val show_reviewed : show $reviewed
val summarize : $(map fst3 other) -> xbody
val whoami : transaction (option string)
end) : sig
structure One : Ui.S where type input = $M.reviewed
(* Viewing all reviews of one thing *)
con hidden_fields :: {Type}
constraint hidden_fields ~ M.reviewed
structure Several : Ui.S where type input = sql_exp [T = M.reviewed ++ hidden_fields] [] [] bool
(* Viewing all reviews matching a condition on the reviewed items *)
style summary
(* For one <div> of a review that isn't expanded to full detail *)
style full
style fullHeader
(* For an expanded review (full block and header row, respectively) *)
end