Use foodsoft expansion variables in footer

This commit is contained in:
wvengen 2015-01-19 01:54:08 +01:00
parent 9df483cf4e
commit 1447b38bb3
2 changed files with 7 additions and 1 deletions

View file

@ -226,6 +226,12 @@ module ApplicationHelper
end end
end end
# Expand variables in text
# @see Foodsoft::ExpansionVariables#expand
def expand(text, options={})
Foodsoft::ExpansionVariables.expand(text, options)
end
# @return [String] path to foodcoop CSS style (with MD5 parameter for caching) # @return [String] path to foodcoop CSS style (with MD5 parameter for caching)
def foodcoop_css_path(options={}) def foodcoop_css_path(options={})
super(options.merge({md5: Digest::MD5.hexdigest(FoodsoftConfig[:custom_css].to_s)})) super(options.merge({md5: Digest::MD5.hexdigest(FoodsoftConfig[:custom_css].to_s)}))

View file

@ -10,4 +10,4 @@
- if (s = FoodsoftConfig[:page_footer]).blank? - if (s = FoodsoftConfig[:page_footer]).blank?
= link_to FoodsoftConfig[:name], FoodsoftConfig[:homepage] = link_to FoodsoftConfig[:name], FoodsoftConfig[:homepage]
- else - else
= raw s = raw expand s