Sha256: 96c0f3746410a90594017c96fe61af4feede6cad4d1b1e830a0507de4ce28cf6
Contents?: true
Size: 1.6 KB
Versions: 63
Compression:
Stored size: 1.6 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', 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
63 entries across 63 versions & 1 rubygems