Sha256: 2b2db3d42b2ce8c0412c0fefcf31494e329ae1720c2991747f31a2d43de728fe

Contents?: true

Size: 1.91 KB

Versions: 6

Compression:

Stored size: 1.91 KB

Contents

- content_for :sidebar do
  .sidebar
    .content
      %h2 Posts

    %h4 Edit Options
    %nav
      %ul
        %li.active= link_to 'Post Content', '#details', data: {toggle: 'tab'}
        %li= link_to "Search Optimization", '#seo', data: {toggle: 'tab'}

    = render "tenon/shared/posts_nav"

= autosaving_form_for @post do |f|
  = error_messages_for :post
  .fields.large.tabs
    .tab-pane.active#details
      .form-group
        = f.text_field :title, :explanation => "Give your post a title."

      .form-group.tenon-content
        %label Excerpt
        .editable-text{contenteditable: true}
          = raw @post.excerpt
        = f.hidden_field :excerpt

      .form-group
        = f.tenon_content :content

    .tab-pane#seo= render "tenon/shared/seo_fields", :f => f

  .fields.small
    - unless @categories.blank?
      %h4.box-label Categories
      .box
        .form-group.inline
          = f.super_label :post_categories, 'Categories'
          = f.select :post_category_ids, @categories.map { |c| [c.title, c.id] }

    %h4.box-label Publish Your Post
    .box
      .form-group.bordered
        = f.super_label :user_id, 'Author'
        = f.collection_select :user_id, @users, :id, :email, {:include_blank => "(No Author)"}

      .form-group.inline.bordered
        = f.check_box :allow_comments, class: 'tn-checkbox-right'
        = f.super_label :allow_comments, "Allow Comments?"

      .form-group
        = f.text_field :publish_at, label: "Publish Date", data: {behaviour: 'datetime-picker'}, placeholder: '--'

      .row.content
        %button.btn.btn-comp.btn-block.submit Save
        = save_draft_button(@post)
        .last-autosave

      %hr
      .content
        = clear_draft_link if params[:version]
        = load_draft_link(@post)
        - if @post.persisted?
          = link_to "Delete", @post, :data => {:method => :delete, :confirm => "Are you sure you want to delete this?"}, :class => 'delete-link'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tenon-1.0.5 app/views/tenon/posts/_form.html.haml
tenon-1.0.4 app/views/tenon/posts/_form.html.haml
tenon-1.0.3 app/views/tenon/posts/_form.html.haml
tenon-1.0.2 app/views/tenon/posts/_form.html.haml
tenon-1.0.1 app/views/tenon/posts/_form.html.haml
tenon-1.0 app/views/tenon/posts/_form.html.haml