Файл: content/themes/facebook/templates/ajax.posts.polls.tpl
Строк: 115
{if $method == "get"}
<!-- Avatar -->
{include file='ajax.posts._avatar.tpl'}
<!-- Avatar -->
<!-- Post -->
<div class="dataContentWrapper medium
ml10">
<!-- Buttons & UserName & Poll
Question -->
<div class="dataContent mb5">
{include file='ajax.posts._buttons.tpl'}
{include
file='ajax.posts._username.tpl'}
<span
class="gray">{$translate->__("Asked")}</span>
<a
href="{$SITE_URL}/poll/{$post.PostID}/{$post.data.URL}">{$post.data.Question}</a>
</div>
<!-- Buttons & UserName & Poll
Question -->
<!-- Data -->
<div
class="dataContent mb10">
<table
class="pollOptions mt10">
{foreach
$post.pollOptions as $option}
<tr>
<td class="pollRadioBtn">
<input type="radio" {if
$option.select}checked="true"{/if} class="pollBtn"
id="{$option.ID}" name="pollOpts_{$post.PostID}"/>
</td>
<td
class="pollResultsBar">
<div
class="pollOption" title="{$option.Title}">
<div style="width:{$option.Bar}%"
class="shaded"></div>
<div
class="label"><span>{$option.Title}</span></div>
<div
class="votes"><span><b
class="optionVotes">{$option.Votes}</b>
{$translate->__("votes")}</span></div>
</div>
</td>
<td class="pollWhoVoted">
<span class="uiButtonText whoVoted"
hits="{$option.Votes}" id="{$post.PostID}-{$option.ID}"
title="{$translate->__("who vote for
this")}">[?]</span>
</td>
</tr>
{/foreach}
</table>
<input type="hidden"
name="poll[votes]" value="{$post.data.Votes}" />
<input type="hidden" name="poll[selected]"
value="{$post.data.selected}" />
</div>
<!-- Data -->
<!-- Statistics -->
{include file='ajax.posts._statistics.tpl' _icon='app_polls' _url='poll'}
<!-- Statistics -->
<!-- Comments
-->
{include file='ajax.posts.comments.tpl'}
<!--
Comments -->
</div>
<!-- Post -->
{elseif $method == "post"}
<li class="hidden
firstNode" id="{$post.ID}"></li>
<li
class="feedItem">
<div
class="dataContainer"
id="{$post.ID}-{$post.PostType}-{$post.PostID}-{$userArray.UserID}">
<!-- Vote Box -->
{include
file='ajax.posts._votebox.tpl'}
<!-- Vote Box -->
<!-- Avatar -->
<div
class="dataSideWrapper ml5">
<a
href="{$userArray.URL}"><img
src="{$userArray.UserAvatarPathMedium}" /></a>
</div>
<!-- Avatar -->
<!-- Post -->
<div class="dataContentWrapper
medium ml10">
<!-- Buttons
& UserName & Poll Question -->
<div
class="dataContent mb5">
{include
file='ajax.posts._buttons.tpl'}
{include
file='ajax.posts._username.tpl'}
<span
class="gray">{$translate->__("Asked")}</span>
<a
href="{$SITE_URL}/poll/{$post.PostID}/{$post.data.URL}">{$post.data.Question}</a>
</div>
<!-- Buttons & UserName
& Poll Question -->
<!-- Data
-->
<div class="dataContent mb10">
<table class="pollOptions mt10">
{foreach $post.pollOptions as $option}
<tr>
<td
class="pollRadioBtn">
<input type="radio" {if
$option.select}checked="true"{/if} class="pollBtn"
id="{$option.ID}" name="pollOpts_{$post.PostID}"/>
</td>
<td class="pollResultsBar">
<div class="pollOption"
title="{$option.Title}">
<div style="width:0%"
class="shaded"></div>
<div
class="label"><span>{$option.Title}</span></div>
<div
class="votes"><span><b
class="optionVotes">0</b>
{$translate->__("votes")}</span></div>
</div>
</td>
<td
class="pollWhoVoted">
<span class="uiButtonText whoVoted" hits="0"
id="{$post.PostID}-{$option.ID}"
title="{$translate->__("who vote for
this")}">[?]</span>
</td>
</tr>
{/foreach}
</table>
<input type="hidden" name="poll[votes]"
value="0" />
<input
type="hidden" name="poll[selected]" value=""
/>
</div>
<!-- Data -->
<!-- Statistics -->
{include file='ajax.posts._statistics.tpl' _icon='app_polls' _url='poll'}
<!-- Statistics -->
<!-- Comments -->
{include
file='ajax.posts.comments.tpl'}
<!-- Comments -->
</div>
<!-- Post -->
</div>
</li>
{/if}