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

{% block title %}Budget List{% endblock %}

{% block budget_content %}
    <h2>Budget List</h2>
    
    <p>
        <a href="{% url 'budget_budget_add' %}">Add A Budget</a>
    </p>
    
    
    <table class="report_table">
        <thead>
            <tr>
                <th>Budget</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            {% if budgets %}
                {% for budget in budgets %}
                    <tr class="{% cycle 'odd' 'even' %}">
                        <td>{{ budget.name }}</td>
                        <td><a href="{% url 'budget_estimate_list' budget.slug %}">View/Add Estimates</a></td>
                        <td><a href="{% url 'budget_budget_edit' budget.slug %}">Edit Budget</a></td>
                    </tr>
                {% endfor %}
            {% else %}
                <tr>
                    <td colspan="3">No budgets found.</td>
                </tr>
            {% endif %}
        </tbody>
    </table>
    
    {% include 'budget/pagination.html' %}
{% endblock budget_content%}
