Complete booth assignment view list without actions yet

This commit is contained in:
Bertocq
2017-10-19 20:10:51 +02:00
parent c52c0a5452
commit f8839434f7
5 changed files with 44 additions and 8 deletions

View File

@@ -0,0 +1,17 @@
<tr id="booth_<%= booth.id %>" class="booth">
<td>
<%= link_to booth.name, admin_booth_path(booth) %>
</td>
<td>
<%= t("admin.booth_assignments.status.assigned") %>
<%= t("admin.booth_assignments.status.unassigned") %>
</td>
<td class="text-right">
<%= link_to t("admin.booth_assignments.manage.assign"),
new_admin_booth_shift_path(booth),
class: "button" %>
<%= link_to t("admin.booth_assignments.manage.unassign"),
new_admin_booth_shift_path(booth),
class: "button hollow" %>
</td>
</tr>

View File

@@ -1,25 +1,25 @@
<h2 class="inline-block"><%= t("admin.booths.index.title") %></h2>
<% if controller_name == "booths" && action_name != "available" %>
<%= link_to t("admin.booths.index.add_booth"), new_admin_booth_path, class: "button success float-right" %>
<%= link_to booth_assignments_admin_polls_path do %>
<span class="icon-angle-left"></span> <%= t("shared.back") %>
<% end %>
<hr>
<h2 class="inline-block"><%= t("admin.booth_assignments.manage.assignments_list", poll: @poll.name) %></h2>
<% if @booths.empty? %>
<div class="callout primary">
<%= t("admin.booths.index.no_booths") %>
</div>
<% end %>
<% if @booths.any? %>
<% else %>
<table>
<thead>
<th><%= t("admin.booths.index.name") %></th>
<th><%= t("admin.booth_assignments.status.assign_status") %></th>
<th class="text-right"><%= t("admin.actions.actions") %></th>
</thead>
<tbody>
<% @booths.each do |booth| %>
<%= render partial: "booth_assignment", locals: { booth: booth } %>
<% end %>
</tbody>
</table>
<% end %>