added table container
This commit is contained in:
parent
8d2492e6c8
commit
bd591594e7
4 changed files with 111 additions and 102 deletions
|
@ -1,35 +1,36 @@
|
||||||
{{locale}}
|
<div class="table-container">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{strings.date[locale]}}</th>
|
<th>{{strings.date[locale]}}</th>
|
||||||
<th>{{strings.via[locale]}}</th>
|
<th>{{strings.via[locale]}}</th>
|
||||||
<th>{{strings.from[locale]}}</th>
|
<th>{{strings.from[locale]}}</th>
|
||||||
<th>{{strings.amount[locale]}}</th>
|
<th>{{strings.amount[locale]}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for donation in donations[0].donations %}
|
{% for donation in donations[0].donations %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{donation.date}}</td>
|
<td>{{donation.date}}</td>
|
||||||
{% if donation.via == 'opencollective' %}
|
{% if donation.via == 'opencollective' %}
|
||||||
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
|
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>{{strings[donation.via][locale]}}</td>
|
<td>{{strings[donation.via][locale]}}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if donation.from %}
|
{% if donation.from %}
|
||||||
<td>{{donation.from}}</td>
|
<td>{{donation.from}}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>***</td>
|
<td>***</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{donation.amount | amount}} €</td>
|
<td>{{donation.amount | amount}} €</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="3">{{strings.total[locale]}}</th>
|
<th colspan="3">{{strings.total[locale]}}</th>
|
||||||
<th>{{donations[0].donations | sum | amount}} €</th>
|
<th>{{donations[0].donations | sum | amount}} €</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,38 +1,40 @@
|
||||||
{% for year in donations %}
|
{% for year in donations %}
|
||||||
<h2>{{year.year}}</h2>
|
<h2>{{year.year}}</h2>
|
||||||
|
|
||||||
<table class="table">
|
<div class="table-container">
|
||||||
<thead>
|
<table class="table">
|
||||||
<tr>
|
<thead>
|
||||||
<th>{{strings.date[locale]}}</th>
|
<tr>
|
||||||
<th>{{strings.via[locale]}}</th>
|
<th>{{strings.date[locale]}}</th>
|
||||||
<th>{{strings.from[locale]}}</th>
|
<th>{{strings.via[locale]}}</th>
|
||||||
<th>{{strings.amount[locale]}}</th>
|
<th>{{strings.from[locale]}}</th>
|
||||||
</tr>
|
<th>{{strings.amount[locale]}}</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
{% for donation in year.donations %}
|
<tbody>
|
||||||
<tr>
|
{% for donation in year.donations %}
|
||||||
<td>{{donation.date}}</td>
|
<tr>
|
||||||
{% if donation.via == 'opencollective' %}
|
<td>{{donation.date}}</td>
|
||||||
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
|
{% if donation.via == 'opencollective' %}
|
||||||
{% else %}
|
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
|
||||||
<td>{{strings[donation.via][locale]}}</td>
|
{% else %}
|
||||||
{% endif %}
|
<td>{{strings[donation.via][locale]}}</td>
|
||||||
{% if donation.from %}
|
{% endif %}
|
||||||
<td>{{donation.from}}</td>
|
{% if donation.from %}
|
||||||
{% else %}
|
<td>{{donation.from}}</td>
|
||||||
<td>***</td>
|
{% else %}
|
||||||
{% endif %}
|
<td>***</td>
|
||||||
<td>{{donation.amount | amount}} €</td>
|
{% endif %}
|
||||||
</tr>
|
<td>{{donation.amount | amount}} €</td>
|
||||||
{% endfor %}
|
</tr>
|
||||||
</tbody>
|
{% endfor %}
|
||||||
<tfoot>
|
</tbody>
|
||||||
<tr>
|
<tfoot>
|
||||||
<th colspan="3">{{strings.total[locale]}}</th>
|
<tr>
|
||||||
<th>{{year.donations | sum | amount}} €</th>
|
<th colspan="3">{{strings.total[locale]}}</th>
|
||||||
</tr>
|
<th>{{year.donations | sum | amount}} €</th>
|
||||||
</tfoot>
|
</tr>
|
||||||
</table>
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -1,33 +1,35 @@
|
||||||
<table class="table">
|
<div class="table-container">
|
||||||
<thead>
|
<table class="table">
|
||||||
<tr>
|
<thead>
|
||||||
<th>{{strings.name[locale]}}</th>
|
<tr>
|
||||||
<th>{{strings.type[locale]}}</th>
|
<th>{{strings.name[locale]}}</th>
|
||||||
<th>{{strings.provider[locale]}}</th>
|
<th>{{strings.type[locale]}}</th>
|
||||||
<th>{{strings.amount[locale]}} / {{strings.month[locale]}}</th>
|
<th>{{strings.provider[locale]}}</th>
|
||||||
<th>{{strings.amount[locale]}} / {{strings.year[locale]}}</th>
|
<th>{{strings.amount[locale]}} / {{strings.month[locale]}}</th>
|
||||||
</tr>
|
<th>{{strings.amount[locale]}} / {{strings.year[locale]}}</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
{% for expense in expenses %}
|
<tbody>
|
||||||
<tr>
|
{% for expense in expenses %}
|
||||||
{% if expense.name[locale] %}
|
<tr>
|
||||||
<td>{{expense.name[locale]}}</td>
|
{% if expense.name[locale] %}
|
||||||
{% else %}
|
<td>{{expense.name[locale]}}</td>
|
||||||
<td>{{expense.name}}</td>
|
{% else %}
|
||||||
{% endif %}
|
<td>{{expense.name}}</td>
|
||||||
<td>{{expense.type}}</td>
|
{% endif %}
|
||||||
<td>{{expense.provider}}</td>
|
<td>{{expense.type}}</td>
|
||||||
<td>{{expense.amount | amount}} €</td>
|
<td>{{expense.provider}}</td>
|
||||||
<td>{{expense.amount | year | amount}} €</td>
|
<td>{{expense.amount | amount}} €</td>
|
||||||
</tr>
|
<td>{{expense.amount | year | amount}} €</td>
|
||||||
{% endfor %}
|
</tr>
|
||||||
</tbody>
|
{% endfor %}
|
||||||
<tfoot>
|
</tbody>
|
||||||
<tr>
|
<tfoot>
|
||||||
<th colspan="3">{{strings.total[locale]}}</th>
|
<tr>
|
||||||
<th>{{expenses | sum | amount}} €</th>
|
<th colspan="3">{{strings.total[locale]}}</th>
|
||||||
<th>{{expenses | sum | year | amount}} €</th>
|
<th>{{expenses | sum | amount}} €</th>
|
||||||
</tr>
|
<th>{{expenses | sum | year | amount}} €</th>
|
||||||
</tfoot>
|
</tr>
|
||||||
</table>
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
|
@ -270,6 +270,10 @@ pre {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-container {
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
table.table {
|
table.table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
Loading…
Reference in a new issue