diaspora/app/assets/templates/poll_tpl.jst.hbs

46 lines
1.5 KiB
Handlebars

{{#if poll}}
<div class="poll_form">
<div class="poll_head">
<strong>{{poll.question}}</strong>
<div class="poll_statistic pull-right">
{{t "poll.count" count=poll.participation_count}}
</div>
</div>
<div class="poll-content">
{{#if show_form}}
<form action="/posts/{{poll.post_id}}/poll_participations" method="POST">
{{/if}}
{{#poll.poll_answers}}
<div class="result-row">
<input type="radio" name="vote" value="{{id}}"/>
<label>{{answer}}</label>
<div class="poll-result pull-right">
<span class="percentage"></span>
({{t "poll.answer_count" count=vote_count}})
</div>
<div class="poll_progress_bar_wrapper progress">
<div class="poll_progress_bar bar" data-answerid="{{id}}" style="height: 100%"></div>
</div>
</div>
{{/poll.poll_answers}}
{{#if show_form}}
<div class="toggle-result-wrapper">
{{#if preview}}
<span>{{t "poll.show_result"}}</span>
{{else}}
<a class="toggle_result" href="#">{{t "poll.show_result"}}</a>
{{/if}}
</div>
<input type="submit" class="submit pull-right btn btn-default" value="{{t "poll.vote"}}"/>
<div class="clearfix"></div>
</form>
{{/if}}
{{#if is_reshare }}
<div class="poll_footer">
{{{t "poll.go_to_original_post" original_post_link=original_post_link}}}
</div>
{{/if}}
</div>
</div>
{{/if}}