-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathtable.html
More file actions
executable file
·99 lines (78 loc) · 2.39 KB
/
table.html
File metadata and controls
executable file
·99 lines (78 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{% extends "admin/base.html" %}
{% load i18n %}
{% block extrastyle %}
<style>
@media print
{
.no-print, .no-print *
{
display: none !important;
}
}
</style>
{% endblock %}
{% block title %} {{ site_title|default:_('Django site admin') }}{% endblock %}
{% block content %}
<div style="float: right; max-width:400px">
<h3>{% trans "Filter by transaction types" %}</h3>
<span><a style="display: inline-block; margin-right: 10px;" href="{% url 'table_m' year=year month=month %}">{% trans "All types" %}</a></span>
{% for t in tags %}
{% if t.pk = tag_pk %}
<span style="border: solid 2pt red; display: inline-block; margin-right: 10px"><a href="{% url 'table_m' year=year month=month tag=t.pk|stringformat:"i" %}">{{ t.label }}</a></span>
{% else %}
<span><a style="display: inline-block; margin-right: 10px;" href="{% url 'table_m' year=year month=month tag=t.pk|stringformat:"i" %}">{{ t.label }}</a></span>
{% endif %}
{% endfor %}
<h3>{% trans "Month selection" %}</h3>
<table>
{% for y in years %}
<tr>
{% if tag %}
<th><a href="{% url 'table_y' year=y tag=tag_pk %}">{{ y }}</a></th>
{% else %}
<th><a href="{% url 'table_y' year=y %}">{{ y }}</a></th>
{% endif %}
{% for m in months %}
{% if y = year and m = month %}
<td style="border: solid 2pt red;"><a href="{% url 'table_m' year=y month=m tag=tag_pk %}">{{ m }}</a></td>
{% else %}
<td><a href="{% url 'table_m' year=y month=m tag=tag_pk %}">{{ m }}</a></td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</table>
</div>
<h1>{{ month }}-{{ year }} {{ tag.label }}</h1>
<h3>{% trans "Summary" %}</h3>
<table>
<tr><th>{% trans "Income" %}</th><td>{{ income.sum }}</td></tr>
<tr><th>{% trans "Receivables" %}</th><td>{{ receivables.sum }}</td></tr>
<tr><th>{% trans "Balance" %}</th><td>{{ total.sum }}</td></tr>
</table>
<h3>{% trans "Frequency table" %}</h3>
<table>
<tr>
<th>{% trans "Amount" %}</th>
<th>{% trans "Freq" %}</th>
</tr>
{% for f in freq_table %}
<tr>
<th>{{ f.amount }}</th>
<td>{{ f.freq }}</td>
</tr>
{% endfor %}
</table>
<h3>{% trans "Transactions" %}</h3>
<table>
{% for list_item in object_list %}
<tr>
<td>{{ list_item.owner }}</td>
{% if list_item.amount < 0 %}<td style="color: red;">{{ list_item.amount }}</td>
{% else %}<td style="color: green;">+{{ list_item.amount }}</td>{% endif %}
<td>{{ list_item.tag }}</td>
<td>{{ list_item.stamp }}</td>
</tr>
{% endfor %}
</table>
{% endblock content %}