updates styles and i18n for officing views

This commit is contained in:
Alberto Garcia Cabeza
2017-01-30 13:33:38 +01:00
parent c74587d921
commit 1977b23803
7 changed files with 58 additions and 32 deletions

View File

@@ -1,26 +1,27 @@
<h2><%= t("officing.residence.new.title") %></h2>
<div class="row">
<div class="small-12 medium-6 column">
<div class="row verification account">
<div class="small-12 medium-8 column">
<%= form_for @residence, as: "residence", url: officing_residence_path do |f| %>
<%= render "errors" %>
<%= f.label t("officing.residence.new.document_type_label") %>
<%= f.select :document_type, document_types, prompt: "", label: false %>
<div class="small-12 medium-6">
<%= f.select :document_type, document_types, prompt: "" %>
<%= f.text_field :document_number,
placeholder: t("officing.residence.new.document_number") %>
<div class="date-of-birth small-12 medium-6 clear">
<%= f.label t("verification.residence.new.date_of_birth") %>
<%= f.date_select :date_of_birth,
prompt: true,
start_year: 1900, end_year: 16.years.ago.year,
label: false %>
</div>
<input type="submit" value="<%= t("officing.residence.new.submit") %>" class="button">
<div class="date-of-birth small-12 medium-6">
<%= f.date_select :date_of_birth,
prompt: true,
start_year: 1900, end_year: 16.years.ago.year %>
</div>
<div class="small-12 medium-6">
<input type="submit" value="<%= t("officing.residence.new.submit") %>" class="button expanded">
</div>
<% end %>
</div>
</div>

View File

@@ -1,3 +1,3 @@
<div class="callout warning">
<div class="callout warning inline-block">
<%= t("officing.voters.show.error_already_voted") %>
</div>

View File

@@ -1,15 +1,30 @@
<%= back_link_to new_officing_residence_path %>
<h2><%= t("officing.voters.new.title") %></h2>
<% if @polls.any? %>
<table>
<thead>
<tr>
<th><%= t("officing.voters.new.table_poll") %></th>
<th><%= t("officing.voters.new.table_actions") %></th>
</tr>
</thead>
<tbody>
<% @polls.each do |poll| %>
<div id="<%= dom_id(poll) %>">
<div><%= poll.name %></div>
<div id="actions">
<tr id="<%= dom_id(poll) %>">
<td>
<%= poll.name %>
</td>
<td id="actions">
<% if poll.votable_by?(@user) %>
<%= render "can_vote", poll: poll %>
<% else %>
<%= render "already_voted" %>
<% end %>
</div>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>

View File

@@ -16,3 +16,7 @@ en:
confirmation_code: "Confirmation code"
email:
recipient: "Email"
officing/residence:
document_type: "Document type"
document_number: "Document number (including letters)"
date_of_birth: "Date of birth"

View File

@@ -16,3 +16,7 @@ es:
confirmation_code: "Código de confirmación"
email:
recipient: "Email"
officing/residence:
document_type: "Tipo documento"
document_number: "Numero de documento (incluida letra)"
date_of_birth: "Fecha de nacimiento"

View File

@@ -34,14 +34,15 @@ en:
create: "Document verified with Census"
new:
title: Validate document
document_number: Document number
document_type_label: Document type
document_number: "Document number (including letters)"
submit: Validate document
error_verifying_census: "The Census was unable to verify this document."
form_errors: prevented the verification of this document
voters:
new:
title: Polls
table_poll: Poll
table_actions: Validate
show:
error_already_voted: Has already participated in this poll
submit: Validate vote

View File

@@ -34,15 +34,16 @@ es:
create: "Documento verificado con el Padrón"
new:
title: Validar documento
document_number: Número de documento
document_type_label: Tipo de documento
document_number: "Número de documento (incluida letra)"
submit: Validar documento
error_verifying_census: El Padrón no pudo verificar este documento.
form_errors: evitaron verificar este documento
voters:
new:
title: Votaciones
table_poll: Votación
table_actions: Validar
show:
error_already_voted: "Ya ha participado en la votación."
error_already_voted: "Ya ha participado en esta votación."
submit: Validar voto
success: Voto validado correctamente.