shows add booth link only for not assigned booths

This commit is contained in:
Juanjo Bazán
2017-02-14 16:07:34 +01:00
parent 4beee7bacc
commit e04cc55eb7

View File

@@ -25,10 +25,12 @@
<%= booth.location %> <%= booth.location %>
</td> </td>
<td class="text-center"> <td class="text-center">
<% unless @poll.booth_ids.include?(booth.id) %>
<%= link_to t("admin.poll_booth_assignments.index.add_booth"), <%= link_to t("admin.poll_booth_assignments.index.add_booth"),
admin_poll_booth_assignments_path(@poll, booth_id: booth.id), admin_poll_booth_assignments_path(@poll, booth_id: booth.id),
method: :post, method: :post,
class: "button hollow" %> class: "button hollow" %>
<% end %>
</td> </td>
</tr> </tr>
<% end %> <% end %>