Show More
Commit Description:
added admin users management
Commit Description:
added admin users management
References:
File last commit:
Show/Diff file:
Action:
app/views/user_admin/list.rhtml
| 65 lines
| 2.0 KiB
| text/html+ruby
| RhtmlLexer
|
|
r25 | <h1>Listing users</h1> | ||
|
r0 | |||
|
r106 | <div class="submitbox"> | ||
|
r0 | <b>Quick add</b> | ||
<% form_tag :action => 'create' do %> | ||||
|
r106 | <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> | ||||
|
r162 | <td><label for="user_password_confirmation">Confirm</label></td> | ||
<td><label for="user_email">Email</label></td> | ||||
|
r106 | </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> | ||||
|
r162 | <td><%= text_field 'user', 'email', :size => 15 %></td> | ||
|
r106 | <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' %> | ||||
|
r0 | <% end %> | ||
|
r190 | <br/> | ||
<b>What else: </b> | ||||
<%= link_to '[New user]', :action => 'new' %> | ||||
<%= link_to '[New list of users]', :action => 'new_list' %> | ||||
|
r233 | <%= link_to '[View administrators]', :action => 'admin' %> | ||
|
r200 | <%= link_to '[Random passwords]', :action => 'random_all_passwords' %> | ||
|
r190 | <%= link_to '[View active users]', :action => 'active' %> | ||
|
r0 | |||
</div> | ||||
|
r190 | |||
|
r0 | <table> | ||
<tr> | ||||
<% for column in User.content_columns %> | ||||
|
r162 | <% if !@hidden_columns.index(column.name) %> | ||
<th><%= column.human_name %></th> | ||||
<% end %> | ||||
|
r0 | <% end %> | ||
</tr> | ||||
<% for user in @users %> | ||||
<tr> | ||||
<% for column in User.content_columns %> | ||||
|
r162 | <% if !@hidden_columns.index(column.name) %> | ||
<td><%=h user.send(column.name) %></td> | ||||
<% end %> | ||||
|
r0 | <% 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' %> | ||||
|
r4 | <%= link_to 'New list of users', :action => 'new_list' %> | ||