Sha256: b85cc8cf340182f5993a7b340604de94423b721a0ef26998dc2917ae9e2757a2

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

<%
  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 %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pages_core-3.5.1 app/views/admin/pages/new.html.erb