shows always questions lists and button to participate on poll index

This commit is contained in:
Alberto Garcia Cabeza
2017-01-31 21:08:03 +01:00
parent 16e546c3fc
commit 8c4541d50f
4 changed files with 25 additions and 10 deletions

View File

@@ -1372,9 +1372,13 @@ ul.ballot-list {
.dates {
color: $text-medium;
font-size: $small-font-size;
@include breakpoint(medium) {
float: right;
}
}
h3 a {
h4 a {
color: $text;
}
}
@@ -1383,6 +1387,12 @@ h2.questions-callout {
font-size: $base-font-size;
}
h3.section-title-divider {
border-bottom: 2px solid $brand;
color: $brand;
margin-bottom: $line-height;
}
.poll-question {
padding: 0 $line-height;

View File

@@ -15,12 +15,19 @@
</div>
<div class="small-12 medium-9 column margin-top">
<h3 class="section-title-divider"><%= t("polls.index.no_geozone_restricted") %></h3>
<h3 class="section-title-divider"><%= t("polls.index.geozone_restricted") %></h3>
<% @polls.each do |poll| %>
<div class="poll">
<div class="row">
<div class="small-12 column">
<h3><%= link_to poll.name, poll %></h3>
<p class="dates"><%= poll_dates(poll) %></p>
<div class="dates"><%= poll_dates(poll) %></div>
<h4 class="inline-block"><%= link_to poll.name, poll %></h4>
<ul>
<% poll.questions.each do |question| %>
<li><%= link_to question.title, question_path(question) %></li>
<% end %>
</ul>
<ul class="no-bullet margin-top tags">
<% poll.geozones.each do |g| %>
<li class="inline-block"><span><%= g.name %></span></li>
@@ -28,11 +35,7 @@
</ul>
</div>
<div class="small-12 column">
<% if can? :answer, poll %>
<%= link_to t("polls.index.participate_button"), poll, class: "button" %>
<% else %>
<%= link_to t("polls.index.view_button"), poll %>
<% end %>
<%= link_to t("polls.index.participate_button"), poll, class: "button" %>
</div>
</div>
</div>

View File

@@ -403,7 +403,8 @@ en:
expired: "Expired"
title: "Polls"
participate_button: "Participate in this poll"
view_button: "View details about this poll"
no_geozone_restricted: "All city"
geozone_restricted: "Districts"
show:
dates_title: "Participation dates"
cant_answer_not_logged_in: "You must %{signin} or %{signup} to participate."

View File

@@ -403,7 +403,8 @@ es:
expired: "Terminadas"
title: "Votaciones"
participate_button: "Participar en esta votación"
view_button: "Ver detalles de la votación"
no_geozone_restricted: "Toda la ciudad"
geozone_restricted: "Distritos"
show:
dates_title: "Fechas de participación"
cant_answer_not_logged_in: "Necesitas %{signin} o %{signup} para participar."