<div class="page-header-title">
  <h1><%- @T( 'Package' ) %> <small><%- @T( 'Management' ) %></small></h1>
</div>

<!--
<ul class="nav nav-tabs nav-stacked">
  <li class=""><a data-type="" ><%- @T( 'Installed' ) %></a></li>
  <li class=""><a data-type="" ><%- @T( 'Store' ) %></a></li>
</ul>
-->
<p>
  <form action="<%= App.Config.get('api_path') %>/packages" method="post" enctype="multipart/form-data" class="horizontal center">
    <input type="file" name="file_upload"/>
    <button class="align-right btn btn--primary" type="submit"><%- @T('Install Package') %></button>
  </form>
</p>

<table class="table table-striped table-hover">
  <thead>
    <tr>
      <th><%- @T('Name') %></th>
      <th><%- @T('Version') %></th>
      <th><%- @T('Vendor') %></th>
      <th><%- @T('State') %></th>
      <th><%- @T('Action') %></th>
    </tr>
  </thead>
  <tbody>
  <% for item in @packages: %>
    <tr data-id="<%= item.id %>">
      <td><%= item.name %></td>
      <td><%= item.version %></td>
      <td><a href="<%- item.url %>" target="_blank"><%= item.vendor %></a></td>
      <td><%- @T(item.state) %></td>
      <td><% for action in item.action: %><a href="#" class="action" data-type="<%= action %>"><%- @T(action) %></a><br/><% end %></td>
    </tr>
  <% end %>
  </tbody>
</table>