Sha256: 031d787ae08c1e24b08b9f26e7a0afb49dccd03b205fd14ab80c5c9417f6b75c
Contents?: true
Size: 1.8 KB
Versions: 14
Compression:
Stored size: 1.8 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 if b.nil? bt = Caboose::BlockType.where(:name => 'layout_basic').first Caboose::Block.create(:page_id => @page.id, :block_type_id => bt.id) b = @page.block b.create_children end str = b.render(b, { :view => self, :controller_view_content => yield, :modal => false, :empty_text => defined?(@editing) && @editing ? (defined?(@empty_text) ? @empty_text : 'Empty, click to edit') : "", :editing => defined?(@editing) ? @editing : false, :css => '|CABOOSE_CSS|', :js => '|CABOOSE_JAVASCRIPT|', :csrf_meta_tags => '|CABOOSE_CSRF|', :logged_in_user => @logged_in_user }) 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
14 entries across 14 versions & 1 rubygems