From 5676ca7738e2d53191493a3761cd11f14e83dbed Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Mon, 22 Feb 2010 00:01:46 +0100 Subject: simpler invite participants interface --- invite_participants.rb | 2 +- poll.rb | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/invite_participants.rb b/invite_participants.rb index a62ab1d..ce487ff 100755 --- a/invite_participants.rb +++ b/invite_participants.rb @@ -35,7 +35,7 @@ inviteparticipantsstr = _("Invite Participants") $d << <#{inviteparticipantsstr} - #{$d.table.to_html("","invite")} + #{$d.table.invite_to_html} TABLE diff --git a/poll.rb b/poll.rb index d7f7e2b..35c77b4 100644 --- a/poll.rb +++ b/poll.rb @@ -65,10 +65,6 @@ class Poll # showparticipation \in {true, false, "invite"} def to_html(edituser = "", showparticipation = true) - if showparticipation == "invite" - showparticipation = false - invite = true - end ret = "
\n" sortcolumns = $cgi.include?("sort") ? $cgi.params["sort"] : ["timestamp"] @@ -105,7 +101,6 @@ class Poll # PARTICIPATE ret += participate_to_html(edituser) unless @data.keys.include?(edituser) || !showparticipation - ret += invite_to_html if invite # SUMMARY ret += "\n" @@ -150,7 +145,21 @@ class Poll def invite_to_html invitestr = _("Invite") - ret = < + + + + +HEAD + @data.each_key{|participant| + ret += < +ROW + } + + ret += < +
" + _("total") + "
#{namestr}
#{participant}
@@ -159,8 +168,9 @@ class Poll
INVITE - + ret end def participate_to_html(edituser) -- cgit v1.2.3