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.146 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.145 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.144 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.143 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.142 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.141 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.140 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.139 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.138 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.137 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.136 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.135 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.134 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.133 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.132 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.131 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.130 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.129 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.128 app/views/caboose/sites/admin_index.html.erb
caboose-cms-0.9.127 app/views/caboose/sites/admin_index.html.erb