<%= simple_form_for @page, as: :page, url: url_for(controller: controller_name, action: :update, id: @page.id), html: {class: 'form-vertical form-with-helpers js-spin-and-roll', data: {'page-id' => @page.id}, defaults: { input_html: { class: "form-control" }}} do |f| %>
<%= link_to_back search_pages_path %>

<%= @page.title %>

<%= button_to_edit if policy(@page).edit? %> <%= link_to "#{icon_tag('copy')} Copy".html_safe, [:copy, @page], class: 'btn btn-default' if policy(@page).copy? %> <%= button_to_save if policy(@page).update? %>

<%= icon_tag 'cog' %> <%= instance_name.titleize %> Settings

<% if extra_fields? %> <%= render partial: extra_fields_path, locals: {f: f, page: @page} %> <% end -%>
URL & Handle <%= tooltip_tag(icon_tag('info-circle'), "The URL is automatically generated from the #{instance_name}'s hierarchy and title in the default language.") %>
<%= f.input_field :slug, pattern: '[a-zA-Z0-9]+', data: {slug: @page.slug}, class: 'form-control' %>
Tags <%= tooltip_tag(icon_tag('info-circle'), "Tags can later be used to show similar pages or pages sharing the same tags.") %>

Use tags to help Georgia understand what this page is about.

<%= f.input :tag_list, as: :text, label: false, input_html: {class: 'js-taggable', rows: 1} %>
Hierarchy

Move the <%= instance_name.pluralize %> around to change their display position.

<%= f.input :parent_id, collection: parent_page_collection, label: 'Parent', hint: "Select None if the #{instance_name.humanize.downcase} doesn't belong to any section.".html_safe, include_blank: "None", input_html: {class: 'js-select2'} %>
<%= label_tag :subpages %> <% if @page.persisted? and @page.has_children? %> <% else -%>

There are no subpages for this <%= instance_name.humanize.downcase %>.

<% end -%>

<%= button_to_save if policy(@page).update? %>
<%= render 'georgia/revisions/panels/actions' %> <%= render 'georgia/revisions/panels/info' %> <%= render 'georgia/revisions/panels/drafts' %> <%= render 'georgia/revisions/panels/activities' %>
<% end %>