| 1 | <!-- |
| 2 | This program is free software. It comes without any warranty, to |
| 3 | the extent permitted by applicable law. You can redistribute it |
| 4 | and/or modify it under the terms of the Do What The Fuck You Want |
| 5 | To Public License, Version 2, as published by Sam Hocevar. See |
| 6 | http://sam.zoy.org/wtfpl/COPYING for more details. |
| 7 | --> |
| 8 | |
| 9 | {if $get_poll.question eq true} |
| 10 | <table width='66%' align='center' class='bordered'> |
| 11 | <tr><td colspan='3' align='center'><b>{$get_poll.question}</b></td></tr> |
| 12 | {foreach from=$get_poll.options item=option name=poll_option} |
| 13 | <tr><td> |
| 14 | {if $get_poll.voted eq 'yes'} |
| 15 | {$option.text} |
| 16 | {else} |
| 17 | <a href='/id/{$get_poll.node_id}/{$smarty.foreach.poll_option.iteration}'>{$option.text}</a> |
| 18 | {/if} |
| 19 | <td><table style='background-color:#6dae42;width: {math equation="(x/y)*100" format="%d" x=$option.number y=$get_poll.total} pt;'><tr height=5><td height=5></td></tr></table> |
| 20 | <td>{math equation="(x/y)*100" format="%.1f" x=$option.number y=$get_poll.total}%</td></tr> |
| 21 | |
| 22 | {/foreach} |
| 23 | <tr><td colspan='3' align='center'><i>{$get_poll.total} voted</i></td></tr> |
| 24 | </table> |
| 25 | {/if} |
| 26 | <!--end of showing poll--> |