This commit is contained in:
Toks
2013-08-13 13:33:25 -04:00
parent d83aa5de0e
commit 249ab23da5
5 changed files with 40 additions and 2 deletions

View File

@@ -137,6 +137,14 @@ class UserPresenter
end
end
def appeal_count(template)
template.link_to(user.appeal_count, template.post_appeals_path(:search => {:creator_id => user.id}))
end
def flag_count(template)
template.link_to(user.flag_count, template.post_flags_path(:search => {:creator_id => user.id}))
end
def approval_count(template)
template.link_to(Post.where("approver_id = ?", user.id).count, template.posts_path(:tags => "approver:#{user.name}"))
end