-
-
<%= poll_dates(poll) %>
-
<%= link_to poll.name, poll %>
-
- <% poll.questions.each do |question| %>
- - <%= link_to question.title, question_path(question) %>
- <% end %>
-
-
-
-
- <%= link_to t("polls.index.participate_button"), poll, class: "button" %>
+ <% polls_by_geozone_restriction = @polls.group_by(&:geozone_restricted) %>
+
+ <% if polls_by_geozone_restriction[false].any? %>
+
<%= t("polls.index.no_geozone_restricted") %>
+
+ <% polls_by_geozone_restriction[false].each do |poll| %>
+
+
+
+
<%= poll_dates(poll) %>
+
<%= link_to poll.name, poll %>
+
+ <% poll.questions.each do |question| %>
+ - <%= link_to question.title, question_path(question) %>
+ <% end %>
+
+
+
+
+ <%= link_to t("polls.index.participate_button"), poll, class: "button" %>
+
-
+ <% end %>
+ <% end %>
+
+ <% if polls_by_geozone_restriction[true].any? %>
+
<%= t("polls.index.geozone_restricted") %>
+ <% polls_by_geozone_restriction[true].each do |poll| %>
+
+
+
+
<%= poll_dates(poll) %>
+
<%= link_to poll.name, poll %>
+
+ <% poll.questions.each do |question| %>
+ - <%= link_to question.title, question_path(question) %>
+ <% end %>
+
+
+
+
+ <%= link_to t("polls.index.participate_button"), poll, class: "button" %>
+
+
+
+ <% end %>
<% end %>
<%= paginate @polls %>