Renamed the template variable current_account to account in the accounting application, for simplicity.

This commit is contained in:
依瑪貓
2020-07-23 09:37:29 +08:00
parent 8890e60fbb
commit a089e2c235
5 changed files with 36 additions and 36 deletions

View File

@ -27,7 +27,7 @@ First written: 2020/7/16
{% load accounting %}
{% block settings %}
{% blocktrans asvar title with account=current_account.title|title period=period.description context "Accounting|" %}Ledger for {{ account }} in {{ period }}{% endblocktrans %}
{% blocktrans asvar title with account=account.title|title period=period.description context "Accounting|" %}Ledger for {{ account }} in {{ period }}{% endblocktrans %}
{% setvar "title" title %}
{% setvar "use_period_chooser" True %}
{% static "accounting/css/report.css" as css %}
@ -67,13 +67,13 @@ First written: 2020/7/16
{% endwith %}
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="d-none d-md-inline">{{ current_account.title|title }}</span>
<span class="d-none d-md-inline">{{ account.title|title }}</span>
<span class="d-md-none">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</span>
</button>
<div class="dropdown-menu account-picker">
{% for account in accounts %}
<a class="dropdown-item {% if account.code == current_account.code %} active {% endif %}" href="{% url "accounting:ledger" account period %}">
{{ account.code }} {{ account.title|title }}
{% for x in accounts %}
<a class="dropdown-item {% if x.code == account.code %} active {% endif %}" href="{% url "accounting:ledger" x period %}">
{{ x.code }} {{ x.title|title }}
</a>
{% endfor %}
</div>