%= f.error_messages %> <%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
<%= f.label :name, t('admin.name') %> <%= f.text_field :name, :class => 'text' %>
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %> <% @site_valid_locales.each do |locale| %><%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %> <%= f.text_field locale %>
<% end %> <% end %><%= t('admin.design_name') %> <%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
<%= t('admin.theme') %> <%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
<%= t('admin.module_app') %> <%= render :partial => "app_selector", :locals => { :f => f } %> <%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> <%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%>
<%= f.label :is_published, "#{t('admin.is_published')} ?" %> <%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
<%= f.label :enabled_for, "#{t('admin.enabled_for')} ?" %> <% @site_valid_locales.each do |valid_locale| %> <%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %> <%= I18nVariable.from_locale(valid_locale) %> <% end %> <%= hidden_field_tag 'page[enabled_for][]', '' %>