changes button text depending of poll status
This commit is contained in:
@@ -60,7 +60,15 @@
|
||||
</ul>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user