Sha256: 304f9d069ae5023031d69d07e5893496a454a1aa41418197421bf5e5d5500916
Contents?: true
Size: 1.64 KB
Versions: 45
Compression:
Stored size: 1.64 KB
Contents
<h1>Posts</h1> <div id='posts'></div> <% content_for :caboose_css do %> <style> table.data {margin-right: 30px;} </style> <% end %> <% 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
45 entries across 45 versions & 1 rubygems