Show More
Commit Description:
more heart beat feature...
Commit Description:
more heart beat feature
add reset last login ip
(grafted from 6efa41a1cfdc5e910b85eec6d8b874ed651776bd)
References:
File last commit:
Show/Diff file:
Action:
app/views/user_admin/contests.html.erb
| 66 lines
| 2.2 KiB
| text/plain
| TextLexer
|
|
r297 | <h1> | ||
List users in <% if @contest %><%= @contest.title %> | ||||
<% else %>Users not in any contests<% end %> | ||||
</h1> | ||||
<div class="submitbox"> | ||||
<%= link_to '[View all users]', :action => 'list' %> | ||||
|
r320 | <% if GraderConfiguration.multicontests? %> | ||
|
r297 | <%= link_to '[Manage bulk users in contests]', :action => 'contest_management' %> | ||
<br/> | ||||
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 %> | ||||
|
r298 | <br/> | ||
|
r319 | <%= form_tag :action => 'assign_from_list' do %> | ||
|
r298 | <%= hidden_field_tag 'users_contest_id', (@contest ? @contest.id : 'none') %> | ||
Assign all to | ||||
<%= select("new_contest","id",Contest.all.collect {|c| [c.title, c.id]}) %> | ||||
<%= submit_tag "Assign", :confirm => 'Are you sure?' %> | ||||
<% end %> | ||||
|
r297 | </div> | ||
<table class="info"> | ||||
<tr class="info-head"> | ||||
<th>Login</th> | ||||
<th>Full name</th> | ||||
<th>Email</th> | ||||
<th>Activated?</th> | ||||
<th></th> | ||||
<th></th> | ||||
<th></th> | ||||
|
r320 | <% if GraderConfiguration.multicontests? %> | ||
|
r297 | <th>Contests</th> | ||
<th>Other enabled contests</th> | ||||
<% end %> | ||||
</tr> | ||||
<% for user in @users %> | ||||
<tr class="info-<%= cycle("odd","even") %>"> | ||||
<td><%=h user.login %></td> | ||||
<td><%=h user.full_name %></td> | ||||
<td><%=h user.email %></td> | ||||
<td><%=h user.activated %></td> | ||||
<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> | ||||
|
r320 | <% if GraderConfiguration.multicontests? %> | ||
|
r297 | <td> | ||
<% user.contests.each do |contest| %> | ||||
<%= contest.name %> [<%= link_to 'x', :action => 'remove_from_contest', :id => user.id, :contest_id => contest.id %>] | ||||
<% end %> | ||||
</td> | ||||
<td> | ||||
<% @contests.each do |contest| %> | ||||
<% if not user.contests.all.find {|c| c.id==contest.id } %> | ||||
<%= contest.name %> [<%= link_to '+', :action => 'add_to_contest', :id => user.id, :contest_id => contest.id %>] | ||||
<% end %> | ||||
<% end %> | ||||
</td> | ||||
<% end %> | ||||
</tr> | ||||
<% end %> | ||||
</table> | ||||