<%= f.error_messages %> <%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
<%= f.label :name, t(: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(: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(:template_name), :class => 'control-label' %>
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
<%= f.label :name, t(:theme), :class => 'control-label' %>
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
<%= f.label :name, t(:module), :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','frontend_style', @frontend_style, :selected => @item[:frontend_style], :include_blank => true ) 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 ''%> <%= render 'frontend_fields' %>
<%= f.label :frontend_data_count, t('admin.frontend_data_count'), :class => 'control-label' %>
<%= f.text_field :frontend_data_count %>
<%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %>
<%= f.label :menu_enabled_for, "#{t(: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(:enabled_for)}:", :class => 'control-label' %>
<% @site_valid_locales.each do |valid_locale| %> <% end %> <%= hidden_field_tag 'page[enabled_for][]', '' %>