{% extends 'layouts/default.twig' %}

{% block title %}List of Hardware{% endblock %}

{% block content %}
<div class="row">
  <h2>Hardware</h2>
  <a href="/hardware/add">Add new hardware</a>

  <div class="col-12">
    <table class="table table-responsive table-hover">
      <thead>
        <tr>
          <td>Name</td>
          <td>Type</td>
          <td>Created at</td>
          <td>Last updated</td>
        </tr>
      </thead>
      <tbody>
        {% for h in hardware %}
          <tr>
            <td><a href="/hardware/{{ h.id }}">{{ h.name }}</a></td>
            <td>{{ h.type }}</td>
            <td>{{ p.createdAt | date('m/d/Y g:ia') }}</td>
            <td>{{ p.updatedAt | date('m/d/Y g:ia') }}</td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
</div>
{% endblock %}
