Move small close button to helper.

Workaround for show order deface override nuking attributes of the close button.
This commit is contained in:
wvengen 2015-04-10 18:58:51 +02:00
parent cf0fcccfc3
commit 507651f5ba
10 changed files with 18 additions and 12 deletions

View file

@ -233,6 +233,14 @@ module ApplicationHelper
Foodsoft::ExpansionVariables.expand(text, options)
end
# @param dismiss [String, Symbol] Bootstrap dismiss value (modal, alert)
# @return [String] HTML for close button dismissing
def close_button(dismiss)
content_tag :button, type: 'button', class: 'close', data: {dismiss: dismiss} do
I18n.t('ui.marks.close').html_safe
end
end
# @return [String] path to foodcoop CSS style (with MD5 parameter for caching)
def foodcoop_css_path(options={})
super(options.merge({md5: Digest::MD5.hexdigest(FoodsoftConfig[:custom_css].to_s)}))