43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
<div id="user-record">
|
|
<h4>Record</h4>
|
|
|
|
<table width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th width="15%">User</th>
|
|
<th width="15%">Reporter</th>
|
|
<th width="15%">When</th>
|
|
<th width="50%">Body</th>
|
|
<th width="5%"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @user_records.each do |rec| %>
|
|
<tr class="<%= rec.is_positive? ? 'positive-record' : 'negative-record' %>" id="record-<%= rec.id %>">
|
|
<td>
|
|
<% if @user %>
|
|
<%= link_to h(rec.user.pretty_name), :controller => "user", :action => "show", :id => rec.user_id %>
|
|
<% else %>
|
|
<%= link_to h(rec.user.pretty_name), :action => "index", :user_id => rec.user_id %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= h(rec.reporter.pretty_name) %></td>
|
|
<td><%= time_ago_in_words(rec.created_at) %> ago</td>
|
|
<td><%= format_text(rec.body) %></td>
|
|
<td>
|
|
<% if @current_user.is_mod_or_higher? || @current_user.id == rec.reported_by %>
|
|
<%= link_to_function "Delete", "UserRecord.destroy(#{rec.id})" %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="paginator">
|
|
<%= will_paginate(@user_records) %>
|
|
</div>
|
|
|
|
<%= render :partial => "footer" %>
|
|
</div>
|