<!--TAG ZONE: tagsets-->
<div class="tag tagset">
  <!--Descriptive page name and system messages, descriptions, and instructions.-->
  <h2 class="heading">
    <% if @user %>
      <%= ts('%{user_name}\'s Tag Sets', :user_name => @user.login) %> <%= link_to_help 'tagset-about' %>
    <% elsif @restriction %>
      <%= ts('Tag Sets Used In This Challenge') %>
    <% elsif @query %>
      <%= search_header @tag_sets, nil, ts('Tag Set') %> <%= link_to_help 'tagset-about' %>
    <% else %>
      <%= ts('Tag Sets') %> <%= link_to_help 'tagset-about' %> <%= ts('in the %{archive_name}', :archive_name => ArchiveConfig.APP_NAME) %>
    <% end %>
  </h2>
  <!--/descriptions-->

  <!--Subnavigation, sorting and actions-->
  <ul class="navigation actions" role="navigation">
    <li class="search" role="search">
      <%= form_tag tag_sets_path, :class => "simple search", :method => :get do |form| %>
        <fieldset>
          <%= text_field_tag "query", @query, :title => ts('search') %>
          <%= submit_tag ts('Search') %>
        </fieldset>
      <% end %>
    </li>
    <% if logged_in? %>
  	  <li><%= link_to ts('New Tag Set'), new_tag_set_path %></li>
  	  <li><%= link_to ts('Tags'), tags_path %></li>
    <% end %>
  </ul>
  <!--/subnav-->

  <!--main content-->
  <% if @tag_sets.empty? %>
    <p><%= ts('No tag sets found.') %></p>
  <% else %>
    <% if @tag_sets.respond_to?(:total_pages) %>
      <%= will_paginate @tag_sets %>
    <% end %>

    <h3 class="landmark heading"><%= ts('Listing Tag Sets') %></h3>
	  <ul class="index group">
      <% @tag_sets.each do |tag_set| %>
        <%= render 'tag_set_blurb', :tag_set => tag_set %>
      <% end %>
    </ul>

    <% if @tag_sets.respond_to?(:total_pages) %>
      <%= will_paginate @tag_sets %>
    <% end %>
  <% end %>
  <!--/content-->
</div>