Files
nairobi/app/views/polls/show.html.erb
2017-10-04 23:56:23 +02:00

90 lines
3.0 KiB
Plaintext

<% provide :title do %><%= @poll.name %><% end %>
<div class="polls-show">
<div class="expanded no-margin-top polls-show-header">
<div class="row">
<div class="small-12 medium-9 column padding">
<%= back_link_to polls_path, t("polls.show.back") %>
<h2><%= @poll.name %></h2>
<%= safe_html_with_links simple_format(@poll.summary) %>
<% if @poll.geozones.any? %>
<ul class="no-bullet margin-top tags">
<% @poll.geozones.each do |g| %>
<li class="inline-block"><span><%= g.name %></span></li>
<% end %>
</ul>
<% end %>
</div>
<aside class="small-12 medium-3 column margin-top">
<%= render partial: 'shared/social_share', locals: {
share_title: t("shared.share"),
title: @poll.name,
url: poll_url
} %>
</aside>
</div>
</div>
<div class="row margin">
<div class="small-12 medium-9 column">
<%= render "callout" %>
<% if @poll.voted_in_booth?(current_user) %>
<div class="callout warning">
<%= t("polls.show.already_voted_in_booth") %>
</div>
<% else %>
<% @questions.each do |question| %>
<%= render 'polls/questions/question', question: question %>
<% end %>
<% end %>
</div>
</div>
<div class="expanded poll-more-info">
<div class="row margin">
<div class="small-12 medium-9 column">
<h3><%= t("polls.show.more_info_title") %></h3>
<%= safe_html_with_links simple_format(@poll.description) %>
</div>
<aside class="small-12 medium-3 column">
<div class="sidebar-divider"></div>
<h2><%= t("polls.show.documents") %></h2>
</aside>
</div>
</div>
<div class="expanded poll-more-info-answers">
<div class="row padding">
<% @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 -->
<!-- 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 -->
</div>
<% end %>
</div>
</div>
</div>