@@ -32,6 +32,13 @@ body.admin {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.top-bar-title {
|
||||
|
||||
h1 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
form {
|
||||
|
||||
.button {
|
||||
@@ -77,6 +84,11 @@ body.admin {
|
||||
color: $admin-color;
|
||||
}
|
||||
|
||||
.tabs-panel {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#proposals {
|
||||
width: 100% !important;
|
||||
}
|
||||
@@ -148,6 +160,13 @@ body.admin {
|
||||
}
|
||||
}
|
||||
|
||||
.input-group {
|
||||
|
||||
.input-group-button {
|
||||
padding-bottom: rem-calc(16);
|
||||
}
|
||||
}
|
||||
|
||||
// 02. Sidebar
|
||||
// -----------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav class="admin-sidebar" data-equalizer-watch>
|
||||
<div class="admin-sidebar" data-equalizer-watch>
|
||||
<ul id="admin_menu" data-accordion-menu>
|
||||
|
||||
<li class="section-title">
|
||||
@@ -119,4 +119,4 @@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<h2><%= t("admin.booths.index.title") %></h2>
|
||||
<h2 class="inline-block"><%= t("admin.booths.index.title") %></h2>
|
||||
|
||||
<%= link_to t("admin.booths.index.add_booth"), new_admin_booth_path,
|
||||
class: "button success float-right" %>
|
||||
|
||||
<% if @booths.empty? %>
|
||||
<div class="callout primary">
|
||||
@@ -6,10 +9,6 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= link_to t("admin.booths.index.add_booth"),
|
||||
new_admin_booth_path,
|
||||
class: "button success" %>
|
||||
|
||||
<% if @booths.any? %>
|
||||
<h3><%= page_entries_info @booths %></h3>
|
||||
<table>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<div class="small-12 column">
|
||||
<table>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t('admin.poll_officers.officer.name') %></th>
|
||||
<th colspan="2"><%= t('admin.poll_officers.officer.email') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -22,5 +27,4 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</table>
|
||||
|
||||
9
app/views/admin/poll/officers/_search.html.erb
Normal file
9
app/views/admin/poll/officers/_search.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<%= form_tag search_admin_officers_path, method: :get, remote: true do %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :email, '',
|
||||
placeholder: t("admin.poll_officers.search.email_placeholder") %>
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.poll_officers.search.search"), class: "button" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,21 +1,25 @@
|
||||
<h2><%= t("admin.poll_officers.index.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<%= form_tag search_admin_officers_path, method: :get, remote: true do %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, '', placeholder: t('admin.poll_officers.search.email_placeholder') %>
|
||||
<%= render 'search' %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= submit_tag t('admin.poll_officers.search.search'), class: 'button' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-result" class="row"></div>
|
||||
<div id="search-result"></div>
|
||||
|
||||
<h3><%= page_entries_info @officers %></h3>
|
||||
<h3>
|
||||
<%= page_entries_info @officers, entry_name: t('admin.poll_officers.officer.entry_name') %>
|
||||
</h3>
|
||||
|
||||
<table id="officers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t('admin.poll_officers.officer.name') %></th>
|
||||
<th colspan="2"><%= t('admin.poll_officers.officer.email') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @officers.each do |officer| %>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -41,6 +45,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @officers %>
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<% if @poll.booths.empty? %>
|
||||
<div class="callout primary text-center">
|
||||
<h3><%= t("admin.polls.show.booths_title") %></h3>
|
||||
|
||||
<% if @poll.booths.empty? %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t("admin.polls.show.no_booths") %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<h2><%= t("admin.polls.show.booths_title") %></h2>
|
||||
|
||||
<% else %>
|
||||
<table>
|
||||
<thead>
|
||||
<th><%= t("admin.polls.show.name") %></th>
|
||||
@@ -34,6 +31,4 @@
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,30 +1,20 @@
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<ul class="tabs" data-tabs id="example-tabs">
|
||||
<ul class="tabs" data-tabs id="example-tabs">
|
||||
<li class="tabs-title is-active">
|
||||
<%= link_to "#tab-questions" do %>
|
||||
<h2>
|
||||
<%= t("admin.polls.show.questions_tab") %>
|
||||
<span class="js-comments-count">(<%= @poll.questions.count %>)</span>
|
||||
</h2>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<%= link_to "#tab-booths" do %>
|
||||
<h2>
|
||||
<%= t("admin.polls.show.booths_tab") %>
|
||||
(<%= @poll.booths.count %>)
|
||||
</h2>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<%= link_to "#tab-officers" do %>
|
||||
<h2>
|
||||
<%= t("admin.polls.show.officers_tab") %>
|
||||
(<%= @poll.officers.count %>)
|
||||
</h2>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<% if @poll.officers.empty? %>
|
||||
<div class="callout primary text-center">
|
||||
<h3><%= t("admin.polls.show.officers_title") %></h3>
|
||||
|
||||
<% if @poll.officers.empty? %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t("admin.polls.show.no_officers") %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<h2><%= t("admin.polls.show.officers_title") %></h2>
|
||||
|
||||
<% else %>
|
||||
<table>
|
||||
<thead>
|
||||
<th><%= t("admin.polls.show.name") %></th>
|
||||
@@ -28,6 +25,4 @@
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<% if @poll.questions.empty? %>
|
||||
<div class="callout primary text-center">
|
||||
<h3><%= t("admin.polls.show.questions_title") %></h3>
|
||||
|
||||
<% if @poll.questions.empty? %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t('admin.polls.show.no_questions') %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<h2><%= t("admin.polls.show.questions_title") %></h2>
|
||||
|
||||
<table>
|
||||
<% else %>
|
||||
<table class="margin-top">
|
||||
<% @poll.questions.each do |question| %>
|
||||
<tr id="<%= dom_id(question) %>">
|
||||
<td><%= link_to question.title, admin_question_path(question) %></td>
|
||||
@@ -24,6 +21,4 @@
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<div class="small-12 medium-6">
|
||||
<%= form_tag '', method: :get do %>
|
||||
<%= form_tag '', method: :get do %>
|
||||
<%= label_tag :poll_id, t("admin.questions.index.filter_poll") %>
|
||||
<%= select_tag "poll_id",
|
||||
poll_select_options(true),
|
||||
prompt: t("admin.questions.index.select_poll"),
|
||||
class: "js-location-changer" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -7,15 +7,19 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="small-12 column">
|
||||
<div class="small-12 medium-6">
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.select :poll_id,
|
||||
options_for_select(Poll.pluck(:name, :id)),
|
||||
prompt: t("admin.questions.index.select_poll") %>
|
||||
prompt: t("admin.questions.index.select_poll"),
|
||||
label: t("admin.questions.new.poll_label") %>
|
||||
</div>
|
||||
|
||||
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>
|
||||
|
||||
<%= f.text_field :valid_answers %>
|
||||
<%= f.label :valid_answers %>
|
||||
<p class="note"><%= t("admin.questions.new.valid_answers_note") %></p>
|
||||
<%= f.text_field :valid_answers, label: false %>
|
||||
|
||||
|
||||
<%= f.text_area :summary, rows: 4, maxlength: 200 %>
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<%= form_tag(admin_questions_path, method: :get) do |f| %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.spending_proposal_search.placeholder") %>
|
||||
</div>
|
||||
<div class="form-inline small-12 medium-3 column end">
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.spending_proposal_search.button"), class: "button" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,11 +3,18 @@
|
||||
<%= link_to t('admin.questions.index.create'), new_admin_question_path,
|
||||
class: "button success float-right" %>
|
||||
|
||||
<%= render 'filter' %>
|
||||
<%= render 'search' %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= render 'search' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-4 large-3">
|
||||
<%= render 'filter' %>
|
||||
</div>
|
||||
|
||||
<% if @questions.count == 0 %>
|
||||
<div class="callout primary">
|
||||
<div class="callout primary margin-top">
|
||||
<%= t('admin.questions.index.no_questions') %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<header>
|
||||
<section class="top-links">
|
||||
<div class="top-links">
|
||||
<div class="expanded row">
|
||||
<%= render 'shared/locale_switcher' %>
|
||||
<%= link_to t("admin.dashboard.index.back") + " " + setting['org_name'],
|
||||
root_path, class: "float-right back-web" %>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="expanded row">
|
||||
<div class="top-bar">
|
||||
@@ -19,11 +19,13 @@
|
||||
|
||||
<div id="responsive-menu">
|
||||
<div class="top-bar-title">
|
||||
<h1>
|
||||
<%= link_to admin_root_path, class: "hide-for-small-only" do %>
|
||||
<%= image_tag('logo_header.png', class: 'hide-for-small-only float-left', size: '80x80', alt: t("layouts.header.logo")) %>
|
||||
<%= setting['org_name'] %>
|
||||
| <%= t("admin.dashboard.index.title") %>
|
||||
<% end %>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="top-bar-right">
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="off-canvas-content" data-off-canvas-content>
|
||||
<%= render 'layouts/admin_header' %>
|
||||
|
||||
<main class="no-margin-top row no-max-width collapse" data-equalizer>
|
||||
<div class="no-margin-top row no-max-width collapse" data-equalizer>
|
||||
<div class="small-12 medium-3 column">
|
||||
|
||||
<div class="show-for-small-only">
|
||||
@@ -46,7 +46,7 @@
|
||||
<%= render 'layouts/flash' %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -154,6 +154,9 @@ en:
|
||||
officer:
|
||||
add: Add
|
||||
delete: Delete
|
||||
name: Name
|
||||
email: Email
|
||||
entry_name: officer
|
||||
search:
|
||||
email_placeholder: Search user by email
|
||||
search: Search
|
||||
@@ -194,11 +197,14 @@ en:
|
||||
title: "Questions"
|
||||
create: "Create question"
|
||||
no_questions: "There are no questions."
|
||||
filter_poll: Filter by Poll
|
||||
select_poll: Select Poll
|
||||
edit:
|
||||
title: "Edit Question"
|
||||
new:
|
||||
title: "Create Question"
|
||||
poll_label: "Poll"
|
||||
valid_answers_note: "Enter the answers separated by commas (,)"
|
||||
show:
|
||||
proposal: Original proposal
|
||||
author: Author
|
||||
|
||||
@@ -154,6 +154,9 @@ es:
|
||||
officer:
|
||||
add: Añadir como Presidente de mesa
|
||||
delete: Borrar
|
||||
name: Nombre
|
||||
email: Email
|
||||
entry_name: presidente de mesa
|
||||
search:
|
||||
email_placeholder: Buscar usuario por email
|
||||
search: Buscar
|
||||
@@ -194,11 +197,14 @@ es:
|
||||
title: "Preguntas ciudadanas"
|
||||
create: "Crear pregunta ciudadana"
|
||||
no_questions: "No hay ninguna pregunta ciudadana."
|
||||
select_poll: Seleccionar votación
|
||||
filter_poll: "Filtrar por votación"
|
||||
select_poll: "Seleccionar votación"
|
||||
edit:
|
||||
title: "Editar pregunta ciudadana"
|
||||
new:
|
||||
title: "Crear pregunta ciudadana"
|
||||
poll_label: "Votación"
|
||||
valid_answers_note: "Escribe las respuestas separadas por comas (,)"
|
||||
show:
|
||||
proposal: Propuesta ciudadana original
|
||||
author: Autor
|
||||
|
||||
Reference in New Issue
Block a user