Show More
Commit Description:
fixed new users import bug when passwords contain extra spaces at the end
Commit Description:
fixed new users import bug when passwords contain extra spaces at the end
References:
File last commit:
Show/Diff file:
Action:
app/views/user_admin/list.rhtml
| 85 lines
| 2.9 KiB
| text/html+ruby
| RhtmlLexer
|
|
r25 | <h1>Listing users</h1> | ||
|
r0 | |||
|
r106 | <div class="submitbox"> | ||
|
r267 | <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> | ||||
<td><%= text_field 'user', 'email', :size => 15 %></td> | ||||
<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' %> | ||||
|
r280 | <% if Configuration.multicontests? %> | ||
|
r297 | <br/><b>Multi-contest:</b> | ||
|
r280 | <%= link_to '[Manage bulk users in contests]', :action => 'contest_management' %> | ||
|
r297 | 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' %> | ||||
|
r280 | <% end %> | ||
|
r0 | </div> | ||
|
r190 | |||
|
r300 | 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 %> | ||||
|
r280 | <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 %> | ||||
|
r162 | <% end %> | ||
|
r280 | <th></th> | ||
<th></th> | ||||
<th></th> | ||||
|
r0 | </tr> | ||
<% for user in @users %> | ||||
|
r280 | <tr class="info-<%= cycle("odd","even") %>"> | ||
<% for column in User.content_columns %> | ||||
<% if !@hidden_columns.index(column.name) %> | ||||
<td><%=h user.send(column.name) %></td> | ||||
<% end %> | ||||
|
r162 | <% end %> | ||
|
r0 | <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 /> | ||||
|
r299 | <%= link_to '[New user]', :action => 'new' %> | ||
<%= link_to '[New list of users]', :action => 'new_list' %> | ||||