From 53ac18f68f1c31fbe734f7f97636d55964fcf018 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Tue, 20 Dec 2016 17:06:03 +0100 Subject: [PATCH] updates views --- .../admin/signature_sheets/show.html.erb | 33 +++++++++---------- config/locales/admin.en.yml | 6 ++-- config/locales/admin.es.yml | 6 ++-- db/schema.rb | 4 +-- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/app/views/admin/signature_sheets/show.html.erb b/app/views/admin/signature_sheets/show.html.erb index 357f173f2..4c65937e3 100644 --- a/app/views/admin/signature_sheets/show.html.erb +++ b/app/views/admin/signature_sheets/show.html.erb @@ -13,30 +13,29 @@ <%= @signature_sheet.document_numbers %> -<% if @signature_sheet.signatures.invalid.any? %> +<% if @signature_sheet.signatures.unverified.any? %>
- <%= t("admin.signature_sheets.show.valid", - count: @signature_sheet.signatures.valid.count ) %> + <%= t("admin.signature_sheets.show.verified", + count: @signature_sheet.signatures.verified.count ) %>
- <% @invalid_signatures.each do |error, signatures| %> -
-

- - <%= t("admin.signature_sheets.show.invalid", - count: @signature_sheet.signatures.invalid.count ) %> - (<%= error %>) - -

- <%= signatures.map(&:document_number).join(",") %> -
- <% end %> + +
+

+ + <%= t("admin.signature_sheets.show.unverified", + count: @signature_sheet.signatures.unverified.count ) %> + (No verificadas por el Padrón) + +

+ <%= @signature_sheet.signatures.unverified.map(&:document_number).join(",") %> +
<% else %>
- <%= t("admin.signature_sheets.show.all_valid", - count: @signature_sheet.signatures.valid.count ) %> + <%= t("admin.signature_sheets.show.all_verified", + count: @signature_sheet.signatures.verified.count ) %>
<% end %> diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 6ba072419..c90f430ef 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -313,9 +313,9 @@ en: 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" + all_verified: "All the signatures (%{count}) are valid" + verified: "There are %{count} valid signatures" + unverified: "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: diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index ed4ad1bc1..fd454c13b 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -311,9 +311,9 @@ es: 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" + all_verified: "Todas las firmas introducidas (%{count}) son válidas" + verified: "Hay %{count} firmas válidas" + unverified: "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: diff --git a/db/schema.rb b/db/schema.rb index ab8dead98..95d40a493 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -330,7 +330,7 @@ ActiveRecord::Schema.define(version: 20161214233817) do t.integer "signable_id" t.string "signable_type" t.text "document_numbers" - t.boolean "processed" + t.boolean "processed", default: false t.integer "author_id" t.datetime "created_at" t.datetime "updated_at" @@ -340,7 +340,7 @@ ActiveRecord::Schema.define(version: 20161214233817) do t.integer "signature_sheet_id" t.integer "user_id" t.string "document_number" - t.string "status" + t.boolean "verified", default: false t.datetime "created_at" t.datetime "updated_at" end