<% content_for :page_title do %> <% if @page.name? %> Edit “<%= @page.name %>” <% else %> Edit page <% end %> <% end %> <% content_for :page_description do %> Editing <% @page.ancestors.reverse.each do |page| %> <%= link_to(page.name? ? page.name : tag.i("Untitled"), edit_admin_page_path(content_locale, page)) %> » <% end %> <%= link_to(@page.name? ? @page.name : tag.i("Untitled"), edit_admin_page_path(content_locale, @page)) %> <% end %> <% content_for :page_description_links do %> <%= locale_links { |l| edit_admin_page_path(l, @page.localize(l)) } %> <% end %> <% content_for :main_wrapper do %> <%= form_for(@page, url: admin_page_url(content_locale, @page), builder: PagesCore::Admin::FormBuilder, html: { class: "edit-page main-wrapper", method: :put, data: { controller: "edit-page", "edit-page-target": "form", "preview-url": preview_page_url(@page.locale, @page) } }) do |f| %> <% content_for :main do %>
<%= render(partial: "form", locals: { f: f }) %>
<% end %>
<%= render(partial: "layouts/admin/page_header") %> <%= yield :main %>
<% end %> <% end %>