forked from jnanamurti/developer-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
topic_question.tpl
28 lines (21 loc) · 1.22 KB
/
topic_question.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
{include file='topic_part_header.tpl'}
<div id="topic_question_area_{$oTopic->getId()}" class="poll">
{if !$oTopic->getUserQuestionIsVote()}
<ul class="unstyled poll-vote">
{foreach from=$oTopic->getQuestionAnswers() key=key item=aAnswer}
<li><label class="radio"><input type="radio" id="topic_answer_{$oTopic->getId()}_{$key}" name="topic_answer_{$oTopic->getId()}" value="{$key}" onchange="jQuery('#topic_answer_{$oTopic->getId()}_value').val(jQuery(this).val());" />{$aAnswer.text|escape:'html'}</label></li>
{/foreach}
</ul>
<button type="submit" onclick="ls.poll.vote({$oTopic->getId()},jQuery('#topic_answer_{$oTopic->getId()}_value').val());" class="btn btn-primary">{$aLang.topic_question_vote}</button>
<button type="submit" onclick="ls.poll.vote({$oTopic->getId()},-1)" class="btn">{$aLang.topic_question_abstain}</button>
<input type="hidden" id="topic_answer_{$oTopic->getId()}_value" value="-1" />
{else}
{include file='question_result.tpl'}
{/if}
</div>
<div class="topic-content text">
{hook run='topic_content_begin' topic=$oTopic bTopicList=$bTopicList}
{$oTopic->getText()}
{hook run='topic_content_end' topic=$oTopic bTopicList=$bTopicList}
</div>
{include file='topic_part_footer.tpl'}