{* $Id$ *} {title help="polls" admpage="polls"}{tr}Poll Results{/tr}{/title}
{button href="tiki-old_polls.php" class="btn btn-primary" _text="{tr}All Polls{/tr}"} {button href="tiki-poll_results.php" class="btn btn-primary" _text="{tr}Top-Voted Polls{/tr}"} {if $tiki_p_admin_polls eq 'y'} {if empty($pollId)}{button href="tiki-admin_polls.php" _text="{tr}Admin Polls{/tr}"}{else}{button href="tiki-admin_polls.php?pollId=$pollId&cookietab=1" _text="{tr}Edit Poll{/tr}"}{/if} {/if}
{if !empty($sort_mode)}{/if} {if !empty($pollId)}{/if} {if !empty($list)}{/if} {if !empty($offset)}{/if} {if empty($pollId) and !isset($list_votes)}

{/if}
{html_select_date prefix="from_" time="$vote_from_date" start_year="$start_year"}
{html_select_date prefix="to_" time="$vote_to_date" start_year="$start_year"}
{if empty($pollId) or $poll_info.voteConsiderationSpan > 0}
{else} {/if}
{section name=x loop=$poll_info_arr}

{$poll_info_arr[x].title|escape}

{if !empty($msg)} {remarksbox type="info"} {$msg} {/remarksbox} {/if} {if $poll_info_arr[x].from or $poll_info_arr[x].to}
{if $poll_info_arr[x].from}{$poll_info_arr[x].from|tiki_short_date}{else}{$poll_info_arr[x].publishDate|tiki_short_date}{/if} - {if $poll_info_arr[x].to}{$poll_info_arr[x].to|tiki_short_date}{else}{tr}Today{/tr}{/if}
{/if} {if $tiki_p_view_poll_voters eq 'y' && $poll_info_arr[x].votes > 0}
{assign var=thispoll_info_arr value=$poll_info_arr[x].pollId} {button href="?list=y&pollId=$thispoll_info_arr" class="btn btn-info" _text="{tr}Show detailed results of this poll{/tr}" _auto_args="$auto_args"}
{/if} {*----------------------------------- Results *} {include file='tiki-poll_results_bar.tpl' poll_info=$poll_info_arr[x] showtitle=n} {/section} {*---------------------------List Votes *} {if isset($list_votes)}

{tr}List Votes{/tr}

{tr}Find{/tr}
{if $vote_from_date}{/if} {if $vote_to_date}{/if} {if $which_date}{/if} {if $maxRecords}{/if}
{if $tiki_p_view_poll_choices eq 'y'}{/if} {if $tiki_p_admin eq 'y'}{/if} {section name=ix loop=$list_votes} {if $tiki_p_view_poll_choices eq 'y'}{/if} {if $tiki_p_admin eq 'y'} {/if} {sectionelse} {norecords _colspan=4} {/section}
{self_link _sort_arg='sort_mode' _sort_field='user'}{tr}User{/tr}{/self_link} {self_link _sort_arg='sort_mode' _sort_field='ip'}{tr}IP{/tr}{/self_link}{self_link _sort_arg='sort_mode' _sort_field='title'}{tr}Option{/tr}{/self_link}{self_link _sort_arg='sort_mode' _sort_field='time'}{tr}Date{/tr}{/self_link}
{$list_votes[ix].user|userlink} {$list_votes[ix].ip|escape}{$list_votes[ix].title|escape}{$list_votes[ix].time|tiki_short_date}
{ticket}
{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links} {/if} {*---------------------- comments *} {if $prefs.feature_poll_comments == 'y' && !empty($pollId) && ($tiki_p_read_comments == 'y' || $tiki_p_post_comments == 'y' || $tiki_p_edit_comments == 'y')}
{tr}Comments{/tr} {jq} $('#comment-toggle').comment_toggle(); {/jq}
{/if}