<div id="left">

<div class="blue">Statistics</div>

<div class="articles">

You have <b><%= @page_count %></b> Pages
<br />
You have <b><%= @user_count %></b> Users
<br />
You have <b><%= @stat_count %></b> Hits
<br />
You have <b><%= @tag_count %></b> Tags
<br />

<% if defined?(RedCloth) %>
You have <b>Textile</b> (RedCloth) installed
<br />
<% end %>

<% if defined?(BlueCloth) %>
You have <b>Markdown</b> (BlueCloth) installed
<br />
<% end %>

<% if defined?(RubyPants) %>
You have <b>SmartyPants</b> (RubyPants) installed
<br />
<% end %>

<% if @last_hit %>
Your last 
<%= link_to_remote('hit', 
   			{ :update => "boxcontent", 
   			:loading => "showLoader()", 
   			:complete => "showBox()", 
   			:url => { :controller => 'stats', :action => 'overlay', :id => @last_hit } },
   			{ :href => url_for( :controller => 'stats', :action => 'show', :id => @last_hit ) } )%> was <b><%= distance_of_time_in_words_to_now(@last_hit.created_at) %></b> ago
<% end %>
</div>

<div class="blue">Current User</div>
<div class="articles">
The current user is <b><%=h @current_user.name %></b>
<br />
First name: <b><%=h @current_user.first_name %></b><br />
Last name: <b><%=h @current_user.last_name %></b><br />
Email: <b><%= mail_to @current_user.email, @current_user.email %></b><br />
</div>

<div class="blue">Help</div>
<div class="articles">
<a href="http://www.eribium.org">Erbium Home</a>
</div>

<div class="blue"><a href="#">Other News and Links &raquo;</a></div>
<div class="articles" id="planetnews">
<ul>
<% for feed_item in @latest_links.items %>
  
   <li><a href="<%= h feed_item.link %>"><%= feed_item.title %></a></li>
   
    <% end %>
 </ul>
</div>

</div>

<div id="content">

<div class="blue">Welcome</div>
<div class="articles">
Welcome to Erbium
<br />
Use these links to help get you started:
<ul>
<li><%= link_to("Create a page",:controller => 'page', :action => 'fnew') %></li>
<li><%= link_to("Update your profile or change your password", :controller => 'accounts' ) %></li>
<li><%= link_to("Check out your sites stats", :controller => 'stats' ) %></li>
<li><%= link_to("Change your site&#8217;s look or theme", :controller => 'presentation') %></li>
</ul>
</div>

<div class="blue">Latest Page Activity</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="100">Name</th>
	 				<th scope="col">Edited/Created</th>
	 				<th scope="col">Owner</th>
	 				<th scope="col">Actions</th>
	 			  </tr> 
		
  </thead>
<% for page in @last_page_edited %>
<tr>
<td width="100"><%= page.name %></td>
<td><%= distance_of_time_in_words_to_now page.updated_at %> ago</td>
<td><%= page.created_by %></td>
<td>
<%= link_to_remote('Overlay', 
   			{ :update => "boxcontent", 
   			:loading => "showLoader()", 
   			:complete => "showBox()", 
   			:url => { :controller => 'page', :action => 'overlay', :id => page } },
   			{ :href => url_for( :controller => 'page', :action => 'show', :id => page ) } )%>
   			
   			<%= link_to 'Edit', :controller => 'page', :action => 'fedit', :id => page %>
   			<%= link_to 'Show', :controller => 'page', :action => 'show', :id => page %>
   			<%= link_to 'Delete', :controller => 'page', :action => 'confirm_delete', :id => page %></td>
</tr>
<% end %>
</table>
</div>
</div>

<div class="blue"><a href="#">Latest News &raquo;</a></div>
<div class="articles" id="latest_news">
<% for feed_item in @latest_news %>
      <div class="articles">
        <h3><%= image_tag('news.gif') %><a href="<%= h feed_item.link %>">
                 <%= feed_item.title %></a> <b id="small_date">Published <%=  distance_of_time_in_words_to_now feed_item.published %> ago</b></h3> 
        <p><%= truncate feed_item.description, 60 %></p>
      </div><% end %>
</div>
<a href="http://www.eribium.org"><div class="articles">More &raquo;</div></a>
</div>
