<% content_for(:secondary_links) do %>
  <menu>
    <li><%= link_to "All", dmails_path(:search => {:owner_id => CurrentUser.id}, :folder => "all", :set_default_folder => true) %></li>
    <li><%= link_to "Received", dmails_path(:search => {:owner_id => CurrentUser.id, :to_id => CurrentUser.id}, :folder => "received", :set_default_folder => true) %></li>
    <li><%= link_to "Sent", dmails_path(:search => {:owner_id => CurrentUser.id, :from_id => CurrentUser.id}, :folder => "sent", :set_default_folder => true) %></li>
    <li><%= link_to "New", new_dmail_path %></li>
    <li><%= link_to "Search", search_dmails_path %></li>
    <li><%= link_to "Mark all as read", {:controller => "dmails", :action => "mark_all_as_read"}, :method => :post, :remote => true %></li>
  </menu>
<% end %>
