@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<tr id="booth_<%= booth.id %>" class="booth">
|
||||
<td>
|
||||
<strong>
|
||||
<%= link_to booth.name, admin_booth_path(booth) %>
|
||||
</strong>
|
||||
<%= booth.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= booth.location %>
|
||||
|
||||
@@ -3,13 +3,92 @@
|
||||
<div class="clear"></div>
|
||||
|
||||
<h2 class="inline-block">
|
||||
<%= @booth.name %>
|
||||
Poll 3: <%= @booth.name %>
|
||||
</h2>
|
||||
<%= link_to t("admin.actions.edit"),
|
||||
edit_admin_booth_path(@booth),
|
||||
class: "button hollow float-right" %>
|
||||
|
||||
<p>
|
||||
<strong><%= t("admin.booths.show.location") %></strong>:
|
||||
<%= @booth.location %>
|
||||
</p>
|
||||
|
||||
<div class="tabs-content" data-tabs-content="booths-tabs">
|
||||
<ul class="tabs" data-tabs id="booths-tabs">
|
||||
<li class="tabs-title is-active">
|
||||
<%= link_to "#tab-officers" do %>
|
||||
Presidentes de mesa
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<%= link_to "#tab-count" do %>
|
||||
Recuentos
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tabs-panel is-active" id="tab-officers">
|
||||
<h3>Lista de presidentes de mesa</h3>
|
||||
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<select>
|
||||
<option>Seleccionar fecha</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fecha</th>
|
||||
<th>Presidente de mesa</th>
|
||||
<th>Email</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>13/02/2016</td>
|
||||
<td>Clemente Padilla Otero</td>
|
||||
<td>user5@consul.dev</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>13/02/2016</td>
|
||||
<td>Ana Luisa Ceja Benítez</td>
|
||||
<td>user7@consul.dev</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>14/02/2016</td>
|
||||
<td>Clemente Padilla Otero</td>
|
||||
<td>user5@consul.dev</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="tab-count">
|
||||
<h3>Lista de recuentos</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fecha</th>
|
||||
<th class="text-center">Votos (Presidente de mesa)</th>
|
||||
<th class="text-center">Votos (Admin)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>13/02/2016</td>
|
||||
<td class="text-center">320</td>
|
||||
<td class="text-center">320</td>
|
||||
</tr>
|
||||
<tr class="count-error">
|
||||
<td>14/02/2016</td>
|
||||
<td class="text-center">160</td>
|
||||
<td class="text-center">140</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>15/02/2016</td>
|
||||
<td class="text-center">226</td>
|
||||
<td class="text-center">226</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,3 +26,65 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<!-- Assign booths to officer -->
|
||||
<h2>Clemente padilla Otero</h2>
|
||||
<p>user2@consul.dev</p>
|
||||
|
||||
|
||||
<fieldset class="fieldset">
|
||||
<legend>Nuevo turno</legend>
|
||||
<div class="small-12 medium-4 column">
|
||||
<label>Fecha</label>
|
||||
<select>
|
||||
<option>Seleccionar día</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 column">
|
||||
<label>Urna</label>
|
||||
<select>
|
||||
<option>Seleccionar urna</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 column">
|
||||
<input type="submit" value="Añadir turno" class="button expanded hollow margin-top">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<a class="float-right">Añadir nuevo turno</a>
|
||||
|
||||
<h3>Turnos asignados</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fecha</th>
|
||||
<th colspan="2">Urna</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>13/02/2016</td>
|
||||
<td>Urna Moncloa</td>
|
||||
<td class="text-right">
|
||||
<%= link_to "Eliminar turno", "#", class: "button hollow alert" %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>14/02/2016</td>
|
||||
<td>Urna Moncloa</td>
|
||||
<td class="text-right">
|
||||
<%= link_to "Eliminar turno", "#", class: "button hollow alert" %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>15/02/2016</td>
|
||||
<td>Urna Chamartín</td>
|
||||
<td class="text-right">
|
||||
<%= link_to "Eliminar turno", "#", class: "button hollow alert" %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /. Assign booths to officer -->
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
Próximamente <!-- Estado: Activa, Próximamente o Archivada -->
|
||||
<br>(<small>15/12/2016 - 15/02/2017</small>)
|
||||
<%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.edit"),
|
||||
|
||||
@@ -10,10 +10,7 @@
|
||||
<tr id="<%= dom_id(question) %>">
|
||||
<td><%= link_to question.title, admin_question_path(question) %></td>
|
||||
<td class="text-right">
|
||||
<%= 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 %>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<th><%= t("admin.polls.index.name") %></th>
|
||||
<th><%= t("admin.polls.index.status") %></th>
|
||||
<th><%= t("admin.polls.index.dates") %></th>
|
||||
<th> </th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<%= render "shared/back_link" %>
|
||||
|
||||
<%= link_to t('shared.edit'), edit_admin_question_path(@question),
|
||||
class: "button hollow float-right" %>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="row margin-top">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<% if @question.proposal.present? %>
|
||||
<%= t("admin.questions.show.proposal") %>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user