@@ -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>
|
||||||
|
|||||||
@@ -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: "
|
||||||
|
|||||||
@@ -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: "
|
||||||
|
|||||||
@@ -22,18 +22,21 @@ feature 'Polls' do
|
|||||||
|
|
||||||
visit polls_path
|
visit polls_path
|
||||||
expect(page).to have_content('Current poll')
|
expect(page).to have_content('Current poll')
|
||||||
|
expect(page).to have_link('Participate in this poll')
|
||||||
expect(page).to_not have_content('Incoming poll')
|
expect(page).to_not have_content('Incoming poll')
|
||||||
expect(page).to_not have_content('Expired poll')
|
expect(page).to_not have_content('Expired poll')
|
||||||
|
|
||||||
visit polls_path(filter: 'incoming')
|
visit polls_path(filter: 'incoming')
|
||||||
expect(page).to_not have_content('Current poll')
|
expect(page).to_not have_content('Current poll')
|
||||||
expect(page).to have_content('Incoming poll')
|
expect(page).to have_content('Incoming poll')
|
||||||
|
expect(page).to have_link('More information')
|
||||||
expect(page).to_not have_content('Expired poll')
|
expect(page).to_not have_content('Expired poll')
|
||||||
|
|
||||||
visit polls_path(filter: 'expired')
|
visit polls_path(filter: 'expired')
|
||||||
expect(page).to_not have_content('Current poll')
|
expect(page).to_not have_content('Current poll')
|
||||||
expect(page).to_not have_content('Incoming poll')
|
expect(page).to_not have_content('Incoming poll')
|
||||||
expect(page).to have_content('Expired poll')
|
expect(page).to have_content('Expired poll')
|
||||||
|
expect(page).to have_link('Poll ended')
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Current filter is properly highlighted" do
|
scenario "Current filter is properly highlighted" do
|
||||||
|
|||||||
Reference in New Issue
Block a user