<% if !user_signed_in? %>
">
<%= t("polls.index.not_logged_in") %>
<% elsif user_signed_in? %>
<% if current_user.unverified? %>
">
<%= t("polls.index.unverified") %>
<% elsif cannot?(:answer, poll) %>
">
<%= t("polls.index.cant_answer") %>
<% elsif !poll.votable_by?(current_user) %>
">
<%= t("polls.index.already_answer") %>
<% end %>
<% end %>
<% if poll.image.present? %>
<%= image_tag poll.image_url(:large), alt: poll.image.title.unicode_normalize %>
<% end %>
<% if poll.questions.count == 1 %>
<% poll.questions.each do |question| %>
<% if poll.results_enabled? %>
<%= link_to question.title, results_poll_path(poll) %>
<% elsif poll.stats_enabled? %>
<%= link_to question.title, stats_poll_path(poll) %>
<% else %>
<%= link_to question.title, poll %>
<% end %>
<%= poll_dates(poll) %>
<% end %>
<% else %>
<% if poll.results_enabled? %>
<%= link_to poll.name, results_poll_path(poll) %>
<% elsif poll.stats_enabled? %>
<%= link_to poll.name, stats_poll_path(poll) %>
<% else %>
<%= link_to poll.name, poll %>
<% end %>
<%= poll_dates(poll) %>
<% poll.questions.each do |question| %>
- <%= question.title %>
<% end %>
<% end %>
<% if poll.geozones.any? %>
<%= t("polls.index.geozone_info") %>
<% end %>
<%= link_to poll, class: "button hollow expanded" do %>
<% if poll.expired? %>
<%= t("polls.index.participate_button_expired") %>
<% else %>
<%= t("polls.index.participate_button") %>
<% end %>
<% end %>
<% end %>