displays images for an answer

This commit is contained in:
rgarcia
2017-10-04 23:55:45 +02:00
parent 06a1b96fcd
commit bba8cac262
2 changed files with 29 additions and 32 deletions

View File

@@ -15,22 +15,18 @@
<span class="show-for-sr"><%= t("shared.orbit.next_slide") %></span>&#9654;&#xFE0E;
</button>
</li>
<!-- each image do -->
<li class="is-active orbit-slide">
<%= link_to "/assets/example_vertical.jpg", target: "_blank" do %>
<%= image_tag "example_horizontal.jpg", class: "orbit-image" %>
<% end %>
<!-- replace this with image title -->
<span class="orbit-caption">Image title 1</span>
<!-- /. replace this with image title -->
</li>
<!-- end -->
<li class="orbit-slide">
<%= link_to "/assets/example_vertical.jpg", target: "_blank" do %>
<%= image_tag "example_vertical.jpg", class: "orbit-image" %>
<% end %>
<span class="orbit-caption">Image title 2</span>
</li>
<% answer.images.each do |image| %>
<li class="is-active orbit-slide">
<%= link_to image.attachment.url(:original), target: "_blank" do %>
<%= image_tag image.attachment.url(:medium),
class: "orbit-image",
alt: image.title %>
<% end %>
<span class="orbit-caption"><%= image.title %></span>
</li>
<% end %>
</ul>
<nav class="orbit-bullets">

View File

@@ -62,27 +62,28 @@
<div class="expanded poll-more-info-answers">
<div class="row padding">
<!-- EACH ANSWER DO -->
<div class="small-12 medium-6 column end" id="answer_1" data-toggler=".medium-6">
<% @poll.questions.map(&:question_answers).flatten.each do |answer| %>
<div class="small-12 medium-6 column end" id="answer_1"
data-toggler=".medium-6">
<!-- REPLACE THIS WITH answer title -->
<h3>Answer 1</h3>
<!-- /. REPLACE THIS WITH answer title -->
<!-- REPLACE THIS WITH answer title -->
<h3>Answer 1</h3>
<!-- /. REPLACE THIS WITH answer title -->
<!-- If Answer have images render this:
Maybe something like <%# render "gallery", gallery: answer.gallery %> -->
<%= render "gallery" %>
<!-- If Answer have images render this -->
<!-- If Answer have images render this:
Maybe something like <%# render "gallery", gallery: answer.gallery %> -->
<%= render "gallery", answer: answer %>
<!-- If Answer have images render this -->
<!-- REPLACE THIS WITH answer description -->
<div class="margin-top">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<!-- /. REPLACE THIS WITH answer description -->
<!-- REPLACE THIS WITH answer description -->
<div class="margin-top">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<!-- /. REPLACE THIS WITH answer description -->
</div>
<% end %>
</div>
<!-- /. EACH ANSWER DO -->
</div>
</div>