Sha256: e14465754c6297c5d75475b75c7358581252a3c7390ef8f3f2a48a9ef7f1f1b6

Contents?: true

Size: 1.54 KB

Versions: 54

Compression:

Stored size: 1.54 KB

Contents

<h1>Posts</h1>
<div id='posts'></div>

<% content_for :caboose_js do %>
<%= javascript_include_tag 'caboose/model/all' %>
<script type='text/javascript'>

$(document).ready(function() {  
  var that = this;
  var table = new IndexTable({    
    form_authenticity_token: '<%= form_authenticity_token %>',
    container: 'posts',
    base_url: '/admin/posts',
    allow_bulk_import:   false ,
    allow_bulk_edit:     false ,
    allow_bulk_delete:   false ,
    allow_duplicate:     false ,
    allow_advanced_edit: true ,
    fields: [
      { show: true , bulk_edit: false , name: 'title'        , nice_name: 'Title'        , sort: 'title'        , type: 'text'     , value: function(p) { return p.title                                     }, width: 300, editable: false },
      { show: true , bulk_edit: false , name: 'published'    , nice_name: 'Published'    , sort: 'published'    , type: 'checkbox' , value: function(p) { return p.published ? 'Yes' : 'No'                  }, width: 100, editable: false },
      { show: true , bulk_edit: false , name: 'created_at'   , nice_name: 'Date Created' , sort: 'created_at'   , type: 'date'     , value: function(p) { return new Date(p.created_at).toLocaleDateString() }, width: 100, editable: false },
    ],
    new_model_text: 'New Post',
    no_models_text: 'There are no posts right now.',
    new_model_fields: [
      { name: 'title', nice_name: 'Title', type: 'text', width: 400 }
    ],
    search_fields: [
      { name: 'title_like', nice_name: 'Title' , type: 'text', width: 400 },
    ],
  });
});

</script>
<% end %>

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
caboose-cms-0.9.99 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.98 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.97 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.96 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.95 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.94 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.93 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.92 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.91 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.90 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.89 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.88 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.87 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.86 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.85 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.84 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.83 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.82 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.81 app/views/caboose/posts/admin_index.html.erb
caboose-cms-0.9.80 app/views/caboose/posts/admin_index.html.erb