Sha256: ba88e75b532c4cbfc17ac8a9d01513c8512861ba62173764048cc69a9c183095

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

<% if !@page.nil? && @page.title != 'Access Denied' %>
<% content_for :js do %>
<%= javascript_include_tag "caboose/application" %>
<script>window.loggedIn = <%= logged_in?.to_json %></script>
<% Caboose::javascripts.each do |js| %><%= javascript_include_tag(js) %><% end %>
<% @page.linked_resources_map[:js].each do |r| %><%= javascript_include_tag r %><% end %>
<%= yield :caboose_js %>
<% end %>  
<% content_for :css do %>
<%= stylesheet_link_tag('caboose/application') %>
<% Caboose::stylesheets.each do |css| %><%= stylesheet_link_tag(css) %><% end %>
<% @page.linked_resources_map[:css].each do |r| %><%= stylesheet_link_tag r %><% end %>
<%= yield :caboose_css %>
<% end %>
  <%
  b = @page.block
  str = b.render(b, {     
    :view => self,
    :controller_view_content => yield,
    :modal => false,
    :empty_text => '',
    :editing => defined?(@editing) ? @editing : false,
    :css => '|CABOOSE_CSS|',
    :js => '|CABOOSE_JAVASCRIPT|',
    :csrf_meta_tags => '|CABOOSE_CSRF|' 
  })    
  str.gsub!('|CABOOSE_CSS|'        , yield(:css))
  str.gsub!('|CABOOSE_JAVASCRIPT|' , yield(:js))  
  str.gsub!('|CABOOSE_CSRF|'       , csrf_meta_tags)
  
  %><%= raw str %><%
    
  #b = @page.block
  #
  #raw b.render(b, {
  #    :controller_view_content => yield,
  #    :modal => false,
  #    :empty_text => '',
  #    :editing => defined?(@editing) ? @editing : false,
  #    :css => yield(:css),
  #    :js => yield(:js),
  #    :csrf_meta_tags => csrf_meta_tags
  #  })      

end
%>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
caboose-cms-0.4.18 app/views/layouts/caboose/application.html.erb
caboose-cms-0.4.17 app/views/layouts/caboose/application.html.erb
caboose-cms-0.4.16 app/views/layouts/caboose/application.html.erb
caboose-cms-0.4.15 app/views/layouts/caboose/application.html.erb