2013-04-01 09:06:10 +00:00
|
|
|
<% if (not(@selected[:module_app].widget_options(@selected[:app_frontend_url]).blank?) and @selected[:app_frontend_url]!='default_widget')%>
|
|
|
|
|
|
|
|
|
|
|
|
<% @selected[:module_app].widget_options(@selected[:app_frontend_url]).get_options.each do |key,settings| %>
|
2013-01-29 12:33:40 +00:00
|
|
|
<% options = settings[:opts] %>
|
|
|
|
<%= label_tag(t(settings[:label_i18n]))%>
|
2013-01-14 10:49:23 +00:00
|
|
|
<% case options%>
|
|
|
|
<% when Hash%>
|
|
|
|
<%= select_tag "page_part[widget_options][#{key}]", options_from_collection_for_select(eval(options["query"]), options["value"], options["label"].to_s, :selected => (@part.widget_options[key] rescue nil)) %>
|
|
|
|
<% else%>
|
|
|
|
<%= select_tag "page_part[widget_options][#{key}]", options_for_select(options,(@part.widget_options[key] rescue nil)) %>
|
|
|
|
<!-- (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ) -->
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
2013-04-01 09:06:10 +00:00
|
|
|
<% end %>
|