Files
danbooru/app/views/users/_statistics.html.erb
2016-01-07 17:28:14 -08:00

155 lines
3.8 KiB
Plaintext

<div>
<h2>Statistics</h2>
<table width="100%" class="user-statistics">
<tbody>
<tr>
<th>Join Date</th>
<td><%= presenter.join_date %></td>
</tr>
<tr>
<th>Inviter</th>
<td><%= presenter.inviter(self) %></td>
</tr>
<tr>
<th>Level</th>
<td><%= presenter.level %></td>
</tr>
<tr>
<th>Permissions</th>
<td><%= presenter.permissions %></td>
</tr>
<% if user.is_banned? && user.recent_ban %>
<tr>
<th>Ban reason</th>
<td><%= format_text presenter.ban_reason %></td>
</tr>
<% end %>
<tr>
<th>Upload Limit</th>
<td><%= presenter.upload_limit %></td>
</tr>
<tr>
<th>Uploads</th>
<td><%= presenter.upload_count(self) %></td>
</tr>
<tr>
<th>Deleted Uploads</th>
<td><%= presenter.deleted_upload_count(self) %></td>
</tr>
<tr>
<th>Favorites</th>
<td><%= presenter.favorite_count(self) %></td>
</tr>
<tr>
<th>Favorite Groups</th>
<td><%= presenter.favorite_group_count(self) %></td>
</tr>
<tr>
<th>Post Changes</th>
<td><%= presenter.post_version_count(self) %></td>
</tr>
<tr>
<th>Note Changes</th>
<td><%= presenter.note_version_count(self) %> in <%= presenter.noted_posts_count(self) %> posts</td>
</tr>
<tr>
<th>Wiki Page Changes</th>
<td><%= presenter.wiki_page_version_count(self) %></td>
</tr>
<tr>
<th>Artist Changes</th>
<td><%= presenter.artist_version_count(self) %></td>
</tr>
<tr>
<th>Commentary Changes</th>
<td><%= presenter.artist_commentary_version_count(self) %></td>
</tr>
<tr>
<th>Pool Changes</th>
<td><%= presenter.pool_version_count(self) %></td>
</tr>
<tr>
<th>Forum Posts</th>
<td><%= presenter.forum_post_count(self) %></td>
</tr>
<tr>
<th>Approvals</th>
<td><%= presenter.approval_count(self) %></td>
</tr>
<tr>
<th>Comments</th>
<td><%= presenter.comment_count(self) %> in <%= presenter.commented_posts_count(self) %> posts</td>
</tr>
<% if CurrentUser.user.id == user.id || CurrentUser.is_moderator? %>
<tr>
<th>Appeals</th>
<td><%= presenter.appeal_count(self) %></td>
</tr>
<% end %>
<% if CurrentUser.user.id == user.id || CurrentUser.is_moderator? %>
<tr>
<th>Flags</th>
<td><%= presenter.flag_count(self) %></td>
</tr>
<% end %>
<tr>
<th>Feedback</th>
<td><%= presenter.feedbacks(self) %></td> </tbody>
</tr>
<tr>
<th>Subscriptions</th>
<td>
<% presenter.subscriptions.each do |subscription| %>
<p>
<strong><%= link_to subscription.pretty_name, posts_path(:tags => "sub:#{user.name}:#{subscription.name}") %></strong>
&ndash;
<%= presenter.tag_links_for_subscription(self, subscription) %>
</p>
<% end %>
</td>
</tr>
<% if CurrentUser.is_moderator? && presenter.previous_names.present? %>
<tr>
<th>Previous Names</th>
<td><%= presenter.previous_names %></td>
</tr>
<% end %>
<% if CurrentUser.user.id == user.id %>
<tr>
<th>API Key</th>
<td>
<% if CurrentUser.user.api_key %>
<%= CurrentUser.user.api_key.key %>
<% else %>
<%= link_to "Generate key", new_api_key_path %>
<% end %>
</td>
</tr>
<% end %>
</table>
</div>