Sha256: ed7829c3e89f4a254807bafa8b320cf775838b1481b6d83c4d7e325599ecdad6

Contents?: true

Size: 872 Bytes

Versions: 8

Compression:

Stored size: 872 Bytes

Contents

<%
  # headmin/blocks
  #
  # ==== Required parameters
  # * +blockable</tt> - Object with blocks association
  #
  # ==== Optional parameters
  # * +paths</tt> - Directories where to look for block templates
  #
  # ==== Examples
  #   Basic version. (looks in views/website/blocks, views/blocks or views directory )
  #   <%= render "headmin/blocks", blockable: @page %#>
  #
  #   Define one ore more path where the templates could be located:
  #   <%= render "headmin/blocks", blockable: @page, paths: %w(website/pages/blocks) %#>

  blocks = Headmin::BlocksView.new(local_assigns)
  @lookup_context.prefixes = blocks.prefixes + @lookup_context.prefixes
%>

<% if blockable && blockable.respond_to?(:blocks) %>
  <% blockable.blocks.order(:position).each do |block| %>

    <!-- <%= block.name %> -->
    <%= render block.name, block: block %>

  <% end %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
headmin-0.5.9 app/views/headmin/_blocks.html.erb
headmin-0.5.8 app/views/headmin/_blocks.html.erb
headmin-0.5.7 app/views/headmin/_blocks.html.erb
headmin-0.5.6 app/views/headmin/_blocks.html.erb
headmin-0.5.5 app/views/headmin/_blocks.html.erb
headmin-0.5.4 app/views/headmin/_blocks.html.erb
headmin-0.5.3 app/views/headmin/_blocks.html.erb
headmin-0.5.1 app/views/headmin/_blocks.html.erb