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 t("admin.signature_sheets.index.new"), new_admin_signature_sheet_path,
|
||||||
<%= link_to 'Nueva hoja de firmas', new_admin_signature_sheet_path %>
|
class: "button success float-right" %>
|
||||||
</div>
|
|
||||||
|
|
||||||
<table>
|
<% if @signature_sheets.any? %>
|
||||||
<tr>
|
<table>
|
||||||
<th><%= t("admin.signature_sheet.name") %></th>
|
<tr>
|
||||||
<th><%= t("admin.signature_sheet.author") %></th>
|
<th><%= t("admin.signature_sheets.name") %></th>
|
||||||
<th><%= t("admin.signature_sheet.created_at") %></th>
|
<th><%= t("admin.signature_sheets.author") %></th>
|
||||||
</tr>
|
<th><%= t("admin.signature_sheets.created_at") %></th>
|
||||||
<% @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>
|
</tr>
|
||||||
<% end %>
|
<% @signature_sheets.each do |signature_sheet| %>
|
||||||
</table>
|
<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| %>
|
<%= form_for [:admin, @signature_sheet] do |f| %>
|
||||||
<%= render 'shared/errors',
|
<%= render 'shared/errors',
|
||||||
resource: @signature_sheet %>
|
resource: @signature_sheet %>
|
||||||
|
|
||||||
<%= f.select :signable_type, signable_options %>
|
<div class="small-12 medium-6 large-4">
|
||||||
<%= f.text_field :signable_id %>
|
<%= f.select :signable_type, signable_options %>
|
||||||
<%= f.text_area :document_numbers %>
|
</div>
|
||||||
<%= f.submit %>
|
|
||||||
|
<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 %>
|
<% 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 class="callout secondary float-right">
|
||||||
<div>Creado: <%= l(@signature_sheet.created_at, format: :short) %></div>
|
<%= t("admin.signature_sheets.show.created_at") %>
|
||||||
<div>Autor: <%= @signature_sheet.author.name %></div>
|
<strong><%= l(@signature_sheet.created_at, format: :short) %></strong>
|
||||||
<br/>
|
<span class="bullet"> • </span>
|
||||||
|
<%= t("admin.signature_sheets.show.author") %>
|
||||||
<div>
|
<strong><%= @signature_sheet.author.name %></strong>
|
||||||
Hay <%= @signature_sheet.signatures.valid.count %> firmas válidas
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="callout margin-top">
|
||||||
Hay <%= @signature_sheet.signatures.invalid.count %> firmas inválidas
|
<p><strong><%= t("admin.signature_sheets.show.documents") %></strong></p>
|
||||||
|
<%= @signature_sheet.document_numbers %>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
|
||||||
|
|
||||||
<% if @signature_sheet.signatures.invalid.any? %>
|
<% 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| %>
|
<% @invalid_signatures.each do |error, signatures| %>
|
||||||
<div><%= error %></div>
|
<div class="callout alert">
|
||||||
<div>
|
<p>
|
||||||
<%= signatures.map(&:document_number).join(",") %>
|
<strong>
|
||||||
|
<%= t("admin.signature_sheets.show.invalid",
|
||||||
|
count: @signature_sheet.signatures.invalid.count ) %>
|
||||||
|
(<%= error %>)
|
||||||
|
</strong>
|
||||||
|
</p>
|
||||||
|
<%= signatures.map(&:document_number).join(",") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<div class="callout success">
|
||||||
|
<strong>
|
||||||
|
<%= t("admin.signature_sheets.show.all_valid",
|
||||||
|
count: @signature_sheet.signatures.valid.count ) %>
|
||||||
|
</strong>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @signature_sheet.processed? %>
|
<% 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 %>
|
<% end %>
|
||||||
@@ -69,6 +69,10 @@ en:
|
|||||||
external_url: "Link to additional documentation"
|
external_url: "Link to additional documentation"
|
||||||
geozone_id: "Scope of operation"
|
geozone_id: "Scope of operation"
|
||||||
title: "Title"
|
title: "Title"
|
||||||
|
signature_sheet:
|
||||||
|
signable_type: "Signable type"
|
||||||
|
signable_id: "Signable ID"
|
||||||
|
document_numbers: "Documents numbers"
|
||||||
errors:
|
errors:
|
||||||
models:
|
models:
|
||||||
user:
|
user:
|
||||||
|
|||||||
@@ -69,6 +69,10 @@ es:
|
|||||||
external_url: "Enlace a documentación adicional"
|
external_url: "Enlace a documentación adicional"
|
||||||
geozone_id: "Ámbito de actuación"
|
geozone_id: "Ámbito de actuación"
|
||||||
title: "Título"
|
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:
|
errors:
|
||||||
models:
|
models:
|
||||||
user:
|
user:
|
||||||
|
|||||||
@@ -296,10 +296,27 @@ en:
|
|||||||
delete:
|
delete:
|
||||||
success: Geozone successfully deleted
|
success: Geozone successfully deleted
|
||||||
error: This geozone can't be deleted since there are elements attached to it
|
error: This geozone can't be deleted since there are elements attached to it
|
||||||
signature_sheet:
|
signature_sheets:
|
||||||
author: Author
|
author: Author
|
||||||
created_at: Creation date
|
created_at: Creation date
|
||||||
name: Name
|
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:
|
stats:
|
||||||
show:
|
show:
|
||||||
stats_title: Stats
|
stats_title: Stats
|
||||||
|
|||||||
@@ -294,10 +294,27 @@ es:
|
|||||||
delete:
|
delete:
|
||||||
success: Distrito borrado correctamente
|
success: Distrito borrado correctamente
|
||||||
error: No se puede borrar el distrito porque ya tiene elementos asociados
|
error: No se puede borrar el distrito porque ya tiene elementos asociados
|
||||||
signature_sheet:
|
signature_sheets:
|
||||||
author: Autor
|
author: Autor
|
||||||
created_at: Fecha de creación
|
created_at: Fecha de creación
|
||||||
name: Nombre
|
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:
|
stats:
|
||||||
show:
|
show:
|
||||||
stats_title: Estadísticas
|
stats_title: Estadísticas
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ en:
|
|||||||
facebook_login: Facebook login
|
facebook_login: Facebook login
|
||||||
google_login: Google login
|
google_login: Google login
|
||||||
debates: Debates
|
debates: Debates
|
||||||
|
signature_sheets: Signature sheets
|
||||||
spending_proposals: Investment projects
|
spending_proposals: Investment projects
|
||||||
spending_proposal_features:
|
spending_proposal_features:
|
||||||
voting_allowed: Voting on investment projects
|
voting_allowed: Voting on investment projects
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ es:
|
|||||||
facebook_login: Registro con Facebook
|
facebook_login: Registro con Facebook
|
||||||
google_login: Registro con Google
|
google_login: Registro con Google
|
||||||
debates: Debates
|
debates: Debates
|
||||||
|
signature_sheets: Hojas de firmas
|
||||||
spending_proposals: Propuestas de inversión
|
spending_proposals: Propuestas de inversión
|
||||||
spending_proposal_features:
|
spending_proposal_features:
|
||||||
voting_allowed: Votaciones sobre propuestas de inversión.
|
voting_allowed: Votaciones sobre propuestas de inversión.
|
||||||
Reference in New Issue
Block a user