docbrown/app/views/admin/moderator_actions/index.html.erb
Ridhwana 7ffda62119
Override specified line break behaviour on the ID column (#12076)
* feat: add a utility class to override the specified line break behaviour on the ID column.

* chore: revert previous change

* Revert "chore: revert previous change"

This reverts commit 5be6f5ff8adb8476e5b90931a8dd6bcb9559fcc8.

* feat: add some more whitespace

* feat: add a max width
2021-01-04 16:17:38 -05:00

36 lines
1.2 KiB
Text

<div class="mb-6">
<%= search_form_for @q, url: admin_moderator_actions_path, class: "form-inline" do |f| %>
<%= f.label :user_username_cont, "User", class: "sr-only" %>
<%= f.search_field :user_username_cont, placeholder: "User", class: "form-control mr-2" %>
<%= f.submit "Search", class: "btn btn-secondary" %>
<% end %>
</div>
<%= paginate @moderator_actions %>
<table class="crayons-table" width="100%">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">User</th>
<th scope="col">Action</th>
<th scope="col">Data</th>
<th scope="col">
<%= tag.span(sort_link(@q, :created_at, "Date")) %>
</th>
</tr>
</thead>
<tbody class="crayons-card">
<% @moderator_actions.each do |action| %>
<tr>
<td class="whitespace-nowrap"><%= action.id %></td>
<td><%= link_to(action.user.username, admin_user_path(action.user_id)) if action.user %></td>
<td><%= "#{action.data['action'].humanize} #{action.data['controller'].humanize.singularize.titleize}" if action.data.present? %></td>
<td class="mod-actions__data"><%= action.data %></td>
<td><%= action.created_at %></td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @moderator_actions %>