Avoid show div into markup for answers' information
If an answer does not contain any description or images associated, the "poll-more-info-answers" div won't be shown in the markup Change requested by #1998
This commit is contained in:
@@ -66,29 +66,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="expanded poll-more-info-answers">
|
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
|
||||||
<div class="row padding">
|
<% if answer.description.present? || answer.images.any? %>
|
||||||
|
<div class="expanded poll-more-info-answers">
|
||||||
|
<div class="row padding" data-equalizer>
|
||||||
|
|
||||||
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
|
<div class="small-12 medium-6 column end" id="answer_<%= answer.id %>"
|
||||||
<div class="small-12 medium-6 column end" id="answer_<%= answer.id %>"
|
data-toggler=".medium-6" data-equalizer-watch>
|
||||||
data-toggler=".medium-6">
|
|
||||||
|
|
||||||
<% if answer.description.present? %>
|
<% if answer.description.present? %>
|
||||||
<h3><%= answer.title %></h3>
|
<h3><%= answer.title %></h3>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if answer.images.any? %>
|
<div class="margin-top">
|
||||||
<%= render "gallery", answer: answer %>
|
<%= safe_html_with_links simple_format(answer.description) %>
|
||||||
<% end %>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if answer.description.present? %>
|
<% if answer.images.any? %>
|
||||||
<div class="margin-top">
|
<%= render "gallery", answer: answer %>
|
||||||
<%= safe_html_with_links simple_format(answer.description) %>
|
<% end %>
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user