<div id="left">
<div class="blue">Actions</div>
<div class="articles">
<%= link_to 'New user', :action => 'new' %>
</div>
</div>

<div id="content">

<div class="blue">Listing users</div>
<div class="articles">


<div id="tablediv">
<table id="user-list" class="list" cellpadding="0" cellspacing="0">
  <thead>  

	 			  <tr class="header">
	 				<th scope="col" width="150">Name</th>
	 				<th scope="col">Edited/Created</th>
	 				<th scope="col">Actions</th>
	 			  </tr> 
		
  </thead>
  <tfoot>
  		  <tr>		<% if pagination_links(@user_pages) %>
  		  		<th scope="row">Page: </th>
  		  		<td colspan="4"><%= pagination_links(@user_pages) -%></td>
  		  		<% end %>
  		</tr>
 </tfoot>
  <tbody>
  
  
<% for user in @users %>
  <tr>
  
    <td><%=h user.name %></td>
    <td><%= distance_of_time_in_words_to_now user.updated_at %> ago</td>
  
    <td><%= link_to 'Show', :action => 'show', :id => user %>
    <%= link_to 'Edit', :action => 'edit', :id => user %>
    <%= link_to 'Delete', { :action => 'confirm_delete', :id => user } %></td>
  </tr>
<% end %>
</table>
</div>



</div>

<div class="blue">Your Profile</div>
<div class="articles">
<%= start_form_tag :action => 'update_current_user', :id => @current_user %>
<div class="red">Actions</div>
<div class="articles">
 <%= submit_tag 'Save', :class => 'submit' %>
</div>

<!--[user:user]-->
<div class="articles">
<label for="user_name">UserName</label><br/>
<%= text_field 'current_user', 'name'  %>
</div>

<div class="articles">
<label for="password">Password</label><br/>
<%= password_field 'current_user', 'password'  %>
</div>

<div class="articles">
<label for="password">Confirm Password</label><br/>
<%= password_field 'current_user', 'password_confirmation'  %>
</div>

<div class="blue" onclick="Element.toggle('advanced')"><a href="#">Advanced &raquo;</a></div>
<div class="articles" id="advanced">

<p><label for="user_email">Email</label><br/>
<%= text_field 'current_user', 'email'  %></p>

<p><label for="user_first_name">First name</label><br/>
<%= text_field 'current_user', 'first_name'  %></p>

<p><label for="user_last_name">Last name</label><br/>
<%= text_field 'current_user', 'last_name'  %></p>

<p><label for="user_description">Description</label><br/>
<%= text_area 'current_user', 'description', :cols => 63, :rows => 10  %></p>

<p><label for="user_photo">Photo (href)</label><br/>
<%= text_field 'current_user', 'photo'  %></p>

</div>

<br />

<script type="text/javascript">
$('advanced').style.display = "none";
</script>
<!--[eouser:user]-->

<%= end_form_tag %>
</div>
</div>
