% if params[:action] == "edit" %>
<%= @page.name %>
<% end %>
<% I18n.available_locales.each do |locale| %>
<%= f.fields_for :name_translations do |n| %>
<%= n.text_field locale, :value=>@page.name_translations[locale] rescue nil %>
<% end %>
<% end %>
<% if params[:action] == "new" %>
<%= f.text_field :page_id %>
<% end %>
<%= f.select(:module, @modules.map{|m| [m.title,m.key]},{:include_blank => true},:class=>"module_select") %>
<%= f.hidden_field :parent_page, value: (params[:parent_page] || @page.parent_page_id) %>