improves layout and tables for polls shifts

This commit is contained in:
decabeza
2017-09-08 16:50:53 +02:00
parent b1abb9dbb3
commit 3b4e80a34d
8 changed files with 25 additions and 23 deletions

View File

@@ -15,8 +15,7 @@
<thead>
<th><%= t("admin.booths.index.name") %></th>
<th><%= t("admin.booths.index.location") %></th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th class="text-right"><%= t("admin.actions.actions") %></th>
</thead>
<tbody>
<% @booths.each do |booth| %>

View File

@@ -34,4 +34,4 @@
<%= paginate @officers %>
<% end %>
</div>
</div>

View File

@@ -5,12 +5,13 @@
<legend>
<%= t("admin.poll_shifts.new.new_shift") %>
</legend>
<div class="small-12 medium-4 column">
Officer: <%= @officer.name %>
<div class="small-12 medium-4 column highlight padding">
<strong><%= t("admin.poll_shifts.new.officer") %></strong>
<br><%= @officer.name %>
<%= f.hidden_field :officer_id, value: @officer.id %>
</div>
<div class="small-12 medium-4 column">
<label><%= t("admin.poll_shifts.new.date") %></label>
<%= f.select :date,
@@ -23,7 +24,7 @@
<div class="small-12 medium-4 column">
<%= f.submit t("admin.poll_shifts.new.add_shift"),
class: "button expanded hollow margin-top" %>
class: "button expanded margin-top" %>
</div>
</fieldset>
<% end %>
<% end %>

View File

@@ -1,14 +1,14 @@
<div class="row">
<div class="small-12 medium-6 column">
<%= form_tag search_officers_admin_booth_shifts_path,
<%= form_tag search_officers_admin_booth_shifts_path,
method: :get, remote: true do |f| %>
<div class="input-group">
<%= text_field_tag :search,
@search,
placeholder: t("admin.poll_shifts.new.search_officer_placeholder"),
placeholder: t("admin.poll_shifts.new.search_officer_placeholder"),
id: "search-officers" %>
<div class="input-group-button">
<%= submit_tag t("admin.poll_shifts.new.search_officer_button"),
<%= submit_tag t("admin.poll_shifts.new.search_officer_button"),
class: "button" %>
</div>
</div>

View File

@@ -10,7 +10,7 @@
<tr>
<th><%= t("admin.poll_shifts.new.table_name") %></th>
<th><%= t("admin.poll_shifts.new.table_email") %></th>
<th class="text-center">
<th class="text-right">
<%= t("admin.poll_shifts.new.table_shift") %>
</th>
</tr>
@@ -24,13 +24,13 @@
<td>
<%= user.email %>
</td>
<td class="text-center">
<td class="text-right">
<%= link_to t("admin.poll_shifts.new.edit_shifts"),
new_admin_booth_shift_path(officer_id: user.poll_officer.id),
class: "button hollow alert" %>
class: "button hollow" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
<% end %>

View File

@@ -3,18 +3,20 @@
<h2><%= @booth.name %></h2>
<% if @officer.blank? %>
<%= t("admin.poll_shifts.new.search_officer_text") %>
<p>
<%= t("admin.poll_shifts.new.search_officer_text") %>
</p>
<%= render "search_officers" %>
<% else %>
<%= render "form" %>
<% end %>
<% end %>
<div id="shifts">
<% if @shifts.empty? %>
<div class="callout primary margin-top">
<div class="callout primary">
<%= t("admin.poll_shifts.new.no_shifts") %>
</div>
<% else %>
<%= render "shifts" %>
<% end %>
</div>
</div>