{% extends "sada/base.html" %}

{% block content %}
<h2>Product List</h2>
<a href="{% url 'product_create' %}">New Product</a>
<ul>
    {% for product in product_list %}
    <li>
        <h3><a href="{% url 'product_detail' product.id %}">{{ product.name }}</a></h3>
        <p>{{ product.description }}</p>
        <a href="{% url 'product_edit' product.id %}">Edit</a> |
        <a href="{% url 'product_delete' product.id %}">Delete</a>
    </li>
    {% empty %}
    <li>No products available.</li>
    {% endfor %}
</ul>
{% endblock %}