= javascript_include_tag 'pages_cms/wysihtml5x-toolbar'
= javascript_include_tag 'pages_cms/advanced_and_extended'
= javascript_include_tag 'pages_cms/select2.min'
= stylesheet_link_tag 'pages_cms/select2.min'
%div.container-fluid
%div.row
= form_for @page, url: admin_page_path(@page) do |f|
%div.col-md-9
%h2
Main Content |
= f.submit 'Save', class: 'btn btn-primary'
= link_to 'View', slugged_path(@page), class: 'btn btn-default'
%div.back
= f.text_field :title, placeholder: 'page title', class: 'form-control big'
= f.text_field :meta_tags, placeholder: 'meta tags', class: 'form-control inline-form'
= f.text_field :meta_description, placeholder: 'meta description', class: 'form-control inline-form'
= f.select(:parent_id, @page.account.pages.collect {|p| [p.title, p.id] unless p.id == f.object.id }, {include_blank: 'Is a sub-page of'}, class: 'form-control inline-form')
= f.check_box :navbar_show
%span Navbar
= f.check_box :sidebar_show
%span Sidebar
= f.check_box :draft
%span Draft
%div#block-adder
%hr
= link_to_add_association 'Add Block', f, :page_blocks, class: 'btn btn-default'
= f.submit 'Save', class: 'btn btn-primary'
%div#pages-block.sortable
= f.fields_for :page_blocks, f.object.page_blocks.order(:order) do |page_block|
= render 'page_block_fields', f: page_block
%hr
%div#block-adder
= link_to_add_association 'Add Block', f, :page_blocks, class: 'btn btn-default'
= f.submit 'Save', class: 'btn btn-primary'
%div.col-md-3
%h3 Sidebar
%div.back
= f.fields_for :sidebar, @sidebar do |ss|
= render 'editor', f: ss
= ss.check_box :show
%span Show sidebar
= ss.check_box :tw_feed
%span Twitter feed
= ss.check_box :fb_feed
%span Facebook feed
= ss.check_box :all_posts
%span Blog posts
= ss.check_box :all_tags
%span Blog tags
= ss.check_box :all_pages
%span Links