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

{% block page_name %}Transaction Legs{% endblock %}
{% block page_description %}See all legs{% endblock %}

{% block content %}
    <table class="table table-striped">
        <thead>
            <tr>
                <th>Transaction UUID</th>
                <th>Leg UUID</th>
                <th>Type</th>
                <th>Account</th>
                <th>Amount</th>
                <th>Description</th>
            </tr>
        </thead>
        <tbody>
            {% for leg in legs %}
            <tr>
                <td><code>{{ leg.transaction.uuid }}</code></td>
                <td><code>{{ leg.uuid }}</code></td>
                <td>{{ leg.type|title }}</td>
                <td>{{ leg.account.name }}</td>
                <td style="text-align: right;">{{ leg.amount }}</td>
                <td>{{ leg.description }}</td>
             </tr>
            {% empty %}
                <tr>
                <td colspan="6" class="text-center">No leg exist</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>

{% endblock %}
