% 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 %> <%# #### SIDEBAR ########################################################### %> <% content_for :sidebar do %> <%= form_for(@page, url: admin_page_url(@locale, @page), html: {class: "edit-page", id: 'page-form-sidebar'}, builder: PagesCore::Admin::FormBuilder) do |f| %> <%= render partial: 'edit_options', locals: {f: f} %> <% end %> <% end %> <%# #### EDIT AREA ######################################################### %> <%= form_for(@page, url: admin_page_url(@locale, @page), html: { class: "edit-page", id: 'page-form', method: :put, multipart: true }, builder: PagesCore::Admin::FormBuilder ) do |f| %>
<%# #### CONTENT #### %> <%= content_tab "Content" do %> <%= render partial: 'edit_content', locals: {f: f} %> <% end %> <%# #### IMAGES #### %> <% if @page.template_config.value(:images) || @page.template_config.value(:image) %> <%= content_tab "Images" do %> <%= render partial: 'edit_images', locals: {f: f} %> <% end %> <% end %> <%# #### FILES #### %> <% if @page.template_config.value(:files) %> <%= content_tab "Files" do %> <%= render partial: 'edit_files', locals: {f: f} %> <% end %> <% end %> <%# #### METADATA #### %> <%= content_tab "Metadata" do %> <%= render partial: 'edit_metadata', locals: {f: f} %> <% end %> <% end %>