{if !is_array($best_choices) || empty($best_choices)} {$best_choices = [0]} {/if}

{_('Votes of the poll')}

{if $admin && !$expired} {$headersDCount=0} {foreach $slots as $slot} {foreach $slot->moments as $id=>$moment} {$headersDCount = $headersDCount+1} {/foreach} {/foreach} {/if} {$count_same = 0} {$previous = 0} {foreach $slots as $id=>$slot} {$display = $slot->day|date_format:$date_format.txt_year_month|html} {if $previous !== 0 && $previous != $display} {$count_same = 0} {/if} {$count_same = $count_same + $slot->moments|count} {if $slot@last} {/if} {$previous = $display} {for $foo=0 to ($slot->moments|count)-1} {append var='headersM' value=$id} {/for} {/foreach} {foreach $slots as $id=>$slot} {for $foo=0 to ($slot->moments|count)-1} {append var='headersD' value=$id} {/for} {/foreach} {$headersDCount=0} {foreach $slots as $slot} {foreach $slot->moments as $id=>$moment} {append var='headersH' value=$headersDCount} {$headersDCount = $headersDCount+1} {/foreach} {/foreach} {foreach $votes as $vote} {* Edited line *} {if $editingVoteId == $vote->id && !$expired} {foreach $vote->choices as $k=>$choice} {/foreach} {else} {* Voted line *} {foreach $vote->choices as $k=>$choice} {if $choice==2} {elseif $choice==1} {else} {/if} {/foreach} {if $active && $poll->editable && !$expired} {else} {/if} {/if} {/foreach} {* Line to add a new vote *} {if $active && $editingVoteId == 0 && !$expired} {$i = 0} {foreach $slots as $slot} {foreach $slot->moments as $moment} {$i = $i+1} {/foreach} {/foreach} {/if} {* Line displaying best moments *} {$count_bests = 0} {$max = max($best_choices)} {if $max > 0} {foreach $best_choices as $best_moment} {if $max == $best_moment} {$count_bests = $count_bests +1} {else} {/if} {/foreach} {/if}
{_('Votes of the poll')} {$poll->title|html}
{$previous}{$display}
{$slot->day|date_format:$date_format.txt_day|html}
{$moment|html}
{$vote->name|html}{_('Yes')}(){_('Ifneedbe')}{_('No')} {if $admin} {/if}
{_("Addition")}{$best_moment|html}{$best_moment|html}
{* Best votes listing *} {$max = max($best_choices)} {if $max > 0}
{if $count_bests == 1}

{_('Best choice')}

{_('The best choice at this time is:')}

{elseif $count_bests > 1}

{_('Best choices')}

{_('The bests choices at this time are:')}

{/if} {$i = 0}
    {foreach $slots as $slot} {foreach $slot->moments as $moment} {if $best_choices[$i] == $max}
  • {$slot->day|date_format:$date_format.txt_full|html} - {$moment|html}
  • {/if} {$i = $i+1} {/foreach} {/foreach}

{_('with')} {$max|html} {if $max==1}{_('vote')}{else}{_('votes')}{/if}.

{/if}