<div id="dashboard" class="region" role="navigation region">
  <h3 class="landmark heading"><%= t(".landmark.dashboard") %></h3>
  <ul class="navigation actions">
    <li><%= span_if_current t(".dashboard"), collection_path(@collection), current_page?(collection_path(@collection)) && params[:show_random].blank? %></li>
    <li><%= span_if_current t(".profile"), collection_profile_path(@collection) %></li>
    <% if !@collection.collection_profile.faq.blank? %>
      <li><%= span_if_current t(".faq"), collection_profile_path(@collection, anchor: "faq") %></li>
    <% end %>
    <% if !@collection.collection_profile.rules.blank? %>
      <li><%= span_if_current t(".rules"), collection_profile_path(@collection, anchor: "rules") %></li>
    <% end %>

    <% if @collection.parent %>
      <li><%= link_to t(".parent_collection"), collection_path(@collection.parent) %></li>
    <% else %>
      <li><%= span_if_current t(".subcollections", count: @collection.children.count), collection_collections_path(@collection) %></li>
    <% end %>
  </ul>

  <!-- challenge section of dash -->
  <% if @collection.challenge %>
    <%= render partial: "challenge/#{challenge_class_name(@collection)}/challenge_sidebar" %>
  <% end %>

  <h4 class="landmark heading"><%= t(".landmark.contents") %></h4>
  <ul class="navigation actions">
    <li><%= span_if_current t(".fandoms", count: SearchCounts.fandom_count_for_collection(@collection)), collection_fandoms_path(@collection) %></li>

    <li><%= span_if_current t(".works", count: SearchCounts.work_count_for_collection(@collection)), collection_works_path(@collection) %></li>

    <li><%= span_if_current t(".bookmarks", count: SearchCounts.bookmarkable_count_for_collection(@collection)), collection_bookmarks_path(@collection) %></li>

    <li><%= span_if_current t(".random_items"), collection_path(@collection, show_random: true) %></li>
    <li><%= span_if_current t(".people"), collection_people_path(@collection) %></li>
    <li><%= span_if_current t(".tags"), collection_tags_path(@collection) %></li>
  </ul>

  <% if @collection.user_is_maintainer?(current_user) %>
    <h4 class="landmark heading"><%= t(".landmark.choices") %></h4>
    <ul class="navigation actions">
      <li><%= span_if_current(t(".manage_items"), collection_items_path(@collection)) %></li>
      <% if @collection.user_is_owner?(current_user) %>
        <% if @collection.challenge %>
          <% if @collection.prompt_meme? %>
            <li><%= span_if_current t(".challenge_settings"), edit_collection_prompt_meme_path(@collection) %></li>
          <% elsif @collection.gift_exchange? %>
            <li><%= span_if_current t(".challenge_settings"), edit_collection_gift_exchange_path(@collection) %></li>
          <% end %>
        <% end %>
          <li><%= span_if_current t(".collection_settings"), edit_collection_path(@collection) %></li>
      <% end %>
    </ul>
  <% end %>
</div>
