From 5e3fff6825e6b4e362fc24b4ef15776267cb635a Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 20 Sep 2016 12:32:23 +0200 Subject: [PATCH] Adds content to booths index and show views --- app/views/admin/poll/booths/index.html.erb | 9 ++++++--- app/views/admin/poll/booths/show.html.erb | 14 ++++++++++++-- config/locales/admin.en.yml | 4 ++-- config/locales/admin.es.yml | 11 +++++++++-- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/app/views/admin/poll/booths/index.html.erb b/app/views/admin/poll/booths/index.html.erb index 2e9a2f70b..918479f38 100644 --- a/app/views/admin/poll/booths/index.html.erb +++ b/app/views/admin/poll/booths/index.html.erb @@ -22,6 +22,7 @@ <%= t("admin.booths.index.name") %> <%= t("admin.booths.index.location") %> + <%= t("admin.booths.index.officers") %>   @@ -29,15 +30,17 @@ - <%= link_to "Urna Moncloa (REFNUM)", "#" %> + <%= link_to "Urna Moncloa (REFNUM)", "booths/1" %> C/ Isaac Peral, 25. 28003, Madrid + + N <%= t("admin.booths.index.officers") %> + - <%= link_to t("admin.actions.edit"), "#", class: "button hollow" %> - <%= link_to t("admin.booths.index.add_officer"), "#", class: "button success" %> + <%= link_to t("admin.actions.edit"), "booths/1/edit", class: "button hollow" %> diff --git a/app/views/admin/poll/booths/show.html.erb b/app/views/admin/poll/booths/show.html.erb index 8a5c2fd99..34e1a4465 100644 --- a/app/views/admin/poll/booths/show.html.erb +++ b/app/views/admin/poll/booths/show.html.erb @@ -2,7 +2,7 @@

Urna Moncloa (REFNUM)

-<%= link_to t("admin.actions.edit"), "#", class: "button hollow float-right" %> +<%= link_to t("admin.actions.edit"), "1/edit", class: "button hollow float-right" %>

<%= t("admin.booths.show.location") %>: C/ Isaac Peral, 25. 28003, Madrid

@@ -14,7 +14,17 @@ -<%= link_to t("admin.booths.show.add_officer"), "#", class: "button success" %> +<%= link_to t("admin.booths.show.assign_officer"), "#", class: "button success" %> + +
+ + <%# f.label :valuator_ids, t("admin.spending_proposals.edit.assigned_valuators") %> + + <%# f.collection_check_boxes :valuator_ids, @valuators, :id, :email do |b| %> + <%# b.label(title: valuator_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %> + <%# end %> +
<%# @officers.each do |officer| %> diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 40822778f..40f959a3a 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -188,7 +188,7 @@ en: add_booth: "Add booth" name: "Name" location: "Location" - add_officer: "Add officer" + officers: "Officers" new: title: "Poll %{poll}" subtitle: "New booth" @@ -205,7 +205,7 @@ en: submit_button: "Update booth" show: location: "Location" - add_officer: "Add officer" + assign_officer: "Assign officer" officers_list: "List of officers" no_officers: "There is no officers in this booth." officials: diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 4c807e454..6023da712 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -188,7 +188,7 @@ es: add_booth: "Añadir urna" name: "Nombre" location: "Ubicación" - add_officer: "Añadir presidente" + officers: "Presidentes de mesa" new: title: "Votación %{poll}" subtitle: "Nueva urna" @@ -196,9 +196,16 @@ es: reference: "Número de referencia" location: "Ubicación" submit_button: "Crear urna" + edit: + title: "Votación %{poll}" + subtitle: "Editar urna" + name: "Nombre" + reference: "Número de referencia" + location: "Ubicación" + submit_button: "Actualizar urna" show: location: "Ubicación" - add_officer: "Añadir presidente de mesa" + assign_officer: "Asignar presidente de mesa" officers_list: "Lista de presidentes de mesa" no_officers: "No hay presidentes de mesa en esta urna." officials: