assigns officers to booths
This commit is contained in:
@@ -15,34 +15,32 @@
|
||||
|
||||
<h3><%= t("admin.booths.show.officers_list") %></h3>
|
||||
|
||||
<!-- If officers in this booth == 0 -->
|
||||
<div class="callout primary">
|
||||
<%= t("admin.booths.show.no_officers") %>
|
||||
</div>
|
||||
<!-- end -->
|
||||
|
||||
<%= link_to t("admin.booths.show.assign_officer"), "#", class: "button success" %>
|
||||
<% if @booth.officers.empty? %>
|
||||
<div class="callout primary">
|
||||
<%= t("admin.booths.show.no_officers") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 column">
|
||||
<!-- List of officers, something like:
|
||||
"/admin/spending_proposals/_assigned_valuators.html.erb" -->
|
||||
<%# f.label :valuator_ids, t("admin.spending_proposals.edit.assigned_valuators") %>
|
||||
<%= form_for @booth, url: admin_poll_booth_path(@poll, @booth) do |f| %>
|
||||
|
||||
<%# f.collection_check_boxes :valuator_ids, @valuators, :id, :email do |b| %>
|
||||
<%# b.label(title: valuator_label(b.object)) { b.check_box + truncate(b.object.description_or_email, length: 60) } %>
|
||||
<%# end %>
|
||||
<%= f.label :officer_ids, t("admin.spending_proposals.edit.assigned_valuators") %>
|
||||
<%= f.collection_check_boxes :officer_ids, @officers, :id, :email do |b| %>
|
||||
<% b.label { b.check_box + truncate(officer_label(b.object), length: 60) } %>
|
||||
<% end %>
|
||||
|
||||
<%= f.submit t("admin.booths.show.assign_officer"), class: "button success" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<%# @officers.each do |officer| %>
|
||||
<tr>
|
||||
<table id="assigned_officers">
|
||||
<% @booth.officers.each do |officer| %>
|
||||
<tr id="officer_<%= officer.id %>" class="officer">
|
||||
<td>
|
||||
<%# officer.name %>
|
||||
Admin
|
||||
<%= officer.name %>
|
||||
</td>
|
||||
<td>
|
||||
admin@consul.dev
|
||||
<%# officer.email %>
|
||||
<%= officer.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t('admin.poll_officers.officer.delete'), "#", class: "button hollow alert" %>
|
||||
@@ -53,5 +51,5 @@
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
</table>
|
||||
Reference in New Issue
Block a user