Improve account list

This commit is contained in:
Edgar P. Burkhart 2024-12-31 15:41:02 +01:00
parent 412cf94f93
commit cb08cb3d46
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 21 additions and 6 deletions

View file

@ -347,6 +347,13 @@ ul.messages {
display: grid;
grid-template-columns: 1fr min-content;
&.new,
&.more {
border-style: dashed;
}
&.more label span::after {
content: "\2002";
}
}
&:not(.show-archive) .account.archived {
display: none;

View file

@ -16,19 +16,27 @@
{% for acc in accounts %}
<div class="account {% if acc.archived %}archived{% endif %}">
<dt>
{{ acc.icon|remix }} <a href="{{ acc.get_absolute_url }}">{{ acc }}</a>
<a href="{{ acc.get_absolute_url }}">{{ acc.icon|remix }}{{ acc }}</a>
</dt>
<dd>
{% if acc.statement_set.first %}{{ acc.statement_set.first.value|value }}{% endif %}
</dd>
</div>
{% endfor %}
<div class="more account">
<dt>
<label for="show-archived-accounts">{{ "archive"|remix }}{% translate "Show archived" %}</label>
</dt>
<dd>
<input type="checkbox" class="show-archived" id="show-archived-accounts" />
</dd>
</div>
<div class="new account">
<dt>
<a href="{% url "new_account" %}">{{ "add-box"|remix }}{% translate "Create account" %}</a>
</dt>
</div>
</dl>
<div>
<input type="checkbox" class="show-archived" id="show-archived-accounts" />
<label for="show-archived-accounts">{% translate "Show archived" %}</label>
</div>
<a href="{% url "new_account" %}">{% translate "Create account" %}</a>
</section>
<section class="statements">
<h2>{% translate "Statements" %}</h2>