Sha256: fad026f5f8ee9464d7acc31aaba5bf236c74f20cbb5505803be705a6e89311e1

Contents?: true

Size: 1.37 KB

Versions: 2

Compression:

Stored size: 1.37 KB

Contents

<% cpath = category.class.name.underscore + '_path' %>

<%= render 'sortable_nested_set/toggle',
           :category_type => category.class.name.underscore,
           :id => category.id,
           :state => :open %>

<%= content_tag :span, category, :class => :handle %>

<% unless local_assigns[:show_mega_menu] == false %>
  <%= content_tag :span, link_to('-', category), :id => "toggle_actions_category_#{category.id}", :class => :mega %>

  <%= content_tag :div, :id => "actions_category_#{category.id}", :class => :links do %>
    <%= link_to_unless_current 'show', category %> |
    <%= link_to 'edit', send("edit_#{cpath}", category) %> |
    <% unless current_page? send(cpath, category) %>
      <%= link_to 'remove',
                  send("sns_destroy_category_#{cpath}", category),
                  :confirm => 'Are you sure?',
                  :method => :delete,
                  :remote => true %> |
    <% end %>
    <%= link_to "add #{category.class.sns_subcategories_type.to_s.singularize}",
                send("sns_add_subcategory_#{cpath}", category) %> |
    <%= link_to "add #{category.class.sns_items_type.to_s.singularize}", send("sns_add_item_#{cpath}", category) %>
  <% end %>
<% end %>

<%= content_tag :div, :id => "items_#{category.id}", :class => :items do %>
  <%= render :partial => 'sortable_nested_set/item', :collection => category.sns_items %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sortable_nested_set-0.1.26 app/views/sortable_nested_set/_category.html.erb
sortable_nested_set-0.1.25 app/views/sortable_nested_set/_category.html.erb