Kyberia v2.0
[mirrors/Kyberia-bloodline.git] / templates / own_templates / modules / show_poll.tpl
diff --git a/templates/own_templates/modules/show_poll.tpl b/templates/own_templates/modules/show_poll.tpl
new file mode 100644 (file)
index 0000000..b648ce0
--- /dev/null
@@ -0,0 +1,26 @@
+<!--
+This program is free software. It comes without any warranty, to
+the extent permitted by applicable law. You can redistribute it
+and/or modify it under the terms of the Do What The Fuck You Want
+To Public License, Version 2, as published by Sam Hocevar. See
+http://sam.zoy.org/wtfpl/COPYING for more details.
+-->
+
+{if $get_poll.question eq true}
+       <table width='66%' align='center' class='bordered'>
+       <tr><td colspan='3' align='center'><b>{$get_poll.question}</b></td></tr>
+       {foreach from=$get_poll.options item=option name=poll_option}
+               <tr><td>
+               {if $get_poll.voted eq 'yes'}
+                       {$option.text}
+               {else}
+                       <a href='/id/{$get_poll.node_id}/{$smarty.foreach.poll_option.iteration}'>{$option.text}</a>
+               {/if}
+                       <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>
+                       <td>{math equation="(x/y)*100" format="%.1f" x=$option.number y=$get_poll.total}%</td></tr>
+
+       {/foreach}
+       <tr><td colspan='3' align='center'><i>{$get_poll.total} voted</i></td></tr>
+       </table>
+{/if}
+<!--end of showing poll-->
This page took 0.141127 seconds and 4 git commands to generate.