.yui-b.sidebar = render :partial => 'shared/admin_nav' #yui-main .yui-b -box do %h3 = configatron.community_name = :members.l = form_tag admin_users_url, :class => 'MainForm', :method => :get do %label= :user_login.l = text_field_tag 'login', params['login'] %label= :user_e_mail.l = text_field_tag 'email', params['email'] %p %input{:type=>"submit", :value=> :search_users.l } = paginate @users = form_tag delete_selected_users_path, :id => 'users' do %table{"cellspacing"=>"0", "border"=>"0", "cellpadding"=>"0", "width"=>"100%"} %thead %tr %th{:width => '60px', :colspan => '3'} %th=:login.l %th=:e_mail.l %th=:status.l %th=:actions.l %tbody - @users.each do |user| %tr{:id => "user_#{user.id}"} %td = link_to_remote(image_tag('icons/delete.png'), {:url => user_path(user), :method => :delete, :success => visual_effect(:fade, "user_#{user.id}"), :confirm => "Are you sure you want to permanently delete this user"} ) %td -if !configatron.akismet_key.nil? = link_to_remote(image_tag('icons/bad-flag.png'), {:url => user_path(user, :spam => true), :method => :delete, 500 => 'alert(\'Sorry, there was a server error\'); return false', :success => visual_effect(:fade, "user_#{user.id}"), :confirm => "Are you sure you want to permanently delete this user and mark it as spam!?"} ) %td= check_box_tag "delete[]", user.id %td -if user.avatar = image_tag user.avatar.photo.url(:thumb), :width => 25, :height => 25 = link_to h(user.login), user_path(user) %td = h user.email %td = user.active? ? :active.l : :inactive.l %td = link_to( :assume_id.l , assume_user_path(user), :method => :post ) = " | #{link_to(:activate.l, :controller => "/admin", :action => "activate_user", :id => user.id)}".html_safe unless user.active? %tfoot %tr %td{ :colspan => "4" } -if @users.any? %a{:href=>"#", :onclick=>"checkboxes.each(function(e){ e.checked = (e.checked == 0 ? 1 : 0) }); return false;"} Toggle all %p -if !configatron.akismet_key.nil? = check_box_tag :spam =:delete_selected_mark_as_spam.l %br = submit_tag :delete_selected.l = paginate @users -content_for :end_javascript do :javascript var form = $('users'); checkboxes = form.getInputs('checkbox');