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

Version Path
caboose-cms-0.9.166 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.165 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.164 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.163 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.162 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.161 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.160 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.159 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.158 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.157 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.156 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.155 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.154 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.153 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.152 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.151 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.150 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.149 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.148 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.147 app/views/caboose/sites/admin_index.html.erb