Sha256: c39624283cef0cddba17f1d1ccf078bd347e21c5268d7f6cc83224e7e0638400

Contents?: true

Size: 1.99 KB

Versions: 4

Compression:

Stored size: 1.99 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'}

    = i18n_language_nav(:'tenon/posts')

    = 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
        = f.rich_text :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] }, {}, { multiple: true }

    %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
        - if can?(:publish, @post)
          %button.btn.btn-comp.btn-block.submit{ data: { disable_with: "Please wait..." } } Save

        - if can?(:create, Tenon::ItemVersion)
          = 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

4 entries across 4 versions & 1 rubygems

Version Path
tenon-1.1.4 app/views/tenon/posts/_form.html.haml
tenon-1.1.3 app/views/tenon/posts/_form.html.haml
tenon-1.1.2 app/views/tenon/posts/_form.html.haml
tenon-1.1.1 app/views/tenon/posts/_form.html.haml