Compare commits
No commits in common. "63253526fa8ae74c59c4fea9a43ede174a416e74" and "39b620135a36a587d027c6f8dcfdf29cef549e84" have entirely different histories.
63253526fa
...
39b620135a
4 changed files with 39 additions and 56 deletions
|
@ -12,9 +12,7 @@
|
|||
.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,17 +1,14 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
<div id="snapshots"
|
||||
class="table {% if account %}col2-4{% else %}col2-5{% endif %}">
|
||||
<div id="snapshots" class="table col1-6">
|
||||
<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>
|
||||
{% 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">
|
||||
|
@ -20,13 +17,6 @@
|
|||
{% 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 }}">
|
||||
|
@ -37,15 +27,22 @@
|
|||
<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>
|
||||
<span class="sum num right">{{ snap.sum|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 %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if snapshots_url %}
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
{% load main_extras %}
|
||||
{% load i18n %}
|
||||
<div id="transactions"
|
||||
class="table col1-{% if account or category %}6{% else %}7{% endif %}">
|
||||
<div id="transactions" class="table col1-7">
|
||||
<div class="header">
|
||||
<strong class="attach center"><i class="fa fa-paperclip"></i></strong>
|
||||
<strong class="date center">{% translate "Date" %}</strong>
|
||||
<strong class="name">{% translate "Name" %}</strong>
|
||||
<strong class="value center">{% translate "Value" %}</strong>
|
||||
<strong class="trader center">{% translate "Trader" %}</strong>
|
||||
{% if not category %}
|
||||
<strong class="category center">{% translate "Category" %}</strong>
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<strong class="account center">{% translate "Account" %}</strong>
|
||||
{% endif %}
|
||||
<strong class="description">{% translate "Description" %}</strong>
|
||||
</div>
|
||||
{% if new_transaction_url %}
|
||||
|
@ -36,7 +31,6 @@
|
|||
<span class="name text"><a href="{% url 'transaction' pk=trans.id %}">{{ trans.name }}</a></span>
|
||||
<span class="value num right">{{ trans.value|pmvalue }}</span>
|
||||
<span class="trader text center">{{ trans.trader|default_if_none:"–" }}</span>
|
||||
{% if not category %}
|
||||
<span class="category text center">
|
||||
{% if trans.category %}
|
||||
<i class="fa fa-{{ trans.category.icon }}"></i>
|
||||
|
@ -45,8 +39,6 @@
|
|||
–
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not account %}
|
||||
<span class="account text center">
|
||||
{% if trans.account %}
|
||||
<i class="fa fa-{{ trans.account.icon }}"></i>
|
||||
|
@ -55,7 +47,6 @@
|
|||
–
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="description text">{{ trans.description }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
@ -288,8 +288,7 @@ class AccountMixin:
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
return super().get_context_data(**kwargs) | {
|
||||
"object": Account.objects.get(pk=self.kwargs.get("pk")),
|
||||
"account": True,
|
||||
"object": Account.objects.get(pk=self.kwargs.get("pk"))
|
||||
}
|
||||
|
||||
|
||||
|
@ -299,8 +298,7 @@ class SnapshotMixin:
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
return super().get_context_data(**kwargs) | {
|
||||
"object": Snapshot.objects.get(pk=self.kwargs.get("pk")),
|
||||
"snapshot": True,
|
||||
"object": Snapshot.objects.get(pk=self.kwargs.get("pk"))
|
||||
}
|
||||
|
||||
|
||||
|
@ -310,8 +308,7 @@ class CategoryMixin:
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
return super().get_context_data(**kwargs) | {
|
||||
"object": Category.objects.get(pk=self.kwargs.get("pk")),
|
||||
"category": True,
|
||||
"object": Category.objects.get(pk=self.kwargs.get("pk"))
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue