diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b33c763d1..57f4819c0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -189,7 +189,7 @@ module ApplicationHelper to_sentence(links, **options) end - def link_to_user(user) + def link_to_user(user, text = nil) return "anonymous" if user.blank? user_class = "user user-#{user.level_string.downcase}" @@ -197,8 +197,9 @@ module ApplicationHelper user_class += " user-post-uploader" if user.can_upload_free? user_class += " user-banned" if user.is_banned? + text = user.pretty_name if text.blank? data = { "user-id": user.id, "user-name": user.name, "user-level": user.level } - link_to(user.pretty_name, user_path(user), class: user_class, data: data) + link_to(text, user, class: user_class, data: data) end def mod_link_to_user(user, positive_or_negative) diff --git a/app/views/static/contact.html.erb b/app/views/static/contact.html.erb index edefb96a5..95b3a17c6 100644 --- a/app/views/static/contact.html.erb +++ b/app/views/static/contact.html.erb @@ -4,8 +4,11 @@
You can reach the administrator of this site at <%= mail_to Danbooru.config.contact_email, nil, :encode => :hex %>.
++ You can contact the administrator of this site by + <%= link_to "sending a private message", new_dmail_path(dmail: { to_name: User.owner.name }) %> to <%= link_to_user User.owner, "@#{User.owner.name}" %>, + by messaging @<%= User.owner.name %> on the <%= link_to "#{Danbooru.config.canonical_app_name} Discord", Danbooru.config.discord_server_url %>, + or by sending an email to <%= mail_to Danbooru.config.contact_email, nil, encode: :hex %>. +