<% crumbs = [] b = @block while b href = b.id == @block.id ? "#" : "/admin/pages/#{b.page_id}/blocks/#{b.id}/edit" onclick = b.id == @block.id ? " onclick=\"$('#block_#{@block.id}_block_type_id_container').slideToggle(100, function() { modal.autosize(); });\"" : '' text = b.name ? "#{b.block_type.description} (#{b.name})" : b.block_type.description crumbs << "#{text}" b = b.parent end b = @block %>
<% if @before_id %><% end %> <% if @after_id %><% end %>
<% Caboose::BlockTypeCategory.reorder(:name).all.each do |cat| %> <% next if cat.parent_id.nil? && cat.name == 'Layouts' %> <% #kids = cat.block_types.where("parent_id is null and (site_id is null or site_id = ?)", @site.id).reorder(:name).all arr = ["parent_id is null and block_type_category_id = ? and block_type_site_memberships.site_id = ?", cat.id, @site.id] kids = Caboose::BlockType.includes(:block_type_site_memberships).where(arr).reorder(:name).all %> <% if kids && kids.count > 0 %>

<%= cat.name %>

<% kids.each do |bt| %> <%= bt.description %> <% end %>
<% end %> <% end %>
<% content_for :caboose_css do %> <%= stylesheet_link_tag 'caboose/icomoon_fonts' %> <% end %> <% content_for :caboose_js do %> <% end %>