diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ad4801177a..4b8bfa1b1e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,14 +1 @@ - - - - Openfoodweb - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - +<%= render :file => 'spree/layouts/spree_application' %> diff --git a/config/initializers/comfortable_mexican_sofa.rb b/config/initializers/comfortable_mexican_sofa.rb index 436299a9e0..900178b0cb 100644 --- a/config/initializers/comfortable_mexican_sofa.rb +++ b/config/initializers/comfortable_mexican_sofa.rb @@ -118,3 +118,10 @@ ComfortableMexicanSofa::HttpAuth.password = 'password' # ComfortableMexicanSofa::ViewHooks.add(:html_head, '/layouts/admin/html_head') # ComfortableMexicanSofa::ViewHooks.add(:page_form, '/layouts/admin/page_form') ComfortableMexicanSofa::ViewHooks.add(:navigation, 'layouts/cms_nav_spree') + +# Provide some Spree helpers to the CMS controller so it can render Spree's layout +ComfortableMexicanSofa::CmsContentController.class_eval do + helper 'spree/base' + include Spree::Core::ControllerHelpers + include Spree::Core::Engine.routes.url_helpers +end