improves text and layouts for officing voters views

This commit is contained in:
decabeza
2017-10-13 14:16:21 +02:00
parent c097cf236c
commit 386fe785c7
5 changed files with 43 additions and 21 deletions

View File

@@ -605,6 +605,7 @@ table {
.callout {
height: $line-height * 2;
line-height: $line-height * 2;
margin: 0;
padding: 0 $line-height / 2;
}
}

View File

@@ -1,7 +1,3 @@
<div class="row">
<div class="small-12 medium-8 column">
<div class="callout primary text-center">
<span class="lead text-center">
<strong><%= t("officing.voters.show.success") %></strong>
</div>
</div>
</div>
</span>

View File

@@ -7,7 +7,8 @@
<thead>
<tr>
<th><%= t("officing.voters.new.table_poll") %></th>
<th><%= t("officing.voters.new.table_actions") %></th>
<th><%= t("officing.voters.new.table_status") %></th>
<th class="text-center"><%= t("officing.voters.new.table_actions") %></th>
</tr>
</thead>
<tbody>
@@ -16,13 +17,33 @@
<td>
<%= poll.name %>
</td>
<td id="actions">
<% if poll.votable_by?(@user) %>
<%= render "can_vote", poll: poll %>
<% else %>
<%= render "already_voted" %>
<td class="text-center">
<p class="callout success">
<strong><%= t("officing.voters.show.can_vote") %></strong>
</p>
</td>
<td id="actions" class="text-center">
<%= form_for @user, as: :voter, url: officing_voters_path,
method: :post, remote: true,
html: { id: "new_officing_voter" } do |f| %>
<%= f.hidden_field :poll_id, value: poll.id %>
<%= f.hidden_field :user_id, value: @user.id %>
<%= f.submit t("officing.voters.show.submit"),
class: "button success",
data: { disable_with: t("officing.voters.can_vote.submit_disable_with") } %>
<% end %>
</td>
<% else %>
<td>
<p class="callout alert text-center">
<strong><%= t("officing.voters.show.error_already_voted") %></strong>
</p>
</td>
<td class="text-center">
<small><%= t("officing.voters.show.no_actions") %></small>
</td>
<% end %>
</tr>
<% end %>
</tbody>

View File

@@ -58,11 +58,13 @@ en:
new:
title: Polls
table_poll: Poll
table_actions: Polls status
table_status: Polls status
table_actions: Actions
show:
can_vote: Can vote
error_already_voted: Has already participated in this poll
no_actions: There is no available actions
submit: Confirm vote
success: "Vote introduced!"
can_vote:
submit_disable_with: "WAIT, confirming vote"
submit_disable_with: "Wait, confirming vote..."

View File

@@ -58,11 +58,13 @@ es:
new:
title: Votaciones
table_poll: Votación
table_actions: Estado de las votaciones
table_status: Estado de las votaciones
table_actions: Acciones
show:
can_vote: Puede votar
error_already_voted: "Ya ha participado en esta votación."
error_already_voted: "Ya ha participado en esta votación"
no_actions: No hay acciones disponibles
submit: Confirmar voto
success: "¡Voto introducido!"
can_vote:
submit_disable_with: "ESPERA, confirmando voto"
submit_disable_with: "Espera, confirmando voto..."