changes button text depending of poll status

This commit is contained in:
Alberto Garcia Cabeza
2017-03-06 12:29:13 +01:00
parent 25a88e8747
commit bf3e301bb1
3 changed files with 13 additions and 1 deletions

View File

@@ -60,7 +60,15 @@
</ul> </ul>
</div> </div>
<div class="small-12 medium-6 large-4 column end"> <div class="small-12 medium-6 large-4 column end">
<%= link_to t("polls.index.participate_button"), poll, class: "button expanded" %> <%= link_to poll, class: "button expanded" do %>
<% if poll.expired? %>
<%= t("polls.index.participate_button_expired") %>
<% elsif poll.incoming? %>
<%= t("polls.index.participate_button_incoming") %>
<% else %>
<%= t("polls.index.participate_button") %>
<% end %>
<% end %>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -403,6 +403,8 @@ en:
expired: "Expired" expired: "Expired"
title: "Polls" title: "Polls"
participate_button: "Participate in this poll" participate_button: "Participate in this poll"
participate_button_incoming: "More information"
participate_button_expired: "Poll ended"
no_geozone_restricted: "All city" no_geozone_restricted: "All city"
geozone_restricted: "Districts" geozone_restricted: "Districts"
geozone_info: "Can participate people in the Census of: " geozone_info: "Can participate people in the Census of: "

View File

@@ -403,6 +403,8 @@ es:
expired: "Terminadas" expired: "Terminadas"
title: "Votaciones" title: "Votaciones"
participate_button: "Participar en esta votación" participate_button: "Participar en esta votación"
participate_button_incoming: "Más información"
participate_button_expired: "Votación terminada"
no_geozone_restricted: "Toda la ciudad" no_geozone_restricted: "Toda la ciudad"
geozone_restricted: "Distritos" geozone_restricted: "Distritos"
geozone_info: "Pueden participar las personas empadronadas en: " geozone_info: "Pueden participar las personas empadronadas en: "