This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2013-01-02 06:34:34 +00:00
|
|
|
module Admin::PagePartsHelper
|
|
|
|
|
|
|
|
def support_link
|
|
|
|
url_method = @module_app.get_default_widget[:url_method]
|
|
|
|
unless url_method.nil?
|
|
|
|
res = "Link:"
|
|
|
|
res << select_tag( "page_part[widget_field_is_link][]", options_for_select([["NotLink",false],["Link1",url_method]]))
|
|
|
|
res.html_safe
|
|
|
|
end
|
|
|
|
end
|
2013-01-04 10:42:25 +00:00
|
|
|
|
|
|
|
def widget_field_options(i)
|
|
|
|
options = @module_app.widget_fields.collect{|widget_field| [I18n.t(widget_field[1]), widget_field[0]]}
|
|
|
|
options_for_select(options, (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) )
|
|
|
|
end
|
|
|
|
|
|
|
|
def widget_fiield_type_options(i)
|
|
|
|
options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}
|
|
|
|
options_for_select(options, (@part[:widget_field][i][1] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) )
|
|
|
|
end
|
|
|
|
|
2013-01-02 06:34:34 +00:00
|
|
|
end
|