Sha256: e317506553692a35c265dcdd9d37499d81634a1789f256292b326097ec9fd20a

Contents?: true

Size: 1.49 KB

Versions: 43

Compression:

Stored size: 1.49 KB

Contents

<%= render :partial => 'caboose/sites/admin_header' %>

<h5 style="margin:0;font-size:18px;">Embedded HTML</h5>

<p><div id='site_<%= @site.id %>_head_code'></div></p>
<p><div id='site_<%= @site.id %>_body_open_code'></div></p>
<p><div id='site_<%= @site.id %>_body_close_code'></div></p>

<%= render :partial => 'caboose/sites/admin_footer' %>

<% content_for :caboose_css do %>
<style>
  textarea {
    font-family: monospace;
    font-size: 13px;
    line-height: 18px;
  }
</style>
<% end %>

<% content_for :caboose_js do %>
<script type="text/javascript">

$(document).ready(function() {
  new ModelBinder({
    name: 'Site',
    id: <%= @site.id %>,
    update_url: '/admin/sites/<%= @site.id %>',
    authenticity_token: '<%= form_authenticity_token %>',
    attributes: [
      { name: 'head_code', nice_name: 'Code for &lt;head&gt;', type: 'textarea', value: <%== Caboose.json(@site.head_code.blank? ? '' : @site.head_code.gsub('</script>','<end/script>')) %>, width: 600, height: 300 },
      { name: 'body_open_code', nice_name: 'Code for after &lt;body&gt;', type: 'textarea', value: <%== Caboose.json(@site.body_open_code.blank? ? '' : @site.body_open_code.gsub('</script>','<end/script>')) %>, width: 600, height: 300 },
      { name: 'body_close_code', nice_name: 'Code for before &lt;/body&gt;', type: 'textarea', value: <%== Caboose.json(@site.body_close_code.blank? ? '' : @site.body_close_code.gsub('</script>','<end/script>')) %>, width: 600, height: 300 }
    ]    
  });       
});
</script>
<% end %>

Version data entries

43 entries across 43 versions & 1 rubygems

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