<html>
  <head>

  </head>
  <body>
    <ul class="breadcrumb">
      <li><a href="/administration">Administration</a> <span class="divider">/</span></li>
      <li class="active">Services</li>
      <li class="pull-right"><strong><a href="/registration">Register Service</a></strong></li>
    </ul>

    <div class="container">
      <h2>Services</h2>

      <table class="table table-borderless table-sortable">
        <thead>
          <tr>
            <th>Name</th>
            <th>Audience</th>
            <th>Enabled</th>
            <th></th>
          </tr>
        </thead>
        <tbody>
        <% @services.sort.each do |k, v| %>
          <tr>
            <td><%= v.name %></td>
            <td><%= v.audience %></td>
            <td><%= v.enabled %></td>
            <td>
              <a href="/administration/services/<%= k %>" class="btn btn-small">Show</a>
            </td>
          </tr>
        <% end %>
        </tbody>
      </table>

    </div>
  </body>
</html>

<html>
  <head>

  </head>
  <body>
    <ul class="breadcrumb">
      <li><a href="/administration">Administration</a> <span class="divider">/</span></li>
      <li class="active">Services</li>
      <li class="pull-right"><strong><a href="/registration">Register Service</a></strong></li>
    </ul>

    <div class="container">
      <h2>Services</h2>

      <table class="table table-borderless table-sortable">
        <thead>
          <tr>
            <th>Name</th>
            <th>Audience</th>
            <th>Enabled</th>
            <th></th>
          </tr>
        </thead>
        <tbody>
        <%- @services.sort_by { |k, v| [v.created_at || 0, v.name] }.each do |k, v| -%>
          <tr>
            <td><%= v.name %></td>
            <td><%= v.audience %></td>
            <td><%= v.enabled %></td>
            <td>
              <a href="/administration/services/<%= k %>" class="btn btn-small">Show</a>
            </td>
          </tr>
        <%- end -%>
        </tbody>
      </table>

    </div>
  </body>
</html>

Sort services UI by creation timestamp
Sort services UI by creation timestamp

At some point in the future, it would be nice to also show the creation
timestamp. Given that most services don't have one at the moment, we'll
leave that alone for now.

Fixes #9
