Update snapshot table to hide account on account page (#7)
This commit is contained in:
parent
39b620135a
commit
695e1d4d52
2 changed files with 17 additions and 13 deletions
|
@ -12,7 +12,9 @@
|
|||
.table.col6 {grid-template-columns: repeat(6, auto)}
|
||||
.table.col1-1 {grid-template-columns: min-content auto}
|
||||
.table.col1-1-1 {grid-template-columns: min-content auto min-content}
|
||||
.table.col2-4 {grid-template-columns: repeat(2, min-content) repeat(4, auto)}
|
||||
.table.col1-5 {grid-template-columns: min-content repeat(5, auto)}
|
||||
.table.col2-5 {grid-template-columns: repeat(2, min-content) repeat(5, auto)}
|
||||
.table.col1-6 {grid-template-columns: min-content repeat(6, auto)}
|
||||
.table.col1-7 {grid-template-columns: min-content repeat(7, auto)}
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
<div id="snapshots" class="table col1-6">
|
||||
<div id="snapshots" class="table {% if account %}col2-4{% else %}col2-5{% endif %}">
|
||||
<div class="header">
|
||||
<strong class="diff center"><i class="fa fa-check"></i></strong>
|
||||
<strong class="attach center"><i class="fa fa-paperclip"></i></strong>
|
||||
<strong class="date center">{% translate "Date" %}</strong>
|
||||
<strong class="account center">{% translate "Account" %}</strong>
|
||||
{% if not account %}
|
||||
<strong class="account center">{% translate "Account" %}</strong>
|
||||
{% endif %}
|
||||
<strong class="value center">{% translate "Value" %}</strong>
|
||||
<strong class="diff center">{% translate "Difference" %}</strong>
|
||||
<strong class="diff center">{% translate "Transactions" %}</strong>
|
||||
<strong class="diff center">{% translate "Valid" %}</strong>
|
||||
</div>
|
||||
{% if new_snapshot_url %}
|
||||
<div class="full-line">
|
||||
|
@ -17,6 +19,13 @@
|
|||
{% endif %}
|
||||
{% for snap in snapshots %}
|
||||
<div class="snapshot">
|
||||
<span class="valid center">
|
||||
{% if snap.sum == snap.diff %}
|
||||
<i class="fa fa-check green"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-xmark red"></i>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="attach center">
|
||||
{% if snap.file %}
|
||||
<a href="{{ snap.file.url }}">
|
||||
|
@ -27,22 +36,15 @@
|
|||
<span class="date num center">
|
||||
<a href="{% url 'snapshot' pk=snap.id %}">{{ snap.date|date:"Y-m-d" }}</a>
|
||||
</span>
|
||||
{% if not account %}
|
||||
<span class="account text center">
|
||||
<i class="fa fa-{{ snap.account.icon }}"></i>
|
||||
<a href="{% url 'account' pk=snap.account.id %}">{{ snap.account }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="value num right">{{ snap.value|value }}</span>
|
||||
<span class="diff num right">{{ snap.diff|pmvalue }}</span>
|
||||
{% with sum=snap.sum %}
|
||||
<span class="sum num right">{{ sum|pmvalue }}</span>
|
||||
<span class="valid center">
|
||||
{% if sum == snap.diff %}
|
||||
<i class="fa fa-check green"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-xmark red"></i>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endwith %}
|
||||
<span class="sum num right">{{ snap.sum|pmvalue }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if snapshots_url %}
|
||||
|
|
Loading…
Reference in a new issue