diff --git a/main.go b/main.go index a5f1a2a..19eb373 100644 --- a/main.go +++ b/main.go @@ -430,6 +430,7 @@ func main() { "IsOpen": poll.Open, "IsHidden": poll.Hidden, "CanModify": canModify, + "CanVote": canVote(claims.UserInfo, *poll, poll.AllowedUsers), "Username": claims.UserInfo.Username, "FullName": claims.UserInfo.FullName, "Gatekeep": poll.Gatekeep, diff --git a/templates/result.tmpl b/templates/result.tmpl index 9e81f54..ae92500 100644 --- a/templates/result.tmpl +++ b/templates/result.tmpl @@ -9,6 +9,12 @@ media="screen" /> + +
+ {{ if eq .CanVote 9 }} + + {{ else if eq .CanVote 1 }} + + {{ else if gt .CanVote 1 }} + + {{ end }} +

{{ .ShortDescription }}

{{ if .LongDescription }}

{{ .LongDescription | MakeLinks }}

@@ -38,6 +67,7 @@

Results will be available once the poll closes

{{ else }} + {{/* Displays information about required quorum and number of voters */}}
Number of Eligible Voters: {{ len .EligibleVoters }}