Sha256: 97912b041966681660e2ced20f83a3940add0ebf646531a994e7f0a4fe9d9bc4

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

$(function() {

  slices.controller.init(
    '<%= @page.bson_id %>',
    {
      availableSlices: <%= raw Slices::AvailableSlices.all.to_json %>,
      availableContainers: <%= raw @layout.containers.to_json %>,

      mainTemplate: '<%= @page.main_template %>',
      metaTemplate: '<%= @page.meta_template %>',

      mainExtraTemplates: <%= raw @page.main_extra_templates.to_json %>,
      metaExtraTemplates: <%= raw @page.meta_extra_templates.to_json %>,

      super_user: <%= current_admin.super? %>,
      i18n: <%= Slices::Config.i18n? %>,

      loadPagePath: '/admin/pages/{{id}}.json?locale=<%= I18n.locale %>',
      savePagePath: '/admin/pages/{{id}}.json?locale=<%= I18n.locale %>',

      <% if @page.editing_entry_content_slices?(params[:entries]) %>
        mainTemplate: 'set_page_entry_content_main',
        metaTemplate: 'set_page_entry_content_meta',
        loadPagePath: '/admin/pages/{{id}}?locale=<%= I18n.locale %>&entries=1',
        savePagePath: '/admin/pages/{{id}}?locale=<%= I18n.locale %>&entries=1'
      <% end %>
    }
  );

});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slices-2.0.2 app/views/admin/pages/_slices.html.erb
slices-2.0.1 app/views/admin/pages/_slices.html.erb
slices-2.0.0 app/views/admin/pages/_slices.html.erb