From 972c70b709b8a055d826343be34619d2470ca394 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 24 Jan 2008 23:09:10 +0000 Subject: [PATCH] List open polls on polls page --- poll.mlt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/poll.mlt b/poll.mlt index 505044f..4b7d968 100644 --- a/poll.mlt +++ b/poll.mlt @@ -313,9 +313,21 @@ end %> <% end %> <% | NONE => -if showNormal then %> +if showNormal then -Show all polls
+val polls = Poll.listCurrentPolls (); +switch polls of + _::_ => %> +

Current polls

+ +<% foreach pol in polls do %> +
  • <% Web.html (#title pol) %> +<% if Poll.takingVotes pol then %>[VOTE]<% end %> +(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)
  • +<% end +end %> + +

    Show all polls

    Create a poll

    -- 2.20.1