Add TOS and Privacy Policy site settings that can link to external sites.

This commit is contained in:
Neil Lalonde 2013-04-26 18:30:21 -04:00
parent 514df5441a
commit bbf982984d
3 changed files with 7 additions and 2 deletions

View file

@ -63,11 +63,11 @@ module ApplicationHelper
end
def tos_path
return "#{Discourse::base_uri}/tos"
SiteSetting.tos_url.blank? ? "#{Discourse::base_uri}/tos" : SiteSetting.tos_url
end
def privacy_path
return "#{Discourse::base_uri}/privacy"
SiteSetting.privacy_policy_url.blank? ? "#{Discourse::base_uri}/privacy" : SiteSetting.privacy_policy_url
end
def login_path

View file

@ -16,6 +16,8 @@ class SiteSetting < ActiveRecord::Base
setting(:company_full_name, 'My Unconfigured Forum Ltd.')
setting(:company_short_name, 'Unconfigured Forum')
setting(:company_domain, 'www.example.com')
setting(:tos_url, '')
setting(:privacy_policy_url, '')
setting(:api_key, '')
client_setting(:traditional_markdown_linebreaks, false)
client_setting(:top_menu, 'latest|new|unread|favorited|categories')

View file

@ -541,6 +541,9 @@ en:
topic_views_heat_medium: "The number of views after which a topic's heat level is medium."
topic_views_heat_high: "The number of views after which a topic's heat level is high."
tos_url: "If you have a Terms of Service document hosted elsewhere that you want to use, provide the full URL here."
privacy_policy_url: "If you have a Privacy Policy document hosted elsewhere that you want to use, provide the full URL here."
notification_types:
mentioned: "%{display_username} mentioned you in %{link}"
liked: "%{display_username} liked your post in %{link}"