Adding Community forum to ContentConfig

This commit is contained in:
Lynne Davis
2016-06-20 15:13:49 +01:00
parent ed37604bc2
commit f37f89dd07
2 changed files with 5 additions and 2 deletions

View File

@@ -6,9 +6,9 @@ module Admin
{name: 'Producer signup page', preferences: [:producer_signup_pricing_table_html, :producer_signup_case_studies_html, :producer_signup_detail_html]},
{name: 'Hub signup page', preferences: [:hub_signup_pricing_table_html, :hub_signup_case_studies_html, :hub_signup_detail_html]},
{name: 'Group signup page', preferences: [:group_signup_pricing_table_html, :group_signup_case_studies_html, :group_signup_detail_html]},
{name: 'Footer', preferences: [:footer_logo,
{name: 'Footer and External Links', 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_tos_url]}]
:footer_email, :community_forum_url, :footer_links_md, :footer_about_url, :footer_tos_url]}]
end
def update

View File

@@ -34,6 +34,8 @@ class ContentConfiguration < Spree::Preferences::FileConfiguration
# Footer
preference :footer_logo, :file
has_attached_file :footer_logo, default_url: "/assets/ofn-logo-footer.png"
#Other
preference :footer_facebook_url, :string, default: "https://www.facebook.com/OpenFoodNet"
preference :footer_twitter_url, :string, default: "https://twitter.com/OpenFoodNet"
preference :footer_instagram_url, :string, default: ""
@@ -41,6 +43,7 @@ class ContentConfiguration < Spree::Preferences::FileConfiguration
preference :footer_googleplus_url, :string, default: ""
preference :footer_pinterest_url, :string, default: ""
preference :footer_email, :string, default: "hello@openfoodnetwork.org"
preference :community_forum_url, :string, default: "http://community.openfoodnetwork.org"
preference :footer_links_md, :text, default: <<-EOS
[Newsletter sign-up](/)