Show More
Commit Description:
add heart_beat...
Commit Description:
add heart_beat
(grafted from baf0af002308b84f920a384166b4265c82124159)
References:
File last commit:
Show/Diff file:
Action:
app/views/user_admin/list.html.erb
| 87 lines
| 3.1 KiB
| text/plain
| TextLexer
|
|
r320 | <h1>Listing users</h1> | ||
<div class="submitbox"> | ||||
<b>Quick add</b> | ||||
<%= form_tag :action => 'create' do %> | ||||
<table border="0"> | ||||
<tr> | ||||
<td><label for="user_login">Login</label></td> | ||||
<td><label for="user_full_name">Full name</label></td> | ||||
<td><label for="user_password">Password</label></td> | ||||
<td><label for="user_password_confirmation">Confirm</label></td> | ||||
<td><label for="user_email">Email</label></td> | ||||
</tr> | ||||
<tr> | ||||
<td><%= text_field 'user', 'login', :size => 10 %></td> | ||||
<td><%= text_field 'user', 'full_name', :size => 30 %></td> | ||||
<td><%= password_field 'user', 'password', :size => 10 %></td> | ||||
<td><%= password_field 'user', 'password_confirmation', :size => 10 %></td> | ||||
|
r378 | <td><%= email_field 'user', 'email', :size => 15 %></td> | ||
|
r320 | <td><%= submit_tag "Create" %></td> | ||
</tr> | ||||
</table> | ||||
<% end %> | ||||
<br/> | ||||
<b>Import from site management</b> | ||||
<%= form_tag({:action => 'import'}, :multipart => true) do %> | ||||
File: <%= file_field_tag 'file' %> <%= submit_tag 'Import' %> | ||||
<% end %> | ||||
<br/> | ||||
<b>What else: </b> | ||||
<%= link_to '[New user]', :action => 'new' %> | ||||
<%= link_to '[New list of users]', :action => 'new_list' %> | ||||
<%= link_to '[View administrators]', :action => 'admin' %> | ||||
<%= link_to '[Random passwords]', :action => 'random_all_passwords' %> | ||||
<%= link_to '[View active users]', :action => 'active' %> | ||||
<%= link_to '[Mass mailing]', :action => 'mass_mailing' %> | ||||
<% if GraderConfiguration.multicontests? %> | ||||
<br/><b>Multi-contest:</b> | ||||
<%= link_to '[Manage bulk users in contests]', :action => 'contest_management' %> | ||||
View users in: | ||||
<% @contests.each do |contest| %> | ||||
<%= link_to "[#{contest.name}]", :action => 'contests', :id => contest.id %> | ||||
<% end %> | ||||
<%= link_to "[no contest]", :action => 'contests', :id => 'none' %> | ||||
<% end %> | ||||
</div> | ||||
Total <%= @user_count %> users | | ||||
<% if !@paginated %> | ||||
Display all users. | ||||
<%= link_to '[show in pages]', :action => 'list', :page => '1' %> | ||||
<% else %> | ||||
Display in pages. | ||||
<%= link_to '[display all]', :action => 'list', :page => 'all' %> | | ||||
<%= will_paginate @users, :container => false %> | ||||
<% end %> | ||||
<table class="info"> | ||||
<tr class="info-head"> | ||||
<% for column in User.content_columns %> | ||||
<% if !@hidden_columns.index(column.name) %> | ||||
<th><%= column.human_name %></th> | ||||
<% end %> | ||||
<% end %> | ||||
<th></th> | ||||
<th></th> | ||||
<th></th> | ||||
</tr> | ||||
<% for user in @users %> | ||||
<tr class="info-<%= cycle("odd","even") %>"> | ||||
r450 | <td><%= link_to user.login, controller: :users, :action => 'profile', :id => user %></td> | |||
|
r320 | <% for column in User.content_columns %> | ||
r450 | <% if !@hidden_columns.index(column.name) and column.name != 'login' %> | |||
|
r320 | <td><%=h user.send(column.name) %></td> | ||
<% end %> | ||||
<% end %> | ||||
<td><%= link_to 'Show', :action => 'show', :id => user %></td> | ||||
<td><%= link_to 'Edit', :action => 'edit', :id => user %></td> | ||||
<td><%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post %></td> | ||||
</tr> | ||||
<% end %> | ||||
</table> | ||||
<br /> | ||||
<%= link_to '[New user]', :action => 'new' %> | ||||
<%= link_to '[New list of users]', :action => 'new_list' %> | ||||