Merge pull request #2010 from consul/polls-show-description

Polls show description
This commit is contained in:
Raimond Garcia
2017-10-07 18:01:47 +02:00
committed by GitHub

View File

@@ -80,12 +80,9 @@
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
<div class="small-12 medium-6 column end" id="answer_<%= answer.id %>"
data-toggler="medium-6 answer-divider">
<h3><%= answer.title %></h3>
<% if answer.description.present? %>
<div class="margin-top">
<%= safe_html_with_links simple_format(answer.description) %>
</div>
<h3><%= answer.title %></h3>
<% end %>
<% if answer.images.any? %>
@@ -112,19 +109,19 @@
<% end %>
<% if answer.documents.present? %>
<div class="document-link">
<p>
<span class="icon-document"></span>&nbsp;
<strong><%= t("polls.show.documents") %></strong>
</p>
<div class="document-link">
<p>
<span class="icon-document"></span>&nbsp;
<strong><%= t("polls.show.documents") %></strong>
</p>
<% answer.documents.each do |document| %>
<%= link_to document.title,
document.attachment.url,
target: "_blank",
rel: "nofollow" %><br>
<% end %>
</div>
<% answer.documents.each do |document| %>
<%= link_to document.title,
document.attachment.url,
target: "_blank",
rel: "nofollow" %><br>
<% end %>
</div>
<% end %>
</div>
<% end %>