- page = @page

= form_for page do |f|
  - if page.errors.any?
    #error_explanation
      h2 = "#{pluralize(page.errors.count, "error")} prohibited this page from being saved:"
      ul
        - page.errors.full_messages.each do |message|
          li = message

  .form-group
    = f.text_field :path, placeholder: "The path to the page. 'index' will go to #{request.base_url}/index", class: "form-control"
    small#emailHelp.form-text.text-muted Path to the page

  .form-group
    .editor-container
      = f.text_area :body, class: 'editor markdown'
  .form-group
    .actions
        button#page_save.btn.btn-primary type="submit"
          => fa_icon 'save'
          | Save
        - if page.persisted?
          =< link_to "#{fa_icon("trash-o")} Delete".html_safe, page, data: {:confirm => 'Are you sure?'}, :method => :delete, class: "btn btn-danger"

- page = @page

= form_for page do |f|
  - if page.errors.any?
    #error_explanation
      h2 = "#{pluralize(page.errors.count, "error")} prohibited this page from being saved:"
      ul
        - page.errors.full_messages.each do |message|
          li = message

  .form-group
    = f.text_field :path, placeholder: "The path to the page. 'my_page' will go to #{request.base_url}/my_page", class: "form-control"
    small#emailHelp.form-text.text-muted Path to the page

  .form-group
    = f.text_area :body, class: 'plain-text markdown'
  .form-group
    .actions
        button#page_save.btn.btn-primary type="submit"
          => fa_icon 'save'
          | Save
        - if page.persisted?
          =< link_to "#{fa_icon("trash-o")} Delete".html_safe, page, data: {:confirm => 'Are you sure?'}, :method => :delete, class: "btn btn-danger"

Use a plain text_area for pages
Use a plain text_area for pages

This is because I want to add the inline-upload JS eventually, so we can
drag and drop (or cut and paste) images directly into the form for wiki
pages.

csexton/corporate-tool,csexton/corporate-tool,csexton/corporate-tool,csexton/corporate-tool