adds poll CRU actions

This commit is contained in:
rgarcia
2016-09-25 10:20:38 +02:00
committed by kikito
parent 304743f64e
commit c1a9caeab0
13 changed files with 158 additions and 60 deletions

View File

@@ -1,21 +1,22 @@
<h2 class="inline-block"><%= t("admin.polls.index.title") %></h2>
<%= link_to t("admin.polls.index.create"), new_admin_poll_path, class: "button success float-right" %>
<%= link_to t("admin.polls.index.create"),
new_admin_poll_path,
class: "button success float-right" %>
<!-- If polls == 0 -->
<div class="callout primary">
<%= t("admin.polls.index.no_polls") %>
</div>
<!-- else -->
<table>
<thead>
<th><%= t("admin.polls.index.name") %></th>
<th><%= t("admin.polls.index.status") %></th>
<th>&nbsp;</th>
</thead>
<tbody>
<%= render @polls %>
</tbody>
</table>
<% if Poll.any? %>
<table>
<thead>
<th><%= t("admin.polls.index.name") %></th>
<th><%= t("admin.polls.index.status") %></th>
<th>&nbsp;</th>
</thead>
<tbody>
<%= render @polls %>
</tbody>
</table>
<% else %>
<div class="callout primary">
<%= t("admin.polls.index.no_polls") %>
</div>
<% end %>