Sha256: fb3a71c4223317d77f0516bfd345a590d6117159c471c429d4d1e5e4e31cc2fd
Contents?: true
Size: 1.62 KB
Versions: 64
Compression:
Stored size: 1.62 KB
Contents
<h1>Sites</h1> <div id='sites'></div> <% content_for :caboose_css do %> <style> table.data { margin-right: 20px; } </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: 'sites', base_url: '/admin/sites', after_add: 'redirect', fields: [ { name: 'name' , sort: 'name' , show: true , editable: false, bulk_edit: false, nice_name: 'Name' , type: 'text' , value: function(site) { return site.name; }, width: 400 }, { name: 'description' , sort: 'description' , show: true , bulk_edit: false, nice_name: 'Description' , type: 'text' , value: function(site) { return site.description; }, width: 400 }, { name: 'domains' , sort: 'name, description' , show: true , bulk_edit: false, nice_name: 'Domains' , type: 'text' , value: function(site) { return site.domains ? site.domains.map(function(d) { return d.id }) : []; }, text: function(site) { return site.domains ? site.domains.map(function(d) { return d.domain }).join('<br />') : ''; }, width: 400, height: 200, editable: false } ], search_fields: [ { name: 'name_like', nice_name: 'Name', type: 'text', width: 400 } ], new_model_text: 'New Site', new_model_fields: [ { name: 'name', nice_name: 'Name', type: 'text', width: 400 } ], }); }); </script> <% end %>
Version data entries
64 entries across 64 versions & 1 rubygems