We had inconsistent indentation in many places. Now we're fixing them and adding a linter to our CI so we don't accidentally introduce inconsistent indentations again.
57 lines
2.0 KiB
Plaintext
57 lines
2.0 KiB
Plaintext
<h2><%= question.title %></h2>
|
|
<% question.options_with_read_more.each do |option| %>
|
|
<div class="small-12 medium-6 column end option <%= cycle("first", "") %>" id="option_<%= option.id %>">
|
|
<h3><%= option.title %></h3>
|
|
|
|
<div class="margin-top">
|
|
<% if option.description.present? %>
|
|
<div id="option_description_<%= option.id %>" class="option-description short" data-toggler="short">
|
|
<%= wysiwyg(option.description) %>
|
|
</div>
|
|
<div class="read-more">
|
|
<button type="button" id="read_more_<%= option.id %>"
|
|
data-toggle="option_description_<%= option.id %> read_more_<%= option.id %> read_less_<%= option.id %>"
|
|
data-toggler="hide">
|
|
<%= t("polls.show.read_more", answer: option.title) %>
|
|
</button>
|
|
<button type="button" id="read_less_<%= option.id %>"
|
|
data-toggle="option_description_<%= option.id %> read_more_<%= option.id %> read_less_<%= option.id %>"
|
|
data-toggler="hide"
|
|
class="hide">
|
|
<%= t("polls.show.read_less", answer: option.title) %>
|
|
</button>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if option.images.any? %>
|
|
<%= render "polls/gallery", option: option %>
|
|
<% end %>
|
|
|
|
<% if option.documents.present? %>
|
|
<div class="document-link">
|
|
<p>
|
|
<strong><%= t("polls.show.documents") %></strong>
|
|
</p>
|
|
|
|
<% option.documents.each do |document| %>
|
|
<%= render Documents::DocumentComponent.new(document) %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if option.videos.present? %>
|
|
<div class="video-link">
|
|
<p>
|
|
<span class="icon-video"></span>
|
|
<strong><%= t("polls.show.videos") %></strong>
|
|
</p>
|
|
|
|
<% option.videos.each do |video| %>
|
|
<%= link_to video.title, video.url, rel: "nofollow" %><br>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|