The new CSV report was more configurable and could work on proposals,
processes and comments. However, it had several issues.
In the public area, by default it generated a blank file.
In the admin section, the report was hard to configure and it generated
a file with less quality than the old system.
So until we improve this system, we're bringing back the old investment
CSV exporter.
This commit reverts most of commit 9d1ca3bf.
46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
<% provide(:title) do %>
|
|
<%= t("admin.header.title") %> - <%= t("admin.comments.index.title") %>
|
|
<% end %>
|
|
|
|
<h2><%= t("admin.comments.index.title") %></h2>
|
|
|
|
<% if @comments.any? %>
|
|
|
|
<h3 class="inline-block"><%= page_entries_info @comments %></h3>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center"><%= t("admin.comments.index.id") %></th>
|
|
<th><%= t("admin.comments.index.content") %></th>
|
|
<th><%= t("admin.comments.index.author") %></th>
|
|
<th><%= t("admin.comments.index.commentable_type") %></th>
|
|
<th><%= t("admin.comments.index.table_link") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @comments.each do |comment| %>
|
|
<tr id="<%= dom_id(comment) %>" class="debates">
|
|
<td class="text-center"><%= comment.id %></td>
|
|
<td><%= comment.body %></td>
|
|
<td><%= comment.author.username %></td>
|
|
<td><%= comment.commentable_type.constantize.model_name.human %></td>
|
|
<td>
|
|
<% if comment.commentable.hidden? %>
|
|
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
|
<% else %>
|
|
<%= link_to comment.commentable.title, commentable_path(comment) %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= paginate @comments %>
|
|
<% else %>
|
|
<div class="callout primary margin">
|
|
<%= t("admin.comments.index.no_comments") %>
|
|
</div>
|
|
<% end %>
|