20 lines
803 B
Plaintext
20 lines
803 B
Plaintext
{
|
|
"sEcho": <%=h params[:sEcho].to_i || -1 %>,
|
|
"iTotalRecords": <%= @total_users %>,
|
|
"iTotalDisplayRecords": <%= @total_user %>,
|
|
"aaData": [
|
|
<% @users.each do |user| %>
|
|
[
|
|
"<%= user.name %>",
|
|
"<%= user.uname %>",
|
|
"<%= user.email %>",
|
|
"<span style='<%=user.access_locked? ? 'background: #FEDEDE' : ''%>'><%= user.role %></span>",
|
|
"<%= j raw [(link_to t('layout.show'), user if can? :read, user),
|
|
(link_to t('layout.edit'), edit_admin_user_path(user) if can? :edit, user),
|
|
(link_to t('layout.delete'), admin_user_path(user), :method => :delete, :confirm => t('layout.users.confirm_delete') if can? :destroy, user)
|
|
].compact.join(' | ') %>"
|
|
]<%= user == @users.last ? '' : ',' %>
|
|
<% end %>
|
|
]
|
|
}
|