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

{__('Poll results', 'Votes of the poll')} {if $hidden}({__('PollInfo', 'Results are hidden')}){/if} {if $accessGranted} {/if}

{include 'part/scroll_left_right.tpl'}
{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_month_year|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} {$slots_raw = array()} {foreach $slots as $slot} {foreach $slot->moments as $id=>$moment} {append var='headersH' value=$headersDCount} {$headersDCount = $headersDCount+1} {$slots_raw[] = $slot->day|date_format:$date_format.txt_full|cat:' - '|cat:$moment} {/foreach} {/foreach} {foreach $votes as $vote} {* Edited line *} {if $editingVoteId === $vote->uniqId && !$expired} {$k=0} {foreach $slots as $slot} {foreach $slot->moments as $moment} {if sizeof($vote->choices)==1 && strlen($vote->choices[0])==0} {$choice=' '} {else} {$choice=$vote->choices[$k]} {/if} {$k=$k + 1} {/foreach} {/foreach} {elseif !$hidden} {* Voted line *} {$k=0} {foreach $slots as $slot} {foreach $slot->moments as $moment} {if sizeof($vote->choices)==1 && strlen($vote->choices[0])==0} {$choice=' '} {else} {$choice=$vote->choices[$k]} {/if} {if $choice=='2'} {elseif $choice=='1'} {elseif $choice=='0'} {else} {/if} {$k=$k + 1} {/foreach} {/foreach} {if $active && !$expired && $accessGranted && ( $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL') or $admin or ($poll->editable == constant('Framadate\Editable::EDITABLE_BY_OWN') && $editedVoteUniqueId == $vote->uniqId) ) } {else} {/if} {/if} {/foreach} {* Line to add a new vote *} {if $active && $editingVoteId === 0 && !$expired && $accessGranted} {$i = 0} {foreach $slots as $slot} {foreach $slot->moments as $moment} {$i = $i+1} {/foreach} {/foreach} {/if} {if !$hidden} {* Line displaying best moments *} {$count_bests = 0} {$max = max($best_choices['y'])} {if $max > 0} {foreach $best_choices['y'] as $i=>$best_moment} {if $max == $best_moment} {$count_bests = $count_bests +1} {elseif $best_moment > 0} {elseif $best_choices['inb'][$i]>0} {else} {/if} {/foreach} {/if} {/if}
{__('Poll results', 'Votes of the poll')} {$poll->title|html}
{__('Generic', 'Remove')} {__('Poll results', 'Add a column')}
{$previous}{$display}
{$slot->day|date_format:$date_format.txt_day|html}
{$moment|html}
{$vote->name|html} {if $active && !$expired && $accessGranted && ( $poll->editable == constant('Framadate\Editable::EDITABLE_BY_ALL') or $admin or ($poll->editable == constant('Framadate\Editable::EDITABLE_BY_OWN') && $editedVoteUniqueId == $vote->uniqId) ) && $slots|count gt 4 } {__('Generic', 'Edit')} {/if} {__('Generic', 'Yes')}(){__('Generic', 'Ifneedbe')}{__('Generic', 'No')}{__('Generic', 'Unknown')} {__('Generic', 'Edit')} {if $admin} {__('Generic', 'Link')} {__('Generic', 'Remove')} {/if}
    {if $poll->ValueMax eq NULL || $best_choices['y'][$i] lt $poll->ValueMax}
  • {/if}
{__('Poll results', 'Addition')}
{$votes|count} {if ($votes|count)==1}{__('Poll results', 'polled user')}{else}{__('Poll results', 'polled users')}{/if}
{$best_moment|html}{if $best_choices['inb'][$i]>0}
(+{$best_choices['inb'][$i]|html}){/if}
{$best_moment|html}{if $best_choices['inb'][$i]>0}
(+{$best_choices['inb'][$i]|html}){/if}

(+{$best_choices['inb'][$i]|html})
{if !$hidden && $max > 0} {/if} {if !$hidden} {* Best votes listing *} {$max = max($best_choices['y'])} {if $max > 0}
{if $count_bests == 1}

{__('Poll results', 'Best choice')}

{__('Poll results', 'The best choice at this time is:')}

{elseif $count_bests > 1}

{__('Poll results', 'Best choices')}

{__('Poll results', 'The bests choices at this time are:')}

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

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

{/if} {/if}