Fix active upload count

This commit is contained in:
Kira 2020-01-18 14:51:09 -08:00
parent f47cb7b7e8
commit 263cf9b777
2 changed files with 5 additions and 1 deletions

View File

@ -70,6 +70,10 @@ class UserPresenter
template.link_to(user.post_upload_count, template.posts_path(:tags => "user:#{user.name}"))
end
def active_upload_count(template)
template.link_to(user.post_upload_count - user.post_deleted_count, template.posts_path(:tags => "user:#{user.name}"))
end
def deleted_upload_count(template)
template.link_to(user.post_deleted_count, template.posts_path(:tags => "status:deleted user:#{user.name}"))
end

View File

@ -30,7 +30,7 @@
<tr>
<th>Posts</th>
<td>
<%= presenter.upload_count(self) %>
<%= presenter.active_upload_count(self) %>
<% if CurrentUser.is_moderator? %>
[<%= link_to "sample", posts_path(:tags => "user:#{user.name} order:random limit:300") %>]
<% end %>