discourse-legacysite-perl/site/forum/include_poll_result.html

27 lines
989 B
HTML
Raw Normal View History

2024-06-17 12:24:05 +00:00
<div class="subtitle"><%poll_question%></div>
<div class="desc"><%poll_text%></div>
<div class="result-votes">
<%~if poll_type%>
Correct Answers: <%poll_correct_answer%> (<%poll_votes%> answers submitted)
<%~else%>
<%poll_votes%> Votes
<%~endif%>
</div>
<div class="dtable">
<%loop poll_answers%>
<%~set meter = $poll_answer_percentage * 80%><%set meter = $meter / 100%>
<div class="drow">
<div class="dcell percentage"><%poll_answer_percentage || 0%>%</div>
<div class="dcell meter"><div><span style="border-left-width: <%meter%>px"></span></div></div>
<div class="dcell choice"><%poll_answer_answer%></div>
</div>
<%endloop%>
</div>
<div class="btn-wrapper">
<%~if in.call_from eq 'glinks'%>
<a href="/cgi-bin/articles/poll.cgi?poll_view=vote_view" title="Poll view" class="btn">View Poll</a>
<%~else%>
<a href="<%GForum::SEO::url(params => "forum=$forum_id;poll_view=vote_view")%>" title="Poll view" class="btn">View Poll</a>
<%~endif%>
</div>