<div class="dashboard">
	<% content_for('tasks') do %>
	<%= subtab _("Typo documentation"), "", "http://typosphere.org/main_page" %>
  <% end %> 
  
  <h3><span><%= _("What can you do ?") %></span></h3>
  <ul>
    <%= content_tag :li, link_to(_('Write a post'), :controller => 'content', :action => 'new') -%>
    <%= content_tag :li, link_to(_("Update your profile or change your password"), 
      :controller => 'users', :action => 'edit', :id => session[:user_id]) -%>
    <%= content_tag :li, link_to(_("Change you blog presentation"), :controller => 'themes') -%>
    <%= content_tag :li, link_to(_("Enable plugins"), :controller => 'sidebar') -%>
  </ul>
</div>

<div class="dashboard">
  <h3><span><%= _("Last Comments") %></span></h3>
  <ul>
    <% if @comments.size == 0 %>
      <li><%= _("No comments yet") %></li>
    <% else %>
      <% for comment in @comments -%>
        <li>
          <% title = ''; title << 'by ' + comment.author -%>
          <% title << ' on ' + comment.article.title -%>
          <%= link_to_permalink comment,h(title) %>
        </li>
      <% end %>
    <% end %>
  </ul>
</div>

<div class="dashboard">
  <h3><span><%= _("Last posts") %></span></h3>
  <ul>
	<% if @recent_posts.size == 0 %>
      <li>No posts yet, why don't you start and <%= link_to "write one", :controller => 'content', :action => 'new' %> ?</li>
    <% else %>
      <% for post in @recent_posts -%>
        <li>
          <%= link_to_permalink post, post.title %> (<%= link_to_permalink(post, post.published_comments.size) %>)
        </li>
      <% end %> 
    <% end %>
  </ul>
</div>

<div class="dashboard">
  <h3><span><%= _("Most popular") %></span></h3>
  <ul>
    <% if @bestof.size == 0 %>
      <li>Nothing to show yet !</li>
    <% else %>
      <% for article in @bestof -%>
        <li><%= link_to_permalink article, article.title  %> (<%= link_to_permalink article, article.comment_count %>)</li>
      <% end %>
    <% end -%>
  </ul>
</div>

<br style="clear: both" />