<% content_for(:secondary_links) do %>
  <menu>
    <li><%= render "pools/quick_search" %></li>
    <li><%= link_to "Listing", pools_path %></li>
    <li><%= link_to "New", new_pool_path %></li>
    <li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:pools"}) %></li>
    <% if CurrentUser.is_member? && @pool && !@pool.new_record? %>
      <li>|</li>
      <li><%= link_to "Show", pool_path(@pool) %></li>
      <li><%= link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %></li>
      <li><%= link_to "Edit", edit_pool_path(@pool) %></li>
      <% if @pool.deletable_by?(CurrentUser.user) %>
        <% if @pool.is_deleted? %>
          <li><%= link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %></li>
        <% else %>
          <li><%= link_to "Delete", pool_path(@pool), :method => :delete, :confirm => "Are you sure you want to delete this pool?", :remote => true %></li>
        <% end %>
      <% end %>
      <li><%= link_to "History", pool_versions_path(:search => {:pool_id => @pool.id}) %></li>
      <li><%= link_to "Order", edit_pool_order_path(@pool) %></li>
    <% end %>
  </menu>
<% end %>
