<h1 class='page-header'>Packages</h1>

<div class="row">
  <div class="col-md-3">
    <div class="panel panel-default">
      <div class="panel-heading panel-heading-browse">
        <h2>Browse</h2>
      </div>
      <ul class="list-inline">

        <% @package_prefixes.each do |prefix| %>
          <li><h5><a href="/packages/<%= prefix %>/"><%= prefix %></a></h5></li>
        <% end %>
        <% if @package_prefixes.empty? %>
          <li><em>(no data yet)</em></li>
        <% end %>

      </ul>
    </div>
  </div>

  <div class="col-md-9">
    <table class="table" style="text-align: left">
      <tr>
        <th colspan='3'>Packages</th>
      </tr>
      <% @packages.in_groups_of(3).each do |packages| %>
        <tr>
          <% packages.each do |package| %>
          <td>
            <% if package %>
              <a href='<%= "/packages/#{@prefix}/#{package.name}/"%>'><%= package.name %></a>
            <% end %>
          </td>
        <% end %>
        </tr>
      <% end %>
    </table>
  </div>
</div>
