<% title _("Domains") %>

<% title_actions display_link_if_authorized(_("New Domain"), hash_for_new_domain_path), help_path %>

<table class="table table-bordered table-striped table-two-pane">
  <tr>
    <th><%= sort :name, :as => s_("Domain|Fullname") %></th>
    <th><%=  _("Hosts") %></th>
    <th></th>
  </tr>
  <% for domain in @domains %>
    <tr>
      <td><%= link_to_if_authorized h(domain.fullname.empty? ? domain.name : domain.fullname), hash_for_edit_domain_path(:id => domain)%></td>
      <td><%= link_to @host_counter[domain.id] || 0, hosts_path(:search => "domain = #{domain}") %>
      <td><%= display_delete_if_authorized hash_for_domain_path(:id => domain), :confirm => _("Delete %s?") % domain.name %></td>
    </tr>
  <% end %>
</table>
<%= page_entries_info @domains %>
<%= will_paginate     @domains %>
