diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss
index adc166d96..89bed6d21 100644
--- a/app/assets/stylesheets/admin.scss
+++ b/app/assets/stylesheets/admin.scss
@@ -5,6 +5,7 @@
// 03. List elements
// 04. Stats
// 05. Management
+// 06. Polls
//
// 01. Global styles
@@ -474,3 +475,12 @@ table.investment-projects-summary {
background: #e0e0e0;
}
}
+
+// 06. Polls
+// -----------------
+
+.count-error {
+ background: $alert-bg !important;
+ color: $color-alert;
+ font-weight: bold;
+}
diff --git a/app/views/admin/poll/booths/_booth.html.erb b/app/views/admin/poll/booths/_booth.html.erb
index 5bccfa9c6..5732400a8 100644
--- a/app/views/admin/poll/booths/_booth.html.erb
+++ b/app/views/admin/poll/booths/_booth.html.erb
@@ -1,8 +1,6 @@
|
-
- <%= link_to booth.name, admin_booth_path(booth) %>
-
+ <%= booth.name %>
|
<%= booth.location %>
diff --git a/app/views/admin/poll/booths/show.html.erb b/app/views/admin/poll/booths/show.html.erb
index 4d21f32e3..c72fd525d 100644
--- a/app/views/admin/poll/booths/show.html.erb
+++ b/app/views/admin/poll/booths/show.html.erb
@@ -3,13 +3,92 @@
- <%= @booth.name %>
+ Poll 3: <%= @booth.name %>
-<%= link_to t("admin.actions.edit"),
- edit_admin_booth_path(@booth),
- class: "button hollow float-right" %>
<%= t("admin.booths.show.location") %>:
<%= @booth.location %>
+
+
+
+ -
+ <%= link_to "#tab-officers" do %>
+ Presidentes de mesa
+ <% end %>
+
+ -
+ <%= link_to "#tab-count" do %>
+ Recuentos
+ <% end %>
+
+
+
+
+ Lista de presidentes de mesa
+
+
+
+
+
+
+
+
+ | Fecha |
+ Presidente de mesa |
+ Email |
+
+
+
+
+ | 13/02/2016 |
+ Clemente Padilla Otero |
+ user5@consul.dev |
+
+
+ | 13/02/2016 |
+ Ana Luisa Ceja Benítez |
+ user7@consul.dev |
+
+
+ | 14/02/2016 |
+ Clemente Padilla Otero |
+ user5@consul.dev |
+
+
+
+
+
+
+ Lista de recuentos
+
+
+
+ | Fecha |
+ Votos (Presidente de mesa) |
+ Votos (Admin) |
+
+
+
+
+ | 13/02/2016 |
+ 320 |
+ 320 |
+
+
+ | 14/02/2016 |
+ 160 |
+ 140 |
+
+
+ | 15/02/2016 |
+ 226 |
+ 226 |
+
+
+
+
+
diff --git a/app/views/admin/poll/polls/_officers.html.erb b/app/views/admin/poll/polls/_officers.html.erb
index 11b4cce50..106bff526 100644
--- a/app/views/admin/poll/polls/_officers.html.erb
+++ b/app/views/admin/poll/polls/_officers.html.erb
@@ -26,3 +26,65 @@
<% end %>
+
+
+Clemente padilla Otero
+user2@consul.dev
+
+
+
+
+Añadir nuevo turno
+
+Turnos asignados
+
+
+
+ | Fecha |
+ Urna |
+
+
+
+
+ | 13/02/2016 |
+ Urna Moncloa |
+
+ <%= link_to "Eliminar turno", "#", class: "button hollow alert" %>
+ |
+
+
+ | 14/02/2016 |
+ Urna Moncloa |
+
+ <%= link_to "Eliminar turno", "#", class: "button hollow alert" %>
+ |
+
+
+ | 15/02/2016 |
+ Urna Chamartín |
+
+ <%= link_to "Eliminar turno", "#", class: "button hollow alert" %>
+ |
+
+
+
+
diff --git a/app/views/admin/poll/polls/_poll.html.erb b/app/views/admin/poll/polls/_poll.html.erb
index 4128ad222..e02a80a7a 100644
--- a/app/views/admin/poll/polls/_poll.html.erb
+++ b/app/views/admin/poll/polls/_poll.html.erb
@@ -5,8 +5,7 @@
|
- Próximamente
- (15/12/2016 - 15/02/2017)
+ <%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %>
|
<%= link_to t("admin.actions.edit"),
diff --git a/app/views/admin/poll/polls/_questions.html.erb b/app/views/admin/poll/polls/_questions.html.erb
index 08b094ddf..1cd8597bb 100644
--- a/app/views/admin/poll/polls/_questions.html.erb
+++ b/app/views/admin/poll/polls/_questions.html.erb
@@ -10,10 +10,7 @@
|
| <%= link_to question.title, admin_question_path(question) %> |
- <%= link_to t('shared.edit'),
- edit_admin_question_path(question),
- class: "button hollow" %>
- <%= link_to t('shared.delete'),
+ <%= link_to t('admin.polls.show.remove_question'),
admin_question_path(question),
class: "button hollow alert",
method: :delete %>
diff --git a/app/views/admin/poll/polls/index.html.erb b/app/views/admin/poll/polls/index.html.erb
index b4c18d21b..75b52affa 100644
--- a/app/views/admin/poll/polls/index.html.erb
+++ b/app/views/admin/poll/polls/index.html.erb
@@ -8,7 +8,7 @@
| <%= t("admin.polls.index.name") %> |
- <%= t("admin.polls.index.status") %> |
+ <%= t("admin.polls.index.dates") %> |
|
diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb
index ba5b6497b..1bf130359 100644
--- a/app/views/admin/poll/questions/show.html.erb
+++ b/app/views/admin/poll/questions/show.html.erb
@@ -1,8 +1,11 @@
<%= render "shared/back_link" %>
+<%= link_to t('shared.edit'), edit_admin_question_path(@question),
+ class: "button hollow float-right" %>
+
-
+
<% if @question.proposal.present? %>
<%= t("admin.questions.show.proposal") %>
diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml
index fa5fb528f..87a8cc75f 100755
--- a/config/locales/admin.en.yml
+++ b/config/locales/admin.en.yml
@@ -153,7 +153,7 @@ en:
title: Poll officers
officer:
add: Add
- delete: Delete
+ delete: Delete position
name: Name
email: Email
entry_name: officer
@@ -167,7 +167,7 @@ en:
no_polls: "There are no polls."
create: "Create poll"
name: "Name"
- status: "Status"
+ dates: "Dates"
new:
title: "New poll"
submit_button: "Create poll"
@@ -189,6 +189,7 @@ en:
booths_title: "List of booths"
officers_title: "List of officers"
questions_title: "List of questions"
+ remove_question: "Remove question from poll"
name: "Name"
location: "Location"
email: "Email"
diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml
index 11cfe8d2a..183597625 100644
--- a/config/locales/admin.es.yml
+++ b/config/locales/admin.es.yml
@@ -153,7 +153,7 @@ es:
title: Presidentes de mesa
officer:
add: Añadir como Presidente de mesa
- delete: Borrar
+ delete: Eliminar cargo
name: Nombre
email: Email
entry_name: presidente de mesa
@@ -167,7 +167,7 @@ es:
no_polls: "No hay ninguna votación."
create: "Crear votación"
name: "Nombre"
- status: "Estado"
+ dates: "Fechas"
new:
title: "Nueva votación"
submit_button: "Crear votación"
@@ -185,10 +185,11 @@ es:
no_booths: "No hay urnas en esta votación."
no_questions: "No hay preguntas asignadas a esta votación todavía."
no_officers: "No hay presidentes de mesa asignados."
- remove_booth: "Deasignar urna"
+ remove_booth: "Desasignar urna"
booths_title: "Listado de urnas"
officers_title: "Listado de presidentes de mesa"
questions_title: "Listado de preguntas"
+ remove_question: "Desasignar pregunta"
name: "Nombre"
location: "Ubicación"
email: "Email"
diff --git a/spec/features/admin/poll/booths_spec.rb b/spec/features/admin/poll/booths_spec.rb
index a5fc9e6c0..b84e32b74 100644
--- a/spec/features/admin/poll/booths_spec.rb
+++ b/spec/features/admin/poll/booths_spec.rb
@@ -40,7 +40,6 @@ feature 'Admin booths' do
booth = create(:poll_booth)
visit admin_booths_path
- click_link booth.name
expect(page).to have_content booth.name
expect(page).to have_content booth.location
diff --git a/spec/features/admin/poll/officers_spec.rb b/spec/features/admin/poll/officers_spec.rb
index 932bec212..5eac71744 100644
--- a/spec/features/admin/poll/officers_spec.rb
+++ b/spec/features/admin/poll/officers_spec.rb
@@ -28,7 +28,7 @@ feature 'Admin poll officers' do
end
scenario 'Delete' do
- click_link 'Delete'
+ click_link 'Delete position'
within("#officers") do
expect(page).to_not have_content @officer.name
|