{% for year in donations %}
<h2>{{year.year}}</h2>

<div class="table-container">
    <table class="table">
        <thead>
        <tr>
            <th>{{strings.donations.date}}</th>
            <th>{{strings.donations.via}}</th>
            <th>{{strings.donations.from}}</th>
            <th>{{strings.donations.amount}}</th>
        </tr>
        </thead>
        <tbody>
        {% for donation in year.donations %}
        <tr>
            <td>{{donation.date}}</td>
            <td>{{strings.donations[donation.via]}}</td>
            {% if donation.from %}
            <td>{{donation.from}}</td>
            {% else %}
            <td>***</td>
            {% endif %}
            <td>{{donation.amount | amount}} €</td>
        </tr>
        {% endfor %}
        </tbody>
        <tfoot>
        <tr>
            <th colspan="3">{{strings.donations.total}}</th>
            <th>{{year.donations | sum | amount}} €</th>
        </tr>
        </tfoot>
    </table>
</div>
{% endfor %}
