mod actions: reorganize index page.
* Add category column. Allow filtering by category. * Merge user + timestamp into one column.
This commit is contained in:
@@ -4,24 +4,30 @@
|
|||||||
|
|
||||||
<%= render "search" %>
|
<%= render "search" %>
|
||||||
|
|
||||||
<table class="striped" width="100%">
|
<table class="striped autofit">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Date</th>
|
<th>Category</th>
|
||||||
<th>User</th>
|
|
||||||
<th>Message</th>
|
<th>Message</th>
|
||||||
|
<th>Created</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @mod_actions.each do |mod_action| %>
|
<% @mod_actions.each do |mod_action| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= compact_time mod_action.created_at %></td>
|
|
||||||
<td><%= link_to_user mod_action.creator %></td>
|
|
||||||
<td>
|
<td>
|
||||||
|
<%= link_to mod_action.category.humanize, mod_actions_path(search: { category: mod_action.category_id }) %>
|
||||||
|
</td>
|
||||||
|
<td class="col-expand">
|
||||||
<div class="prose">
|
<div class="prose">
|
||||||
<%= format_text(mod_action.filtered_description) %>
|
<%= format_text(mod_action.filtered_description) %>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= link_to_user mod_action.creator %>
|
||||||
|
<%= link_to "»", mod_actions_path(search: { creator_name: mod_action.creator.name }) %>
|
||||||
|
<div><%= time_ago_in_words_tagged(mod_action.created_at) %></div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user