2015-03-07 19:30:25 -05:00
|
|
|
extends /templates/core/modal-base
|
|
|
|
block modal-header-content
|
|
|
|
h1
|
|
|
|
span= i18n(poll.attributes, "name")
|
|
|
|
|
|
|
|
block modal-body-content
|
|
|
|
.description
|
|
|
|
if poll.get("description")
|
|
|
|
div!= marked(i18n(poll.attributes, "description"))
|
|
|
|
else
|
|
|
|
div
|
|
|
|
|
|
|
|
.answers-container-wrapper
|
|
|
|
.answers-container
|
|
|
|
table.table.table-hover
|
2015-03-09 19:32:29 -04:00
|
|
|
for answer in poll.get("answers") || []
|
2015-03-07 19:30:25 -05:00
|
|
|
tr(class="answer", data-answer=answer.key)
|
|
|
|
td!= marked(i18n(answer, "text"))
|
|
|
|
td.graph-cell
|
|
|
|
.progress
|
|
|
|
.progress-bar
|
|
|
|
td.votes-cell
|
|
|
|
span.badge.vote-percentage
|
2015-03-10 12:45:21 -04:00
|
|
|
if me.isAdmin()
|
|
|
|
td.votes-cell
|
|
|
|
span.badge.vote-count
|
2015-03-07 19:30:25 -05:00
|
|
|
|
|
|
|
.random-gems-container-wrapper
|
|
|
|
.random-gems-container
|
|
|
|
code.random-gems-code
|
|
|
|
span randomNumber = Math.random()
|
|
|
|
span.comment#random-number-comment
|
|
|
|
code.random-gems-code
|
|
|
|
span gems = Math.ceil(2 * randomNumber * me.level)
|
|
|
|
span.comment#random-gems-comment
|
|
|
|
code.random-gems-code
|
|
|
|
span me.gems += gems
|
|
|
|
span.comment#total-gems-comment
|
|
|
|
|
|
|
|
block modal-footer-content
|
|
|
|
button.btn.btn-illustrated.btn-lg.done-button(data-dismiss="modal", aria-hidden="true", data-i18n="play_level.done") Done
|