<% output = { :sEcho => params[:sEcho], :iTotalRecords => @admins.total_entries || 0, :iTotalDisplayRecords => @admins.size, :aaData => @admins.collect do |admin| link_id = "admin_#{admin.id}" klass = admin.active? ? 'see-on' : 'see-off' [ content_tag(:div, content_tag(:div, '', :class => 'handler') + content_tag(:div, " ".html_safe, :id => link_id, :class => 'small-icons admin-ico'), :class => 'handler_container'), content_tag(:div, link_to("#{admin.firstname} #{admin.lastname}", [forgeos_core, :edit, :admin, admin]), :class => 'admin-name'), admin.role.name, content_tag(:div, mail_to(admin.email, admin.email), :class => 'email' ), link_to('', [forgeos_core, :activate, :admin, admin], :remote => true, :method => :post, :class => "small-icons #{klass}", :id => "show_#{link_id}" ), link_to('', '#', :class => 'small-icons duplicate-link') + link_to('', [forgeos_core, :edit, :admin, admin], :class => 'small-icons edit-link') + link_to('', [forgeos_core, :admin, admin], :remote => true, :method => :delete, :confirm => I18n.t('admin.destroy.confirm').capitalize, :class => 'small-icons destroy-link', :id => "destroy_#{link_id}" ) ] end } -%> <%= raw output.to_json -%>