Report generation. Download csv
This commit is contained in:
38
app/views/admin/debates/index.html.erb
Normal file
38
app/views/admin/debates/index.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<% 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" } %>
|
||||
Reference in New Issue
Block a user