Fixed the cash summary to indicate the current subject in the subject selection in the accounting application.

This commit is contained in:
依瑪貓 2020-07-16 23:48:34 +08:00
parent a9c7a8328e
commit d47010e51a

View File

@ -69,11 +69,11 @@ First written: 2020/7/15
<div class="dropdown-menu subject-picker">
<div class="dropdown-header">{% trans "Shortcuts" context "Accounting|Subject|" as text %}{{ text|force_escape }}</div>
{% for subject in shortcut_subjects %}
<a class="dropdown-item {% if subject.code == current_subject.code %}{% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">{{ subject.title|title }}</a>
<a class="dropdown-item {% if subject.code == current_subject.code %} active {% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">{{ subject.title|title }}</a>
{% endfor %}
<div class="dropdown-header">{% trans "All" context "Accounting|Subject|" as text %}{{ text|force_escape }}</div>
{% for subject in all_sibjects %}
<a class="dropdown-item {% if subject.code == current_subject.code %}{% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">{{ subject.title|title }}</a>
<a class="dropdown-item {% if subject.code == current_subject.code %} active {% endif %}>" href="{% url "accounting:cash-summary" subject.code %}">{{ subject.title|title }}</a>
{% endfor %}
</div>
</div>