Make TOS URL configurable

This commit is contained in:
Rohan Mitchell
2015-07-31 14:51:17 +10:00
parent 8d041f5e7a
commit ec908fce92
4 changed files with 5 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ module Admin
{name: 'Group signup page', preferences: [:group_signup_pricing_table_html, :group_signup_case_studies_html, :group_signup_detail_html]},
{name: 'Footer', preferences: [:footer_logo,
:footer_facebook_url, :footer_twitter_url, :footer_instagram_url, :footer_linkedin_url, :footer_googleplus_url, :footer_pinterest_url,
:footer_email, :footer_links_md, :footer_about_url]}]
:footer_email, :footer_links_md, :footer_about_url, :footer_tos_url]}]
end
def update

View File

@@ -50,4 +50,5 @@ class ContentConfiguration < Spree::Preferences::FileConfiguration
EOS
preference :footer_about_url, :string, default: "http://www.openfoodnetwork.org/ofn-local/open-food-network-australia/"
preference :footer_tos_url, :string, default: "/Terms-of-service.pdf"
end

View File

@@ -120,7 +120,7 @@
.small-12.medium-5.columns.text-left
%p.text-small
Read our
%a{href: "/Terms-of-service.pdf"} Terms &amp; conditions
%a{href: ContentConfig.footer_tos_url} Terms &amp; conditions
&#124;
Find us on
%a{href:"https://github.com/openfoodfoundation/openfoodnetwork", target: "_blank"} Github

View File

@@ -34,4 +34,5 @@ en:
footer_pinterest_url: "Pinterest URL"
footer_email: "Email"
footer_links_md: "Links"
footer_about_url: "About URL"
footer_about_url: "About URL"
footer_tos_url: "Terms of Service URL"