-
Notifications
You must be signed in to change notification settings - Fork 0
/
question_result.tpl
32 lines (28 loc) · 1.39 KB
/
question_result.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<ul class="unstyled poll-result" id="poll-result-original-{$oTopic->getId()}">
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
<li {if $oTopic->getQuestionAnswerMax()==$aAnswer.count}class="most"{/if}>
<dl>
<dt>
{$oTopic->getQuestionAnswerPercent($key)}%<br />
<span>({$aAnswer.count})</span>
</dt>
<dd>{$aAnswer.text|escape:'html'}<div style="width: {$oTopic->getQuestionAnswerPercent($key)}%;" ></div></dd>
</dl>
</li>
{/foreach}
</ul>
<ul class="unstyled poll-result" id="poll-result-sort-{$oTopic->getId()}" style="display: none;">
{foreach from=$oTopic->getQuestionAnswers(true) key=key item=aAnswer}
<li {if $oTopic->getQuestionAnswerMax()==$aAnswer.count}class="most"{/if}>
<dl>
<dt>
<strong>{$oTopic->getQuestionAnswerPercent($key)}%</strong><br />
<span>({$aAnswer.count})</span>
</dt>
<dd>{$aAnswer.text|escape:'html'}<div style="width: {$oTopic->getQuestionAnswerPercent($key)}%;" ></div></dd>
</dl>
</li>
{/foreach}
</ul>
<button type="submit" class="btn btn-icon" title="{$aLang.topic_question_vote_result_sort}" onclick="return ls.poll.switchResult(this, {$oTopic->getId()});"><i class="icon-align-left"></i></button>
<span class="poll-total poll-total-result">{$aLang.topic_question_vote_result}: {$oTopic->getQuestionCountVote()} | {$aLang.topic_question_abstain_result}: {$oTopic->getQuestionCountVoteAbstain()}</span>