Add politicians question type
This commit is contained in:
parent
4fe218166f
commit
2893f2bc53
16 changed files with 101 additions and 33 deletions
|
@ -1,3 +1,16 @@
|
|||
<div>
|
||||
This one's going to be hard...
|
||||
<div class="politicians-listing">
|
||||
<div>
|
||||
<% question.data["left"].each do |l| %>
|
||||
<p><%= l %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div data-behaviour="politicians_answer"
|
||||
data-submit-url="<%= answer_question_url(question.id) %>"
|
||||
>
|
||||
<% answers = question.data["right"].each.with_index.to_a %>
|
||||
<% answers = reorder_with_indices(answers, question.answer.data) if question.answer.present? %>
|
||||
<% answers.each do |a, i| %>
|
||||
<p data-id="<%= i %>"><%= a %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue