Files
danbooru/app/views/mod_actions/index.html.erb
evazion 3d03de1c52 mod actions: hide ip bans from non-mods.
Hide IP ban creation and deletion actions from non-mods in the
/mod_actions listing.

The previous approach of just filtering out the IP from the description
was hacky and didn't work with the `only` param (/mod_actions.json?only=id
still included the description field).
2019-12-16 12:20:41 -06:00

39 lines
1.0 KiB
Plaintext

<div id="c-mod-actions">
<div id="a-index">
<h1>Mod Actions</h1>
<%= render "search" %>
<table class="striped autofit">
<thead>
<tr>
<th>Category</th>
<th>Message</th>
<th>Created</th>
</tr>
</thead>
<tbody>
<% @mod_actions.each do |mod_action| %>
<tr>
<td>
<%= link_to mod_action.category.humanize, mod_actions_path(search: { category: mod_action.category_id }) %>
</td>
<td class="col-expand">
<div class="prose">
<%= format_text(mod_action.description) %>
</div>
</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>
<% end %>
</tbody>
</table>
<%= numbered_paginator(@mod_actions) %>
</div>
</div>