{% extends 'budget/base.html' %}

{% block title %}Category List{% endblock title %}

{% block budget_content %}
    <h2>Category List</h2>
    
    <p>
        <a href="{% url 'budget_category_add' %}">Add A Category</a>
    </p>
    
    <table class="report_table">
        <thead>
            <tr>
                <th>Name</th>
            </tr>
        </thead>
        <tbody>
            {% if categories %}
                {% for category in categories %}
                    <tr class="{% cycle 'odd' 'even' %}">
                        <td><a href="{% url 'budget_category_edit' category.slug %}">{{ category.name }}</a></td>
                    </tr>
                {% endfor %}
            {% else %}
                <tr>
                    <td>No categories found.</td>
                </tr>
            {% endif %}
        </tbody>
    </table>
    
    {% include 'budget/pagination.html' %}
{% endblock budget_content %}
