From e578da5c4f19af7446a48a9d78f45de51383d4ac Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Thu, 2 May 2013 21:21:22 -0400 Subject: Forum: Add upvote button --- forum/author.urs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'forum/author.urs') diff --git a/forum/author.urs b/forum/author.urs index 1f394f0..db6e7a8 100644 --- a/forum/author.urs +++ b/forum/author.urs @@ -43,9 +43,17 @@ val sql_username : sql_injectable username (******************************** Converting *********************************) val name : usernameOrAnonymous -> option username +val nameError : usernameOrAnonymous -> username val orAnonymous : username -> usernameOrAnonymous +val whenIdentified : ctx ::: {Unit} -> use ::: {Type} -> + usernameOrAnonymous -> xml ctx use [] -> xml ctx use [] + +val whenIdentified' : ctx ::: {Unit} -> use ::: {Type} -> + usernameOrAnonymous -> (username -> xml ctx use []) + -> xml ctx use [] + (* Converts a 'usernameOrAnonymous' to an 'option' tag. If anonymous, produces empty XML. *) val toOptionTag : use ::: {Type} -> usernameOrAnonymous -> xml select use [] -- cgit v1.2.3