<%
  if @page.parent
    self.page_title = "#{@page.parent.name} &raquo; New Page".html_safe
    self.page_description = "<em>#{@page.parent.name}</em> &raquo; New Page"
  else
    self.page_title = "Create new page"
    self.page_description = "You are creating a new root page"
  end

  @url_options = { action: :new }
  @url_options[:parent] = @page.parent if @page.parent
%>

<% content_for :sidebar do %>
  <%= form_for(@page,
               url: admin_pages_url(@locale),
               html: {class: "edit-page", id: 'page-form-sidebar'}) do |f| %>
    <%= render partial: 'edit_options', locals: {f: f} %>
  <% end %>
<% end %>

<%= form_for(@page,
             url: admin_pages_url(@locale),
             html: {
               class: "edit-page",
               id: 'page-form',
               method: :post,
               multipart: true
             }
) do |f| %>

  <div class="hidden-options">
    <%= render partial: 'edit_options', locals: {f: f} %>
  </div>

  <%= hidden_field_tag 'locale', @locale %>
  <%= f.hidden_field 'parent_page_id' if @page.parent %>

  <%# #### CONTENT #### %>
  <%= content_tab "Content" do %>
    <%= render partial: 'edit_content', locals: {f: f} %>
  <% end %>

  <p>
    <%= submit_tag "Save" %>
  </p>

<% end %>

<%
  if @page.parent
    self.page_title = "New page"
    self.page_description = "<em>#{@page.parent.name}</em> &raquo; New Page"
  else
    self.page_title = "Create new page"
    self.page_description = "You are creating a new root page"
  end

  @url_options = { action: :new }
  @url_options[:parent] = @page.parent if @page.parent
%>

<% content_for :sidebar do %>
  <%= form_for(@page,
               url: admin_pages_url(@locale),
               html: {class: "edit-page", id: 'page-form-sidebar'}) do |f| %>
    <%= render partial: 'edit_options', locals: {f: f} %>
  <% end %>
<% end %>

<%= form_for(@page,
             url: admin_pages_url(@locale),
             html: {
               class: "edit-page",
               id: 'page-form',
               method: :post,
               multipart: true
             }
) do |f| %>

  <div class="hidden-options">
    <%= render partial: 'edit_options', locals: {f: f} %>
  </div>

  <%= hidden_field_tag 'locale', @locale %>
  <%= f.hidden_field 'parent_page_id' if @page.parent %>

  <%# #### CONTENT #### %>
  <%= content_tab "Content" do %>
    <%= render partial: 'edit_content', locals: {f: f} %>
  <% end %>

  <p>
    <%= submit_tag "Save" %>
  </p>

<% end %>

Fix page title on new page
Fix page title on new page
