fixes #2418 (includes hiding deleted dmails and allowing filtering on user name)

This commit is contained in:
r888888888
2015-07-07 16:47:23 -07:00
parent 4a24fe5074
commit 67e46f6e5c
9 changed files with 121 additions and 8 deletions

View File

@@ -76,11 +76,16 @@ module ApplicationHelper
time_tag(time.strftime("%Y-%m-%d %H:%M"), time)
end
def link_to_user(user)
def link_to_user(user, options = {})
user_class = user.level_class
user_class = user_class + " user-post-approver" if user.can_approve_posts?
user_class = user_class + " with-style" if CurrentUser.user.style_usernames?
link_to(user.pretty_name, user_path(user), :class => user_class)
if options[:raw_name]
name = user.name
else
name = user.pretty_name
end
link_to(name, user_path(user), :class => user_class)
end
def mod_link_to_user(user, positive_or_negative)