From ec908fce928cd7c112603827daea5cc98422d676 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 31 Jul 2015 14:51:17 +1000 Subject: [PATCH] Make TOS URL configurable --- app/controllers/admin/contents_controller.rb | 2 +- app/models/content_configuration.rb | 1 + app/views/shared/_footer.html.haml | 2 +- config/locales/en.yml | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/contents_controller.rb b/app/controllers/admin/contents_controller.rb index 0b5012244d..87c86997d9 100644 --- a/app/controllers/admin/contents_controller.rb +++ b/app/controllers/admin/contents_controller.rb @@ -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 diff --git a/app/models/content_configuration.rb b/app/models/content_configuration.rb index 32bb66b3ac..2357f8dfa3 100644 --- a/app/models/content_configuration.rb +++ b/app/models/content_configuration.rb @@ -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 diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index db6c797570..7450966e5f 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -120,7 +120,7 @@ .small-12.medium-5.columns.text-left %p.text-small Read our - %a{href: "/Terms-of-service.pdf"} Terms & conditions + %a{href: ContentConfig.footer_tos_url} Terms & conditions | Find us on %a{href:"https://github.com/openfoodfoundation/openfoodnetwork", target: "_blank"} Github diff --git a/config/locales/en.yml b/config/locales/en.yml index f7c23bee4d..3149620eab 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -34,4 +34,5 @@ en: footer_pinterest_url: "Pinterest URL" footer_email: "Email" footer_links_md: "Links" - footer_about_url: "About URL" \ No newline at end of file + footer_about_url: "About URL" + footer_tos_url: "Terms of Service URL" \ No newline at end of file