.solitary-header.sub-header.clearfix .button-bar.clearfix = render :partial => 'search' .admin-links = link_to 'all pages', dust_pages_path, :class => 'border' = link_to "view page", front_end_page_path(@page.filename), :class => "border" unless @page.new_record? = link_to "delete page", @page, :confirm => 'Are you sure?', :method => :delete .form-wrap.clearfix = simple_form_for @page, :validate => true do |f| = f.error_messages .fields .sub-header .title page fields .content-wrapper = f.input :meta_title, :label => "Title, Window Title" = f.input :meta_description = f.input :classes .sub-header .title Menu Item .content-wrapper = f.input :active, :as => :boolean, :label => "Show in Menu" = f.input :menu, :collection => Dust::Menu.all.map{ |m| [m.title, m.id] } = f.input :nav_link, :label => "Name, navigation link" = f.input :filename, :label => "Filename, Found In The Url" .content-areas .sub-header .button-bar.clearfix .title page sections .admin-links = link_to('save section order', '', :class => 'order border', 'data-url' => '/dust/sort', 'data-class' => "Dust::Section") = link_to "Add Section", "#", :class => "add_fields" .content-wrapper %ul.sections#tree - @page.sections.each_with_index do |section, index| - section_id = section.id ? section.id : index %li.item.sortable-item{"data-id" => section.id} .section-item %span.handle   = hidden_field_tag "sections[#{section_id}][_destroy]" = text_field_tag "sections[#{section_id}][title]", section.title, :placeholder => "title", :class => "section-title" = link_to "More", "#", :class => "section-data-more" = link_to "", "#", :class => "remove_fields destroy right" .section-additional-data = label_tag "classes" = text_field_tag "sections[#{section_id}][classes]", section.classes .actions = f.button :submit %script{:type => "text/templte", :id => "placeholder-section"} %li.item.sortable-item{"data-id" => "section_id"} .section-item %span.handle   = hidden_field_tag "sections[section_id][_destroy]" = text_field_tag "sections[section_id][title]", "", :placeholder => "title", :class => "section-title" = link_to "More", "#", :class => "section-data-more" = link_to "", "#", :class => "remove_fields destroy right" .section-additional-data = label_tag "classes" = text_field_tag "sections[section_id][classes]", ""