Sha256: 8eb7b37d9d5feb8499cbc3751e04e24b798888665e6e801bb3b59544d7a5f5d5

Contents?: true

Size: 918 Bytes

Versions: 1

Compression:

Stored size: 918 Bytes

Contents

<% content_for :head do %>
  <%= stylesheet_link_tag 'sortable_nested_set' %>
  <%= javascript_include_tag 'sortable_nested_set' %>
<% end %>

<% @cpath = category_class.name.underscore + '_path' %>
<% prev_level = -1 %>

<ol id="menu" class="sortable" data-url="<%= send "sns_sort_#{category_class.name.underscore.pluralize}_path" %>">
  <% category_class.each_with_level(categories) do |category, level| %>
    <%=raw '</ol></li>' if level <= prev_level %>
    <%=raw '</ol>' * (prev_level - level) if level < prev_level %>

    <li id="<%= category_class.name.underscore %>_<%= category.id %>" class="category">
      <%= render :partial => 'sortable_nested_set/category', :object => category %>
      <ol>
        <%= render :partial => 'sortable_nested_set/item', :collection => category.sns_items %>

    <% prev_level = level %>
  <% end %>

  <%=raw '</ol></li>' * (prev_level + 1) if prev_level > -1 %>
</ol>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sortable_nested_set-0.2.2 app/views/sortable_nested_set/_tree.html.erb