adds styles and i18n to signature sheets admin views
This commit is contained in:
@@ -1,26 +1,31 @@
|
||||
<h1>Signatures</h1>
|
||||
<h2 class="inline-block"><%= t("admin.signature_sheets.index.title") %></h2>
|
||||
|
||||
<div>
|
||||
<%= link_to 'Nueva hoja de firmas', new_admin_signature_sheet_path %>
|
||||
</div>
|
||||
<%= link_to t("admin.signature_sheets.index.new"), new_admin_signature_sheet_path,
|
||||
class: "button success float-right" %>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t("admin.signature_sheet.name") %></th>
|
||||
<th><%= t("admin.signature_sheet.author") %></th>
|
||||
<th><%= t("admin.signature_sheet.created_at") %></th>
|
||||
</tr>
|
||||
<% @signature_sheets.each do |signature_sheet| %>
|
||||
<tr id="<%= dom_id(signature_sheet) %>">
|
||||
<td>
|
||||
<%= link_to signature_sheet.name, [:admin, signature_sheet] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= signature_sheet.author.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= l(signature_sheet.created_at, format: :short) %>
|
||||
</td>
|
||||
<% if @signature_sheets.any? %>
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t("admin.signature_sheets.name") %></th>
|
||||
<th><%= t("admin.signature_sheets.author") %></th>
|
||||
<th><%= t("admin.signature_sheets.created_at") %></th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% @signature_sheets.each do |signature_sheet| %>
|
||||
<tr id="<%= dom_id(signature_sheet) %>">
|
||||
<td>
|
||||
<%= link_to signature_sheet.name, [:admin, signature_sheet] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= signature_sheet.author.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= l(signature_sheet.created_at, format: :short) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% else %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t("admin.signature_sheets.no_signature_sheets") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
<%= render 'shared/back_link' %>
|
||||
|
||||
<h2><%= t("admin.signature_sheets.new.title") %></h2>
|
||||
|
||||
<%= form_for [:admin, @signature_sheet] do |f| %>
|
||||
<%= render 'shared/errors',
|
||||
resource: @signature_sheet %>
|
||||
|
||||
<%= f.select :signable_type, signable_options %>
|
||||
<%= f.text_field :signable_id %>
|
||||
<%= f.text_area :document_numbers %>
|
||||
<%= f.submit %>
|
||||
<% end %>
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.select :signable_type, signable_options %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.text_field :signable_id %>
|
||||
</div>
|
||||
|
||||
<%= f.label :document_numbers %>
|
||||
<p class="note"><%= t("admin.signature_sheets.new.document_numbers_note") %></p>
|
||||
<%= f.text_area :document_numbers, rows: "6", label: false %>
|
||||
|
||||
<%= f.submit(class: "button", value: t("admin.signature_sheets.new.submit")) %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,28 +1,48 @@
|
||||
<h1><%= @signature_sheet.name %></h1>
|
||||
<h2 class="inline-block"><%= @signature_sheet.name %></h2>
|
||||
|
||||
<div>Documentos: <%= @signature_sheet.document_numbers %></div>
|
||||
<div>Creado: <%= l(@signature_sheet.created_at, format: :short) %></div>
|
||||
<div>Autor: <%= @signature_sheet.author.name %></div>
|
||||
<br/>
|
||||
|
||||
<div>
|
||||
Hay <%= @signature_sheet.signatures.valid.count %> firmas válidas
|
||||
<div class="callout secondary float-right">
|
||||
<%= t("admin.signature_sheets.show.created_at") %>
|
||||
<strong><%= l(@signature_sheet.created_at, format: :short) %></strong>
|
||||
<span class="bullet"> • </span>
|
||||
<%= t("admin.signature_sheets.show.author") %>
|
||||
<strong><%= @signature_sheet.author.name %></strong>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
Hay <%= @signature_sheet.signatures.invalid.count %> firmas inválidas
|
||||
<div class="callout margin-top">
|
||||
<p><strong><%= t("admin.signature_sheets.show.documents") %></strong></p>
|
||||
<%= @signature_sheet.document_numbers %>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<% if @signature_sheet.signatures.invalid.any? %>
|
||||
<div class="callout success">
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.valid",
|
||||
count: @signature_sheet.signatures.valid.count ) %>
|
||||
</strong>
|
||||
</div>
|
||||
<% @invalid_signatures.each do |error, signatures| %>
|
||||
<div><%= error %></div>
|
||||
<div>
|
||||
<%= signatures.map(&:document_number).join(",") %>
|
||||
<div class="callout alert">
|
||||
<p>
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.invalid",
|
||||
count: @signature_sheet.signatures.invalid.count ) %>
|
||||
(<%= error %>)
|
||||
</strong>
|
||||
</p>
|
||||
<%= signatures.map(&:document_number).join(",") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="callout success">
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.all_valid",
|
||||
count: @signature_sheet.signatures.valid.count ) %>
|
||||
</strong>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% unless @signature_sheet.processed? %>
|
||||
Aún hay firmas que se están verificando por el Padrón, por favor refresca la página en unos instantes.
|
||||
<div class="callout primary margin-top">
|
||||
<%= t("admin.signature_sheets.show.loading") %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -69,6 +69,10 @@ en:
|
||||
external_url: "Link to additional documentation"
|
||||
geozone_id: "Scope of operation"
|
||||
title: "Title"
|
||||
signature_sheet:
|
||||
signable_type: "Signable type"
|
||||
signable_id: "Signable ID"
|
||||
document_numbers: "Documents numbers"
|
||||
errors:
|
||||
models:
|
||||
user:
|
||||
|
||||
@@ -69,6 +69,10 @@ es:
|
||||
external_url: "Enlace a documentación adicional"
|
||||
geozone_id: "Ámbito de actuación"
|
||||
title: "Título"
|
||||
signature_sheet:
|
||||
signable_type: "Tipo de hoja de firmas"
|
||||
signable_id: "ID Propuesta ciudadana/Propuesta inversión"
|
||||
document_numbers: "Números de documentos"
|
||||
errors:
|
||||
models:
|
||||
user:
|
||||
|
||||
@@ -296,10 +296,27 @@ en:
|
||||
delete:
|
||||
success: Geozone successfully deleted
|
||||
error: This geozone can't be deleted since there are elements attached to it
|
||||
signature_sheet:
|
||||
signature_sheets:
|
||||
author: Author
|
||||
created_at: Creation date
|
||||
name: Name
|
||||
no_signature_sheets: "There are not signature_sheets"
|
||||
index:
|
||||
title: Signature sheets
|
||||
new: New signature sheets
|
||||
new:
|
||||
title: New signature sheets
|
||||
signable_type: Type of signature sheet
|
||||
document_numbers_note: "Write the numbers separated by commas (,)"
|
||||
submit: Create signature sheets
|
||||
show:
|
||||
created_at: Created
|
||||
author: Author
|
||||
documents: Documents
|
||||
all_valid: "All the signatures (%{count}) are valid"
|
||||
valid: "There are %{count} valid signatures"
|
||||
invalid: "There are %{count} invalid signatures"
|
||||
loading: "There are still signatures that are being verified by the Census, please refresh the page in a few moments"
|
||||
stats:
|
||||
show:
|
||||
stats_title: Stats
|
||||
|
||||
@@ -294,10 +294,27 @@ es:
|
||||
delete:
|
||||
success: Distrito borrado correctamente
|
||||
error: No se puede borrar el distrito porque ya tiene elementos asociados
|
||||
signature_sheet:
|
||||
signature_sheets:
|
||||
author: Autor
|
||||
created_at: Fecha de creación
|
||||
name: Nombre
|
||||
no_signature_sheets: "No existen hojas de firmas"
|
||||
index:
|
||||
title: Hojas de firmas
|
||||
new: Nueva hoja de firmas
|
||||
new:
|
||||
title: Nueva hoja de firmas
|
||||
signable_type: Tipo de hoja de firmas
|
||||
document_numbers_note: "Introduce los números separados por comas (,)"
|
||||
submit: Crear hoja de firmas
|
||||
show:
|
||||
created_at: Creado
|
||||
author: Autor
|
||||
documents: Documentos
|
||||
all_valid: "Todas las firmas introducidas (%{count}) son válidas"
|
||||
valid: "Hay %{count} firmas válidas"
|
||||
invalid: "Hay %{count} firmas inválidas"
|
||||
loading: "Aún hay firmas que se están verificando por el Padrón, por favor refresca la página en unos instantes"
|
||||
stats:
|
||||
show:
|
||||
stats_title: Estadísticas
|
||||
|
||||
@@ -27,6 +27,7 @@ en:
|
||||
facebook_login: Facebook login
|
||||
google_login: Google login
|
||||
debates: Debates
|
||||
signature_sheets: Signature sheets
|
||||
spending_proposals: Investment projects
|
||||
spending_proposal_features:
|
||||
voting_allowed: Voting on investment projects
|
||||
|
||||
@@ -27,6 +27,7 @@ es:
|
||||
facebook_login: Registro con Facebook
|
||||
google_login: Registro con Google
|
||||
debates: Debates
|
||||
signature_sheets: Hojas de firmas
|
||||
spending_proposals: Propuestas de inversión
|
||||
spending_proposal_features:
|
||||
voting_allowed: Votaciones sobre propuestas de inversión.
|
||||
Reference in New Issue
Block a user