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

Version Path
caboose-cms-0.9.229 app/views/caboose/sites/admin_index.html.erb
caboose-cms-1.0.2 app/views/caboose/sites/admin_index.html.erb
caboose-cms-1.0.1 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.228 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.227 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.226 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.225 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.224 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.223 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.222 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.221 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.220 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.219 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.218 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.217 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.216 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.215 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.214 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.213 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.212 app/views/caboose/sites/admin_index.html.erb