<div class="opendoors">
<!--Descriptive page name and system messages, descriptions, and instructions.-->
<h2 class="heading">
  <%= @query ? ts("External Author Identities") : ts("Unclaimed External Author Identities") %>
</h2>
<!--/descriptions-->

<!--subnav-->
<%= render "opendoors/tools/tools_navigation" %>
<!--/subnav-->

<!--main content-->
<% if @external_authors.empty? %>
  <h3 class="heading"><%= ts("No matching external authors found.") %></h3>
  <p class="note"><%= ts("Please try a different search.") %></p>
<% else %>
  <%= will_paginate @external_authors %>

  <h3 class="landmark heading"><%= ts("Listing External Authors") %></h3>
  <% if params[:query] %><h3 class="heading"><%= ts("Matching: %{query}", :query => params[:query]) %></h3><% end %>
	<dl class="index group">
    <% @external_authors.each do |external_author| %>
      <dt>
        <%= external_author.email %>
        <% if external_author.claimed? %>
          <span class="claim">(Claimed by <%= link_to external_author.user.login, external_author.user %>)</span>
        <% end %>
      </dt>
      <dd>       
        <ul class="actions" role="menu">
          <li><%= link_to ts("Show"), opendoors_external_author_path(external_author) %></li>
          <% unless external_author.claimed? %>
            <li>
              <%= form_tag forward_opendoors_external_author_path(external_author) do %>
                <fieldset>
                  <%= label_tag "email", ts("Forward To:") %>
                  <%= text_field_tag "email"%>
                  <%= submit_button %>
                </fieldset>
              <% end %> 
            </li>
          <% end %>
        </ul>
      </dd>
    <% end %>
  </dl>

  <%= will_paginate @external_authors %>
<% end %>
</div>