/
index.html.erb
101 lines (98 loc) · 2.41 KB
/
index.html.erb
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<% content_for :javascript_includes do %>
<%= javascript_include_tag "admin/admin" %>
<% end %>
<div class="admin-main-area">
<%= form_for @settings, :url => admin_update_path, :method => :post do |f| %>
<%= f.label :max_rooms, 'Max number of rooms' %>:
<%= f.text_field :max_rooms %><br />
<%= f.label :public_site, 'Is this a public site?' %>:
<%= f.check_box :public_site %><br />
<%= f.submit %>
<% end %>
<div class="waiting-for-approval-users">
<% if @waiting_for_approval_users.any? %>
<div>Users waiting for approval</div>
<table cellspacing="0" cellpadding="0" border="0">
<thead>
<tr>
<th class="">Username</th>
<th class="">First Name</th>
<th class="">Last Name</th>
<th class="">Email</th>
<th class="">Status</th>
<th class="">Action</th>
</tr>
</thead>
<tbody>
<% @waiting_for_approval_users.each do |user| %>
<tr class="<%= cycle('odd', 'even')%>" data-user-id="<%= user.id%>">
<td>
<%= user.username %>
</td>
<td>
<%= user.first_name %>
</td>
<td>
<%= user.last_name %>
</td>
<td>
<%= user.email %>
</td>
<td>
<%= user_status(user) %>
</td>
<td>
<%= user_action(user) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<div>There are no users. Invite others to join Kandan!</div>
<% end %>
</div>
<div class="approved-users">
<% if @approved_users.any? %>
<div>All users</div>
<table cellspacing="0" cellpadding="0" border="0">
<thead>
<tr>
<th class="">Username</th>
<th class="">First Name</th>
<th class="">Last Name</th>
<th class="">Email</th>
<th class="">Status</th>
<th class="">Action</th>
</tr>
</thead>
<tbody>
<% @approved_users.each do |user| %>
<tr class="<%= cycle('odd', 'even')%>" data-user-id="<%= user.id%>">
<td>
<%= user.username %>
</td>
<td>
<%= user.first_name %>
</td>
<td>
<%= user.last_name %>
</td>
<td>
<%= user.email %>
</td>
<td>
<%= user_status(user) %>
</td>
<td>
<%= user_action(user) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<div>There are no users. Invite others to join Kandan!</div>
<% end %>
</div>
</div>