%= f.error_messages %>
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
<%= f.label :name, t('admin.name'), :class => 'control-label' %>
<%= f.text_field :name, :class => 'text input-xlarge' %>
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
<% end %>
<% end %>
<%= f.label :name, t('admin.design_name'), :class => 'control-label' %>
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
<%= f.label :name, t('admin.theme'), :class => 'control-label' %>
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
<%= f.label :name, t('admin.module_app'), :class => 'control-label' %>
<%= 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.title, category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%>
<%= select('page','tag', @tags.collect{|tag| [tag[I18n.locale], tag.id]}, :selected => @item[:tag], :include_blank => true ) rescue ''%>
<%= f.label :is_published, "#{t('admin.is_published')} ?", :class => 'control-label' %>
<%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:", :class => 'control-label' %>
<% @site_valid_locales.each do |valid_locale| %>
<% end %>
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:", :class => 'control-label' %>
<% @site_valid_locales.each do |valid_locale| %>
<% end %>
<%= hidden_field_tag 'page[enabled_for][]', '' %>