Sha256: 6a6832e40cac708bcb64c617c476d54df14a8b484ed63b33520c9e8c1f4a4c5e

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

<%
  output = {
    :iTotalDisplayRecords => @menus.total_entries || 0,
    :aaData => @menus.collect do |menu|
      link_id = menu.id
      klass = menu.active? ? 'see-on' : 'see-off'
      [
        content_tag(:div, content_tag(:div, tag(:span, :class => "small-icons menu-ico"), :class=>"image"), :id => link_id),
        content_tag(:div, link_to(menu.name, [forgeos_cms, :edit, :admin, menu]), :class => 'menu-name'),
        link_to('', [forgeos_cms, :activate, :admin, menu],
         :remote => true,
         :complete => "toggleActivate('#show_#{link_id}')",
         :class => "small-icons #{klass}",
         :id => "show_#{link_id}"
        ),
        link_to('', [forgeos_cms, :duplicate, :admin, menu], :class => 'small-icons duplicate-link') +
        link_to('', [forgeos_cms, :edit, :admin, menu], :class => 'small-icons edit-link') +
        link_to('', [forgeos_cms, :admin, menu],
          :remote => true,
          :method => :delete,
          :confirm => t('menu.destroy.confirm').capitalize,
          :success => "removedataTablesRow('#destroy_#{link_id}')",
          :class => 'small-icons destroy-link', :id => "destroy_#{link_id}"
        )
      ]
    end
  }
-%>
<%= raw output.to_json %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forgeos_cms-1.9.1 app/views/admin/menus/index.json.erb