Files
grecia/app/views/admin/debates/index.html.erb
2019-06-12 10:17:31 +02:00

39 lines
1.2 KiB
Plaintext

<% provide(:title) do %>
<%= t("admin.header.title") %> - <%= t("admin.debates.index.title") %>
<% end %>
<h2><%= t("admin.debates.index.title") %></h2>
<% if @debates.any? %>
<%= render "/admin/shared/debate_search", url: admin_debates_path %>
<h3 class="inline-block"><%= page_entries_info @debates %></h3>
<a class="small float-right clear" data-open="download-modal"><%= t("admin.debates.index.link") %></a>
<table>
<thead>
<th class="text-center"><%= t("admin.debates.index.id") %></th>
<th><%= t("admin.debates.index.title") %></th>
<th><%= t("admin.debates.index.author") %></th>
</thead>
<tbody>
<% @debates.each do |debate| %>
<tr id="<%= dom_id(debate) %>" class="debates">
<td class="text-center"><%= debate.id %></td>
<td><%= link_to debate.title, admin_debate_path(debate) %></td>
<td><%= debate.author.username %></td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @debates %>
<% else %>
<div class="callout primary margin">
<%= t("admin.debates.index.no_debates") %>
</div>
<% end %>
<%= render "admin/download_settings/modal", resource: { name: "debates" } %>