Renamed the template variables in the account list to be more meaningful in the accounting application.
This commit is contained in:
parent
651f527c86
commit
9686196b91
@ -45,7 +45,7 @@ First written: 2020/7/1
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
{% if object_list %}
|
||||
{% if account_list %}
|
||||
<table id="accounts" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -55,19 +55,19 @@ First written: 2020/7/1
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr class="{% if object.is_parent_and_in_use %} table-danger {% endif %}">
|
||||
<td>{{ object.code }}</td>
|
||||
{% for account in account_list %}
|
||||
<tr class="{% if account.is_parent_and_in_use %} table-danger {% endif %}">
|
||||
<td>{{ account.code }}</td>
|
||||
<td>
|
||||
{{ object.title }}
|
||||
{% if object.is_parent_and_in_use %}
|
||||
{{ account.title }}
|
||||
{% if account.is_parent_and_in_use %}
|
||||
<span class="badge badge-danger badge-pill">
|
||||
{{ _("Parent Account In Use")|force_escape }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="actions">
|
||||
<a href="{% url "accounting:accounts.show" object %}" class="btn btn-info" role="button">
|
||||
<a href="{% url "accounting:accounts.show" account %}" class="btn btn-info" role="button">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span class="d-none d-sm-inline">{{ _("View")|force_escape }}</span>
|
||||
</a>
|
||||
|
@ -1042,6 +1042,7 @@ def txn_sort(request, date):
|
||||
class AccountListView(ListView):
|
||||
"""The view to list the accounts."""
|
||||
queryset = Account.objects.order_by("code")
|
||||
context_object_name = "account_list"
|
||||
|
||||
|
||||
@require_GET
|
||||
|
Loading…
Reference in New Issue
Block a user