|
|
<% content_for :head do %>
|
|
|
<%= stylesheet_link_tag 'scaffold' %>
|
|
|
<% end %>
|
|
|
|
|
|
<h1>Listing users</h1>
|
|
|
|
|
|
<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' %>
|
|
|
|