38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
<div id="<%= dom_id(question) %>" class="poll-question">
|
|
<h3>
|
|
<%= question.title %>
|
|
</h3>
|
|
|
|
<% unless question.votation_type.nil? %>
|
|
<strong>
|
|
<%= t("poll_questions.description.#{question.enum_type}",
|
|
maximum: question.votation_type.max_votes,
|
|
system: question.votation_type.prioritization_type) %>
|
|
</strong>
|
|
<% end %>
|
|
|
|
<div id="<%= dom_id(question) %>_answers" class="padding">
|
|
<% answers = question.is_positive_negative? ? question.question_answers.visibles.page(1) : question.question_answers.visibles %>
|
|
<%= render "polls/questions/answers", question: question, token: token, answers: answers, page: 1 %>
|
|
</div>
|
|
|
|
<% if question.answers_with_read_more? %>
|
|
<div class="poll_question_read_more">
|
|
<p><%= t("poll_questions.read_more_about") %></p>
|
|
<p>
|
|
<% first = true %>
|
|
<% question.question_answers&.visibles&.each do |answer| %>
|
|
<% if answer.description.present? || answer.images.any? ||
|
|
answer.documents.present? || answer.videos.present? %>
|
|
<% unless first %>
|
|
<span>, </span>
|
|
<% end %>
|
|
<% first = false if first %>
|
|
<%= link_to answer.title, "#answer_description_#{answer.id}" %>
|
|
<% end %>
|
|
<% end %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
</div>
|