From f65021fa0172751ac34cf6f37f924ba49de119e2 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 9 May 2022 13:52:27 -0500 Subject: [PATCH] config: move contact page info to a config option. Make the info on the contact page configurable instead of hard coded. --- app/views/static/contact.html.erb | 7 +------ config/danbooru_default_config.rb | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/static/contact.html.erb b/app/views/static/contact.html.erb index 95b3a17c6..2a28b97f1 100644 --- a/app/views/static/contact.html.erb +++ b/app/views/static/contact.html.erb @@ -4,11 +4,6 @@

Contact

-

- 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 %>. -

+ <%= raw Danbooru.config.contact_page_html %>
diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index 23dcce551..9aebcd726 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -242,6 +242,10 @@ module Danbooru nil end + # The HTML that should go on the contact page. + def contact_page_html + end + # The number of posts displayed per page. def posts_per_page 20