Classical polls - Remove loops on moments

This commit is contained in:
Olivier Perez 2016-05-03 23:31:44 +02:00
parent 1e0a8b25bc
commit 20d222dcfe

View File

@ -59,10 +59,8 @@
{$id=0} {$id=0}
{foreach $slots as $slot} {foreach $slots as $slot}
{foreach $slot->moments as $moment}
{$choice=$vote->choices[$id]} {$choice=$vote->choices[$id]}
<td class="bg-info" headers="C{$id}"> <td class="bg-info" headers="C{$id}">
<ul class="list-unstyled choice"> <ul class="list-unstyled choice">
<li class="yes"> <li class="yes">
@ -90,7 +88,6 @@
</td> </td>
{$id=$id + 1} {$id=$id + 1}
{/foreach}
{/foreach} {/foreach}
<td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="save" value="{$vote->id|html}" title="{__('Poll results', 'Save the choices')} {$vote->name|html}">{__('Generic', 'Save')}</button></td> <td style="padding:5px"><button type="submit" class="btn btn-success btn-xs" name="save" value="{$vote->id|html}" title="{__('Poll results', 'Save the choices')} {$vote->name|html}">{__('Generic', 'Save')}</button></td>
@ -102,7 +99,6 @@
{$id=0} {$id=0}
{foreach $slots as $slot} {foreach $slots as $slot}
{foreach $slot->moments as $moment}
{$choice=$vote->choices[$id]} {$choice=$vote->choices[$id]}
{if $choice=='2'} {if $choice=='2'}
@ -116,7 +112,6 @@
{/if} {/if}
{$id=$id + 1} {$id=$id + 1}
{/foreach}
{/foreach} {/foreach}
{if $active && !$expired && $accessGranted && {if $active && !$expired && $accessGranted &&