{% extends "base_view.html" %}

{% block title %} meliza-lab : orders {% endblock %}

{% block content %}
{% if order_list %}
<p class="lead">Orders:</p>
<table class="table table-striped table-condensed">
  <thead>
    <th>Order name</th>
    <th>Date</th>
    <th>Items</th>
    <th>PTAO</th>
  </thead>
  <tbody>
    {% for order in order_list %}
        <tr>
          <td><a href="{% url 'inventory:order' order.id %}">{{ order.name }}</a></td>
          <td>{{ order.order_date }}</td>
          <td>{{ order.item_count }}</td>
          <td>{{ order.ptao }}</td>
        </tr>
    {% endfor %}
  </tbody>
</table>
{% else %}
    <p class="lead">No orders are available.</p>
{% endif %}
<p><a href="{% url 'admin:inventory_order_add' %}">add new order</a></p>
{% endblock %}
