<% content_for :page_title, 'Redirect whitelist' %>

<div class="page-title">
  <h1>
    Redirection whitelist<br/>
    <small>
      You can only create redirects if they go to a domain on this list or the domain ends in .gov.uk or .mod.uk.
    </small>
  </h1>
</div>

<div class="pull-left add-bottom-margin">
  <h2><%= @whitelisted_hosts.count %> whitelisted domains</h2>
  <%= link_to new_admin_whitelisted_host_path, class: 'btn btn-default' do %>
    <i class="glyphicon glyphicon-plus"></i> Add domain
  <% end %>
</div>

<table class="table table-striped table-bordered">
  <thead>
    <tr class="table-header">
      <th>Domain</th>
      <th>Added</th>
      <th>Added by</th>
    </tr>
  </thead>
  <tbody>
    <% @whitelisted_hosts.each do |host| %>
      <tr>
        <td><%= host.hostname %></td>
        <td><%= I18n.l host.created_at, :format => :govuk_date %></td>
        <td><%= host.originator %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<% content_for :page_title, 'Redirect whitelist' %>

<div class="page-title">
  <h1>
    Redirection whitelist<br/>
    <small>
      You can only create redirects if they go to a domain on this list or the domain ends in .gov.uk or .mod.uk.
    </small>
  </h1>
</div>

<div class="pull-left add-bottom-margin">
  <h2><%= @whitelisted_hosts.count %> whitelisted domains</h2>
  <%= link_to new_admin_whitelisted_host_path, class: 'btn btn-default' do %>
    <i class="glyphicon glyphicon-plus"></i> Add domain
  <% end %>
</div>

<table class="table table-striped table-bordered" data-module="filterable-table">
  <thead>
    <tr class="table-header">
      <th>Domain</th>
      <th>Added</th>
      <th>Added by</th>
    </tr>
    <tr class="if-no-js-hide table-header-secondary">
      <td colspan="3">
        <form>
          <label for="whitelist-filter" class="rm">Filter whitelist</label>
          <input id="whitelist-filter" type="text" class="form-control normal js-filter-table-input" placeholder="Filter whitelist">
        </form>
      </td>
    </tr>
  </thead>
  <tbody>
    <% @whitelisted_hosts.each do |host| %>
      <tr>
        <td><%= host.hostname %></td>
        <td><%= I18n.l host.created_at, :format => :govuk_date %></td>
        <td><%= host.originator %></td>
      </tr>
    <% end %>
  </tbody>
</table>

Add filtering to the whitelist view
Add filtering to the whitelist view

- This behaves more like the organisation view.
