Show More
Commit Description:
add adding list of users...
Commit Description:
add adding list of users git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@7 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
app/views/user_admin/list.rhtml | 54 lines | 1.5 KiB | text/html+ruby | RhtmlLexer |
<h1>Listing users</h1>
<div class="usermenu">
<%= link_to 'Stat', :action => 'user_stat' %>
<%= link_to 'Main', :controller => 'main', :action => 'list' %>
</div>
<div style="border: solid 1px; margin: 2px">
<b>Quick add</b>
<% form_tag :action => 'create' do %>
<table border="0">
<tr>
<td><label for="user_name">Login</label></td>
<td><label for="user_name">Full name</label></td>
<td><label for="user_alias">Alias</label></td>
<td><label for="password">Password</label></td>
<td><label for="password_confirmation">confirm</label></td>
</tr>
<tr>
<td><%= text_field 'user', 'login', :size => 10 %></td>
<td><%= text_field 'user', 'full_name', :size => 30 %></td>
<td><%= text_field 'user', 'alias', :size => 10 %></td>
<td><%= password_field 'user', 'password', :size => 10 %></td>
<td><%= password_field 'user', 'password_confirmation', :size => 10 %></td>
<td><%= submit_tag "Create" %></td>
</tr></table>
<% end %>
</div>
<table>
<tr>
<% for column in User.content_columns %>
<th><%= column.human_name %></th>
<% end %>
</tr>
<% for user in @users %>
<tr>
<% for column in User.content_columns %>
<td><%=h user.send(column.name) %></td>
<% 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' %>