This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
/
users.html.haml
executable file
·71 lines (60 loc) · 3.1 KB
/
users.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.yui-b.sidebar
= render :partial => 'shared/admin_nav'
#yui-main
.yui-b
-box do
%h3
= AppConfig.community_name
= :members.l
- form_tag admin_users_url, :class => 'MainForm' 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 }
-if @users.page_count > 1
.pagination= paginating_links @users, :link_to_current_page => true
- 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', :plugin => 'community_engine'), {: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 AppConfig.akismet_key
= link_to_remote(image_tag('icons/bad-flag.png', :plugin => 'community_engine'), {: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
= 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) )
= (" | " + link_to(:activate.l, :controller => "/admin", :action => "activate_user", :id => user.id)) 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 AppConfig.akismet_key
= check_box_tag :spam
=:delete_selected_mark_as_spam.l
%br
= submit_tag :delete_selected.l
-if @users.page_count > 1
.pagination= paginating_links @users, :link_to_current_page => true
%script{:type => 'text/javascript'}
var form = $('users');
checkboxes = form.getInputs('checkbox');