rosa-build/app/views/admin/users/_system_users_ajax.json.jbu...

18 lines
616 B
Plaintext
Raw Normal View History

2012-12-28 19:24:41 +00:00
users = @users.map do |user|
link_block = [
2012-12-29 12:38:14 +00:00
(link_to t('layout.users.reset_token'), reset_auth_token_admin_user_path(user), :method => :put, :confirm => t('layout.users.confirm_reset_token') if can? :edit, user),
2012-12-28 19:24:41 +00:00
(link_to t('layout.delete'), admin_user_path(user), :method => :delete, :confirm => t('layout.users.confirm_delete') if can? :destroy, user)
].compact.join(' | ').html_safe
[
user.uname,
link_block
]
end
json.sEcho params[:sEcho].to_i || -1
json.iTotalRecords @total_users
json.iTotalDisplayRecords @users.count
json.aaData users