<% self.page_title = "Editing “" + @page.name.to_s + "”" self.page_description = "Editing " + [@page.ancestors.reverse,@page].flatten.map{|page| link_to((page.name rescue "(Untitled)"), edit_admin_page_path(@locale, page))}.join(" » ") if PagesCore.config.localizations? self.page_description_links = "In " + safe_join( PagesCore.config.locales.map do |l, name| link_to_unless((l == @locale.to_sym), name, edit_admin_page_path(l, @page.localize(l))) end, link_separator) end %> <% content_for :main_wrapper do %> <%= form_for(@page, url: admin_page_url(@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 %>