<% content_for(:secondary_links) do %>
  <menu>
    <li><%= link_to "Listing", favorite_groups_path %></li>
    <% if CurrentUser.is_member? %>
      <li><%= link_to "New", new_favorite_group_path %></li>
    <% end %>
    <li><%= link_to "Help", wiki_pages_path(:title => "help:favorite_groups") %></li>

    <% if @favorite_group && !@favorite_group.new_record? %>
      <li>|</li>
      <li><%= link_to "Show", favorite_group_path(@favorite_group) %></li>
      <li><%= link_to "Posts", posts_path(:tags => "favgroup:#{@favorite_group.id}") %></li>
      <% if @favorite_group.editable_by?(CurrentUser.user) %>
        <li><%= link_to "Edit", edit_favorite_group_path(@favorite_group) %></li>
        <li><%= link_to "Delete", favorite_group_path(@favorite_group), :method => :delete, :data => {:confirm => "Are you sure you want to delete this favorite group?"} %></li>
        <% if @favorite_group.post_count <= 100 %>
          <li><%= link_to "Order", edit_favorite_group_order_path(@favorite_group) %></li>
        <% end %>
      <% end %>
    <% end %>
  </menu>
<% end %>
