Fix bugs in html templates
This commit is contained in:
parent
47d8ff0382
commit
fe95222474
7 changed files with 36 additions and 29 deletions
|
@ -34,7 +34,9 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="value">{{ cat.sum_m|pmrvalue }}</td>
|
<td class="value">{{ cat.sum_m|pmrvalue }}</td>
|
||||||
<td class="bar m">
|
<td class="bar m">
|
||||||
|
{% if cat.sum_m %}
|
||||||
<div style="width: {% widthratio cat.sum_m max -100 %}%"></div>
|
<div style="width: {% widthratio cat.sum_m max -100 %}%"></div>
|
||||||
|
{% endif %}
|
||||||
{% if cat.sum < 0 %}
|
{% if cat.sum < 0 %}
|
||||||
<div class="tot" style="width:{% widthratio cat.sum max -100 %}%">
|
<div class="tot" style="width:{% widthratio cat.sum max -100 %}%">
|
||||||
<span>{{ cat.sum|pmrvalue }}</span>
|
<span>{{ cat.sum|pmrvalue }}</span>
|
||||||
|
@ -42,7 +44,9 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="bar p">
|
<td class="bar p">
|
||||||
|
{% if cat.sum_p %}
|
||||||
<div style="width: {% widthratio cat.sum_p max 100 %}%"></div>
|
<div style="width: {% widthratio cat.sum_p max 100 %}%"></div>
|
||||||
|
{% endif %}
|
||||||
{% if cat.sum > 0 %}
|
{% if cat.sum > 0 %}
|
||||||
<div class="tot" style="width:{% widthratio cat.sum max 100 %}%">
|
<div class="tot" style="width:{% widthratio cat.sum max 100 %}%">
|
||||||
<span>{{ cat.sum|pmrvalue }}</span>
|
<span>{{ cat.sum|pmrvalue }}</span>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{% block pre %}{% endblock %}
|
{% block pre %}{% endblock %}
|
||||||
<form method="post" enctype="multipart/form-data">
|
<form method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% if instance|adding %}<input hidden name="next" value="{{ request.path }}" />{% endif %}
|
{% if instance|adding %}<input hidden name="next" value="{{ request.path }}">{% endif %}
|
||||||
{{ form }}
|
{{ form }}
|
||||||
</form>
|
</form>
|
||||||
{% block tables %}{% endblock %}
|
{% block tables %}{% endblock %}
|
||||||
|
|
|
@ -29,11 +29,11 @@
|
||||||
{% if not form.instance|adding %}
|
{% if not form.instance|adding %}
|
||||||
<a class="del" href="{{ form.instance.get_delete_url }}">{% translate "Delete" %}</a>
|
<a class="del" href="{{ form.instance.get_delete_url }}">{% translate "Delete" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input type="reset" value="{% translate "Reset" %}" />
|
<input type="reset" value="{% translate "Reset" %}">
|
||||||
{% if form.instance|adding %}
|
{% if form.instance|adding %}
|
||||||
<input type="submit" value="{% translate "Create" %}" />
|
<input type="submit" value="{% translate "Create" %}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<input type="submit" value="{% translate "Save" %}" />
|
<input type="submit" value="{% translate "Save" %}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends "main/form/form_base.html" %}
|
{% extends "main/form/form_base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block buttons %}
|
{% block buttons %}
|
||||||
<input hidden value="{{ next }}" name="next" />
|
<input hidden value="{{ next }}" name="next">
|
||||||
<input type="reset" />
|
<input type="reset">
|
||||||
<input type="submit" value="{% translate "Log in" %}" />
|
<input type="submit" value="{% translate "Log in" %}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends "main/base.html" %}
|
{% extends "main/base.html" %}
|
||||||
|
{% load main_extras %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block link %}
|
{% block link %}
|
||||||
|
|
|
@ -6,9 +6,11 @@
|
||||||
<col class="desc" span="3">
|
<col class="desc" span="3">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
<th>{% translate "Name" %}</th>
|
<th>{% translate "Name" %}</th>
|
||||||
<th>{% translate "File" %}</th>
|
<th>{% translate "File" %}</th>
|
||||||
<th>{% translate "Delete" %}</th>
|
<th>{% translate "Delete" %}</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for invoice in transaction.invoices %}
|
{% for invoice in transaction.invoices %}
|
||||||
|
@ -20,7 +22,7 @@
|
||||||
<a href="{{ invoice.file.url }}">{% translate "File" %} [{{ invoice.file|extension }}]</a>
|
<a href="{{ invoice.file.url }}">{% translate "File" %} [{{ invoice.file|extension }}]</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ invoice.get_delete_url }}">{% translate "Delete" %}
|
<a href="{{ invoice.get_delete_url }}">{% translate "Delete" %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
|
@ -37,4 +39,4 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "transaction/transaction_list.html" %}
|
{% extends "transaction/transaction_list.html" %}
|
||||||
{% load i18n static category %}
|
{% load i18n main_extras static category %}
|
||||||
{% block link %}
|
{% block link %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% css "main/css/plot.css" %}
|
{% css "main/css/plot.css" %}
|
||||||
|
|
Loading…
Reference in a new issue