<%= f.fields_for :title, @part.title do |f| %> <% @site_valid_locales.each do |locale| %>

<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %> <%= f.text_field locale %>

<% end %> <% end %>
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %> <%#= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %> <%= f.select :widget_path, @module_app.widgets.collect{|k,v| [k.humanize, k]}, {}, { :selected => @part.widget_path, :rel => admin_page_parts_path } %> <%#= f.select :widget_style, @widget_style, :selected => @part.widget_style %> <%= select('page_part','widget_style', @widget_style, :selected => @part[:widget_style], :include_blank => true ) rescue ''%> : <%= render 'widget_categories' %> <%= t :or_lower %> <%= render 'widget_tags' %> <%= render 'widget_fields' %> <%#= f.label :widget_field %> <%# @module_app.widget_fields.each_with_index do |widget_field, i| %> <%#= i+1 %> <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part.widget_field ? @part.widget_field[i] : nil) ), :include_blank => true %>
<%# end %> <%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, @part.widget_field.collect{|widget_field| widget_field}), {:multiple => :multiple, :size => 6} %>
<%= f.label :widget_data_count %> <%= f.text_field :widget_data_count %>